在Microsoft.Phone.Info这个命名空间下有这样一个类DeviceStatus

手机的信息都存在这个类的静态属性中。

· DeviceManufacturer 设备制造商

· DeviceName 设备名称

· DeviceFirmwareVersion固件版本

· DeviceHardwareVersion硬件版本

· DeviceTotalMemory总内存

· ApplicationCurrentMemoryUsage 当前内存

· ApplicationMemoryUsageLimit 内存限制

· ApplicationPeakMemoryUsage 最大内存使用量

· IsKeyboardPresent 物理键盘可用性

· IsKeyboardDeployed 物理键盘展开状态

· PowerSource 当前电源资源

PowerSource 也是可以在任何时间发生改变的。创建一个事件句柄如下:

DeviceStatus.PowerSourceChanged +=newEventHandler(DeviceStatus_PowerSourceChanged);

voidDeviceStatus_PowerSourceChanged(objectsender, EventArgs e)

{

Dispatcher.BeginInvoke(() => MessageBox.Show( DeviceStatus.PowerSource.ToString()));

}

腾讯微博:http://t.qq.com/liaopanpan90

相关文章:

  • 2021-12-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2021-07-01
  • 2021-06-17
猜你喜欢
  • 2021-05-31
  • 2022-01-05
  • 2021-12-26
  • 2021-07-25
  • 2022-03-01
  • 2021-07-06
  • 2021-09-17
相关资源
相似解决方案