win10 UWP 获取系统信息

获取系统信息

            Windows.System.Profile.AnalyticsVersionInfo analyticsVersion = Windows.System.Profile.AnalyticsInfo.VersionInfo;

            reminder = analyticsVersion.DeviceFamily;

            ulong v = ulong.Parse(Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamilyVersion);
            ulong v1 = ( v & 0xFFFF000000000000L ) >> 48;
            ulong v2 = ( v & 0x0000FFFF00000000L ) >> 32;
            ulong v3 = ( v & 0x00000000FFFF0000L ) >> 16;
            ulong v4 = ( v & 0x000000000000FFFFL );
            reminder = $"{v1}.{v2}.{v3}.{v4}";
            Windows.ApplicationModel.Package package = Windows.ApplicationModel.Package.Current;
            reminder = package.Id.Architecture.ToString();
            reminder = package.DisplayName;
            EasClientDeviceInformation eas = new EasClientDeviceInformation();
            reminder= eas.SystemManufacturer;

reminder把字符串输出到textbox

Windows.Desktop
10.0.10586.29
X86

参考:https://www.suchan.cz/2015/08/uwp-quick-tip-getting-device-os-and-app-info/

lindexi_gd CSDN认证博客专家 C# WPF UWP 微软最具价值专家
我是微软Windows应用开发方向的最具价值专家,欢迎访问我博客blog.lindexi.com里面有大量WPF和UWP博客
已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 终极编程指南 设计师:CSDN官方博客 返回首页