Windows PHone 8 获取硬件信息
/// <summary> /// 获取系统信息 /// </summary> private string GetDeviceInfo() { StringBuilder sb = new StringBuilder(); sb.AppendLine("设备制造商:" + DeviceStatus.DeviceManufacturer); sb.AppendLine("设备名称:" + DeviceStatus.DeviceName); sb.AppendLine("物理内存:" + (DeviceStatus.DeviceTotalMemory / 1024 / 1024).ToString() + "M"); sb.AppendLine("硬件版本:" + DeviceStatus.DeviceHardwareVersion); sb.AppendLine("固件版本:" + DeviceStatus.DeviceFirmwareVersion); sb.AppendLine("物理键盘:" + DeviceStatus.IsKeyboardDeployed.ToString()); sb.AppendLine("供电方式:" + DeviceStatus.PowerSource); object uniqueID = ""; DeviceExtendedProperties.TryGetValue("DeviceUniqueId", out uniqueID); if (uniqueID != null) { sb.AppendLine("设备标识:" + uniqueID.ToString()); } sb.AppendLine("系统内核:" + System.Environment.OSVersion.Platform.ToString()); sb.AppendLine("系统版本:" + System.Environment.OSVersion.Version.ToString()); sb.AppendLine("当前语言:" + CultureInfo.CurrentCulture.DisplayName); sb.AppendLine("当前时区:UTC" + DateTimeOffset.Now.ToString("%K")); return sb.ToString(); }
"与UTC之间的时间偏移量:" + DateTimeOffset.Now.Offset.ToString()