zoukankan      html  css  js  c++  java
  • Windows Phone 7(WP7)开发 获取设备信息

    硬件相关

    需要引入命名空间:   using Microsoft.Phone.Info;

    信息名称 获取代码 数据类型 备注
    设备制造商 DeviceStatus.DeviceManufacturer String,长度256以内 也可用DeviceExtendedProperties.GetValue("DeviceManufacturer").ToString()获得,但不推荐
    设备名称 DeviceStatus.DeviceName String,长度256以内 也可用DeviceExtendedProperties.GetValue("DeviceName").ToString()获得,但不推荐
    设备唯一标识 DeviceExtendedProperties.GetValue("DeviceUniqueId") Byte[] (数组长度20以内)  
    设备固件版本 DeviceStatus.DeviceFirmwareVersion String 也可用DeviceExtendedProperties.GetValue("DeviceFirmwareVersion").ToString()获得,但不推荐
    设备硬件版本 DeviceStatus.DeviceHardwareVersion String 也可用DeviceExtendedProperties.GetValue("DeviceHardwareVersion").ToString()获得,但不推荐
    设备总内存大小 DeviceStatus.DeviceTotalMemory Long 也可用DeviceExtendedProperties.GetValue("DeviceTotalMemory")获得,但不推荐
    应用正在使用的内存大小 DeviceStatus.ApplicationCurrentMemoryUsage Long 也可用DeviceExtendedProperties.GetValue("ApplicationCurrentMemoryUsage")获得,但不推荐
    应用使用的内存最大时的内存大小 DeviceStatus.ApplicationPeakMemoryUsage Long 也可用DeviceExtendedProperties.GetValue("ApplicationPeakMemoryUsage")获得,但不推荐
           

    详情可参考 http://msdn.microsoft.com/zh-cn/library/microsoft.phone.info.deviceextendedproperties

    屏幕分辨率大小(这个目前都是480*800):

    屏幕宽度(Double)  System.Windows.Application.Current.Host.Content.ActualWidth 

    屏幕高度(Double)  System.Windows.Application.Current.Host.Content.ActualHeight

    操作系统版本:

    System.Environment.OSVersion.ToString()

  • 相关阅读:
    MySQL之force index和ignore index
    Linux中CPU性能分析工具perf简单使用(亲测可用)
    Linux之SeLinux
    Docker基础
    yum常用命令
    MySQL总结
    MySQL字符集详解
    MySQL5.6的4个自带库详解
    Python操作MySQL
    MySQL索引原理
  • 原文地址:https://www.cnblogs.com/vistach/p/Windows_Phone_WP7_Get_Device_Status_Info.html
Copyright © 2011-2022 走看看