Beispiel #1
0
        public static string GetDeviceType()
        {
            var deviceType = SystemInfoEstimate.GetDeviceCategoryAsync().Result;

            switch (deviceType)
            {
            case "Computer.Lunchbox": return("pc");

            case "Computer.Tablet": return("tablet");

            case "Computer.Portable": return("phone");

            default: return("unknown");
            }
        }
Beispiel #2
0
        public static string GetArchitecture()
        {
            ProcessorArchitecture architecture = SystemInfoEstimate.GetProcessorArchitectureAsync().Result;

            switch (architecture)
            {
            case ProcessorArchitecture.Arm: return("arm");

            case ProcessorArchitecture.X86: return("x86");

            case ProcessorArchitecture.X64: return("x64");

            case ProcessorArchitecture.Neutral: return("neutral");

            case ProcessorArchitecture.Unknown: return("unknown");

            default: return("unknown");
            }
        }
Beispiel #3
0
        public static string GetDeviceType(EasClientDeviceInformation deviceInfo)
        {
            var deviceType = SystemInfoEstimate.GetDeviceCategoryAsync().Result;

            switch (deviceType)
            {
            case "Computer.Lunchbox": return("pc");

            case "Computer.Tablet": return("tablet");

            case "Computer.Portable": return("phone");
            }

            if (deviceInfo.SystemSku == "Microsoft Virtual")
            {
                return("emulator");
            }

            return("unknown");
        }
Beispiel #4
0
 public static string GetDeviceManufacturer()
 {
     return(SystemInfoEstimate.GetDeviceManufacturerAsync().Result);
 }
Beispiel #5
0
 public static string GetDeviceName()
 {
     return(SystemInfoEstimate.GetDeviceModelAsync().Result);
 }
Beispiel #6
0
 public static string GetOsVersion()
 {
     return(SystemInfoEstimate.GetWindowsVersionAsync().Result);
 }