博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Windows Phone 程序的基本概念和架构
阅读量:5337 次
发布时间:2019-06-15

本文共 4111 字,大约阅读时间需要 13 分钟。

namespace 培训第三章程序和基本结构和架构{    public partial class MainPage : PhoneApplicationPage    {        // 构造函数        public MainPage()        {            InitializeComponent();            //Loaded += MainPage_Loaded;            getDeviceStatus();        }        /*private void MainPage_Loaded(object sender, RoutedEventArgs e)        {            pageHeight.Text = this.ActualHeight.ToString();        }        private void MainPage_OrientationChanged_1(object sender, OrientationChangedEventArgs e)        {            if ((e.Orientation & PageOrientation.Portrait) == PageOrientation.Portrait)            {                //坚屏处理                MessageBox.Show("坚屏处理");            }            else            {                //横屏处理                MessageBox.Show("横屏处理");            }        }*/        // 为 ViewModel 项加载数据隐藏        /*protected override void OnNavigatedTo(NavigationEventArgs e)        {            MessageBox.Show("程序启动或激活OnNavigatedTo");        }        protected override void OnNavigatedFrom(NavigationEventArgs e)        {            MessageBox.Show("程序退出或隐藏到后台OnNavigatedFrom");        }*/        /*private void Button_Click_1(object sender, RoutedEventArgs e)        {            ApplicationBar = (Microsoft.Phone.Shell.ApplicationBar) Resources["appbar1"];        }        private void Button_Click_2(object sender, RoutedEventArgs e)        {            ApplicationBar = (Microsoft.Phone.Shell.ApplicationBar) Resources["appbar2"];        }*/        /*protected override void OnNavigatedTo(NavigationEventArgs e)        {            //base.OnNavigatedTo(e);            App app = Application.Current as App;            post.Text = app.Post;            //app.Post = post.Text;            base.OnNavigatedTo(e);        }        private void Button_Click_1(object sender, RoutedEventArgs e)        {            Uri url = new Uri(String.Format("/Page1.xaml?name={0}",name.Text),UriKind.Relative);            NavigationService.Navigate(url);        }*/        /*private void Button_Click_1(object sender, RoutedEventArgs e)        {            PhoneApplicationService.Current.State["name"] = name.Text;            NavigationService.Navigate(new Uri("/DetailPage.xaml", UriKind.Relative));        }*/        /*private void button_Click(object sender, RoutedEventArgs e)        {            IsolatedStorageFile fileStoreage = IsolatedStorageFile.GetUserStoreForApplication();            if (!fileStoreage.FileExists("log.txt"))            {                fileStoreage.CreateFile("log.txt");            }            NavigationService.Navigate(new Uri("/hello.xaml", UriKind.Relative));        }*/        private void getDeviceStatus()        {            this._CurrentMomoryUsage.Text =(DeviceStatus.ApplicationCurrentMemoryUsage / 1024 / 1024).ToString();            this._MemoryUsageLimit.Text = (DeviceStatus.ApplicationMemoryUsageLimit/1024/1024).ToString();            this._PeakMemoryUsage.Text = (DeviceStatus.ApplicationPeakMemoryUsage/1024/1024).ToString();            this._eFirmwareVersion.Text = (DeviceStatus.DeviceFirmwareVersion);            this._HardwareVersion.Text = (DeviceStatus.DeviceFirmwareVersion);            this._DeviceManufacturer.Text = (DeviceStatus.DeviceManufacturer);            this._DeviceName.Text = (DeviceStatus.DeviceName);            this._DeviceTotalMemory.Text = (DeviceStatus.DeviceTotalMemory / 1024 / 1024).ToString();        }    }

  

  

转载于:https://www.cnblogs.com/xiangxiaodong/archive/2013/03/16/2963849.html

你可能感兴趣的文章
delphi 内嵌汇编例子
查看>>
【luogu P2298 Mzc和男家丁的游戏】 题解
查看>>
前端笔记-bom
查看>>
MATLAB作图方法与技巧(一)
查看>>
上海淮海中路上苹果旗舰店门口欲砸一台IMAC电脑维权
查看>>
Google透露Android Market恶意程序扫描服务
查看>>
给mysql数据库字段值拼接前缀或后缀。 concat()函数
查看>>
迷宫问题
查看>>
【FZSZ2017暑假提高组Day9】猜数游戏(number)
查看>>
泛型子类_属性类型_重写方法类型
查看>>
eclipse-将同一个文件分屏显示
查看>>
对闭包的理解
查看>>
练习10-1 使用递归函数计算1到n之和(10 分
查看>>
Oracle MySQL yaSSL 不明细节缓冲区溢出漏洞2
查看>>
windows编程ASCII问题
查看>>
.net webService代理类
查看>>
Code Snippet
查看>>
Node.js Express项目搭建
查看>>
zoj 1232 Adventure of Super Mario
查看>>
1201 网页基础--JavaScript(DOM)
查看>>