zl程序教程

您现在的位置是:首页 >  系统

当前栏目

win10 UWP 获取系统信息

系统win10 获取 信息 UWP
2023-09-27 14:28:56 时间

获取系统信息

            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/

<script type="text/javascript"> $(function () { $('pre.prettyprint code').each(function () { var lines = $(this).text().split('\n').length; var $numbering = $('<ul/>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('<li/>').text(i)); }; $numbering.fadeIn(1700); }); }); </script>