コード例 #1
0
        public static string GetDeviceName()
        {
            var deviceName = DeviceStatus.DeviceName;
            var deviceId   = DeviceStatus.DeviceManufacturer;
            var phone      = PhoneNameResolver.Resolve(deviceId, deviceName);
            var deviceInfo = string.Format("{0} ({1})", phone.CanonicalModel, phone.CanonicalManufacturer);

            return(deviceInfo);
        }
コード例 #2
0
        public void SetDeviceInfo()
        {
            var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            DeviceName = deviceInfo.FriendlyName;

            DeviceModel = PhoneNameResolver.Resolve(deviceInfo.SystemManufacturer, deviceInfo.SystemProductName).FullCanonicalName;

            CreationDate = DateTime.Now;
        }
コード例 #3
0
ファイル: MainViewModel.cs プロジェクト: ScottIsAFool/Speader
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(
            INavigationService navigationService,
            IAuthenticationService authenticationService,
            ICacheService cacheService,
            IReaderHelper readerHelper,
            PocketViewModel pocketViewModel,
            ReadabilityViewModel readabilityViewModel)
        {
            _navigationService     = navigationService;
            _authenticationService = authenticationService;
            _cacheService          = cacheService;
            _readerHelper          = readerHelper;
            _pocketViewModel       = pocketViewModel;
            _readabilityViewModel  = readabilityViewModel;

#if WINDOWS_PHONE_APP
            var deviceInfo = new EasClientDeviceInformation();
            var phone      = PhoneNameResolver.Resolve(deviceInfo.SystemManufacturer, deviceInfo.SystemProductName);
            DeviceName = $"{deviceInfo.FriendlyName} ({phone.CanonicalModel})";
#endif
        }