8中获得设计型号的

8中获得设计型号的

本文介绍了如何使用我的应用程序在Windows Phone 8中获得设计型号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用我的应用程序在Windows Phone 8中获得设计型号,

How to get devise model number in windows phone 8 using my application, 

推荐答案

public static string Model
{
   get
   {
      string manufacturer = DeviceStatus.DeviceManufacturer;
      string model = string.Empty;
      if (manufacturer.Equals("NOKIA"))
      {
         model = manufacturer + " ";
         string name = DeviceStatus.DeviceName.Substring(0, 6);
         switch (name)
         {
            case "RM-846":
               model += "Lumia 620";
               break;
            case "RM-878":
               model += "Lumia 810";
               break;
            case "RM-824":
            case "RM-825":
            case "RM-826":
               model += "Lumia 820";
               break;
            case "RM-845":
               model += "Lumia 822";
               break;
            case "RM-820":
            case "RM-821":
            case "RM-822":
               model += "Lumia 920";
               break;
            case "RM-867":
               model += "Lumia 920T";
               break;
         }
      }
      else if (manufacturer.Equals("HTC"))
      {
         string[] partModel = DeviceStatus.DeviceName.Split(' ');
         model = manufacturer + " " + partModel[2];
      }
      else if (manufacturer.Equals("Huawei"))
      {
         //Huawei Ascend W1 (untested)
         model = DeviceStatus.DeviceName;
      }
      else if (manufacturer.Equals("Samsung"))
      {
         //Samsung Ativ S, Samsung Ativ Odyssey (untested)
         model = DeviceStatus.DeviceName;
      }
      return model;
   }
}



这篇关于如何使用我的应用程序在Windows Phone 8中获得设计型号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 02:55