zoukankan      html  css  js  c++  java
  • 获取WP7设备信息的方法

            /// <summary>
            /// 获取软硬件信息
            /// </summary>
            /// <returns></returns>
            static public string GetDeviceInfo()
            {
                string deviceName = DeviceExtendedProperties.GetValue("DeviceName").ToString();
                deviceName = deviceName.Replace(" ", "-");
                string manufacturer = DeviceExtendedProperties.GetValue("DeviceManufacturer").ToString();
                manufacturer = manufacturer.Replace(" ", "-");
                
                string version = System.Environment.OSVersion.ToString();
                version = version.Replace(" ", "-");
                string screen = string.Format("{0}*{1}", System.Windows.Application.Current.Host.Content.ActualWidth
                    , System.Windows.Application.Current.Host.Content.ActualHeight);
    
                string netType = "";
                NetworkInterfaceType net = NetworkInterface.NetworkInterfaceType;
                netType = net.ToString();
    
                //:手机型号 OS系统版本 V客户端版本 S屏幕尺寸 
                string Tem = string.Format("D_{0}-{1} OS_{2} V_{3} S_{4} N_{5} ", manufacturer, deviceName, version, GetAppVersion(), screen, netType);
                return Tem;
            }
    

      

  • 相关阅读:
    Python 特点
    Python简介
    数据库查询语句
    人月神话读书笔记01
    团队介绍
    团队项目一 原型展示+电梯演讲
    全球疫情可视化展示
    NABCD模型
    第六周学习进度
    构建之法阅读笔记03
  • 原文地址:https://www.cnblogs.com/jeekun/p/2145291.html
Copyright © 2011-2022 走看看