Inheritance: IEasClientDeviceInformation
コード例 #1
0
	    public DeviceInfoService()
	    {
            AnalyticsVersionInfo ai = AnalyticsInfo.VersionInfo;
            DeviceFamily = ai.DeviceFamily;

            // get the system version number
            string sv = AnalyticsInfo.VersionInfo.DeviceFamilyVersion;
            ulong v = ulong.Parse(sv);
            ulong v1 = (v & 0xFFFF000000000000L) >> 48;
            ulong v2 = (v & 0x0000FFFF00000000L) >> 32;
            ulong v3 = (v & 0x00000000FFFF0000L) >> 16;
            ulong v4 = (v & 0x000000000000FFFFL);
            OsVersion = $"{v1}.{v2}.{v3}.{v4}";

            // get the package architecure
            Package package = Package.Current;
            SystemArchitecture = package.Id.Architecture.ToString();

            // get the user friendly app name
            ApplicationName = package.DisplayName;

            // get the app version
            PackageVersion pv = package.Id.Version;
            ApplicationVersion = $"{pv.Major}.{pv.Minor}.{pv.Build}.{pv.Revision}";

            // get the device manufacturer and model name
            EasClientDeviceInformation eas = new EasClientDeviceInformation();
            DeviceManufacturer = eas.SystemManufacturer;
            DeviceModel = eas.SystemProductName;
	        OsVersion = eas.OperatingSystem + " " + OsVersion;
	        DeviceId = eas.Id.ToString();
	    }
コード例 #2
0
ファイル: UtilWS.cs プロジェクト: adjust/windows_sdk
        public DeviceInfo GetDeviceInfo()
        {
            if (DeviceInfo == null)
            {
                var easClientDeviceInformation = new EasClientDeviceInformation();

                DeviceInfo = new DeviceInfo
                {
                    ClientSdk = GetClientSdk(),
                    HardwareId = UtilUap.GetHardwareId(),
                    NetworkAdapterId = UtilUap.GetNetworkAdapterId(),
                    AppDisplayName = UtilUap.GetAppDisplayName(),
                    AppVersion = UtilUap.GetAppVersion(),
                    AppPublisher = UtilUap.GetAppPublisher(),
                    DeviceType = UtilUap.GetDeviceType(),
                    DeviceManufacturer = UtilUap.GetDeviceManufacturer(),
                    Architecture = UtilUap.GetArchitecture(),
                    OsName = GetOsName(),
                    OsVersion = UtilUap.GetOsVersion(),
                    Language = UtilUap.GetLanguage(),
                    Country = UtilUap.GetCountry(),
                    ReadWindowsAdvertisingId = ReadWindowsAdvertisingId,
                    EasFriendlyName = UtilUap.ExceptionWrap(() => easClientDeviceInformation.FriendlyName),
                    EasId = UtilUap.ExceptionWrap(() => easClientDeviceInformation.Id.ToString()),
                    EasOperatingSystem = UtilUap.ExceptionWrap(() => easClientDeviceInformation.OperatingSystem),
                    EasSystemManufacturer = UtilUap.ExceptionWrap(() => easClientDeviceInformation.SystemManufacturer),
                    EasSystemProductName = UtilUap.ExceptionWrap(() => easClientDeviceInformation.SystemProductName),
                    EasSystemSku = UtilUap.ExceptionWrap(() => easClientDeviceInformation.SystemSku),
                };
            }
            return DeviceInfo;
        }
コード例 #3
0
    public RaygunEnvironmentMessage()
    {
      Locale = CultureInfo.CurrentCulture.DisplayName;

      DateTime now = DateTime.Now;
      UtcOffset = TimeZoneInfo.Local.GetUtcOffset(now).TotalHours;

      if (Window.Current != null)
      {
        WindowBoundsWidth = Window.Current.Bounds.Width;
        WindowBoundsHeight = Window.Current.Bounds.Height;

        var sensor = Windows.Devices.Sensors.SimpleOrientationSensor.GetDefault();

        if (sensor != null)
        {
          CurrentOrientation = sensor.GetCurrentOrientation().ToString();
        }
      }

      var deviceInfo = new EasClientDeviceInformation();

      try
      {
        DeviceManufacturer = deviceInfo.SystemManufacturer;
        DeviceName = deviceInfo.SystemProductName;
        OSVersion = deviceInfo.OperatingSystem;
      }
      catch (Exception e)
      {
        Debug.WriteLine("Failed to get device information: {0}", e.Message);
      }
    }
コード例 #4
0
 static public byte[] getDeviceIDasByte()
 {
     //byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
     //return myDeviceID;
     var deviceInformation = new EasClientDeviceInformation();
     return deviceInformation.Id.ToByteArray();
 }
コード例 #5
0
ファイル: Scenario1.xaml.cs プロジェクト: mbin/Win81App
        private void Launch_Click(object sender, RoutedEventArgs e)
        {


            try
            {
                EasClientDeviceInformation CurrentDeviceInfor = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
                TextBox DeviceID = rootPage.FindName("DeviceID") as TextBox;
                DeviceID.Text = CurrentDeviceInfor.Id.ToString();
                TextBox OperatingSystem = rootPage.FindName("OperatingSystem") as TextBox;
                OperatingSystem.Text = CurrentDeviceInfor.OperatingSystem;
                TextBox FriendlyName = rootPage.FindName("FriendlyName") as TextBox;
                FriendlyName.Text = CurrentDeviceInfor.FriendlyName;
                TextBox SystemManufacturer = rootPage.FindName("SystemManufacturer") as TextBox;
                SystemManufacturer.Text = CurrentDeviceInfor.SystemManufacturer;
                TextBox SystemProductName = rootPage.FindName("SystemProductName") as TextBox;
                SystemProductName.Text = CurrentDeviceInfor.SystemProductName;
                TextBox SystemSku = rootPage.FindName("SystemSku") as TextBox;
                SystemSku.Text = CurrentDeviceInfor.SystemSku;
            }
            catch (Exception Error)
            {
                //
                // Bad Parameter, Machine infor Unavailable errors are to be handled here.
                //
                DebugPrint(Error.ToString());
            }
        }
    private static string GetDeviceName()
    {
        var deviceInfo = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
        var deviceName = deviceInfo.FriendlyName;

        return(deviceName);
    }
コード例 #7
0
        static SystemInfoHelper()
        {
            AnalyticsVersionInfo ai = AnalyticsInfo.VersionInfo;
            SystemFamily = ai.DeviceFamily;

            string sv = AnalyticsInfo.VersionInfo.DeviceFamilyVersion;
            ulong v = ulong.Parse(sv);
            ulong v1 = (v & 0xFFFF000000000000L) >> 48;
            ulong v2 = (v & 0x0000FFFF00000000L) >> 32;
            ulong v3 = (v & 0x00000000FFFF0000L) >> 16;
            ulong v4 = v & 0x000000000000FFFFL;
            SystemVersion = $"{v1}.{v2}.{v3}.{v4}";

            Package package = Package.Current;
            SystemArchitecture = package.Id.Architecture.ToString();
            Assembly sdkAssembly = Assembly.Load(new AssemblyName("SensorbergSDK"));
            var version  = sdkAssembly.GetName().Version;
            SdkVersion = $"{version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
            ApplicationName = package.DisplayName;
            PackageName = package.Id.Name;
            PackageVersion pv = package.Id.Version;
            ApplicationVersion = $"{pv.Major}.{pv.Minor}.{pv.Build}.{pv.Revision}";

            EasClientDeviceInformation eas = new EasClientDeviceInformation();
            DeviceManufacturer = eas.SystemManufacturer;
            DeviceModel = eas.SystemProductName;
            SystemName = eas.OperatingSystem;
        }
コード例 #8
0
 private void Launch_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         EasClientDeviceInformation CurrentDeviceInfor = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
         TextBox DeviceID = rootPage.FindName("DeviceID") as TextBox;
         DeviceID.Text = CurrentDeviceInfor.Id.ToString();
         TextBox OperatingSystem = rootPage.FindName("OperatingSystem") as TextBox;
         OperatingSystem.Text = CurrentDeviceInfor.OperatingSystem;
         TextBox FriendlyName = rootPage.FindName("FriendlyName") as TextBox;
         FriendlyName.Text = CurrentDeviceInfor.FriendlyName;
         TextBox SystemManufacturer = rootPage.FindName("SystemManufacturer") as TextBox;
         SystemManufacturer.Text = CurrentDeviceInfor.SystemManufacturer;
         TextBox SystemProductName = rootPage.FindName("SystemProductName") as TextBox;
         SystemProductName.Text = CurrentDeviceInfor.SystemProductName;
         TextBox SystemSku = rootPage.FindName("SystemSku") as TextBox;
         SystemSku.Text = CurrentDeviceInfor.SystemSku;
     }
     catch (Exception Error)
     {
         //
         // Bad Parameter, Machine infor Unavailable errors are to be handled here.
         //
         DebugPrint(Error.ToString());
     }
 }
		public DisplayPlatformInfoSap1Page ()
        {
            InitializeComponent ();

#if __IOS__

            UIDevice device = new UIDevice();
            modelLabel.Text = device.Model.ToString();
            versionLabel.Text = String.Format("{0} {1}", device.SystemName, 
                                                         device.SystemVersion);

#elif __ANDROID__

            modelLabel.Text = String.Format("{0} {1}", Build.Manufacturer, 
                                                       Build.Model);
            versionLabel.Text = Build.VERSION.Release.ToString();

#elif WINDOWS_PHONE

            modelLabel.Text = String.Format("{0} {1}", DeviceStatus.DeviceManufacturer, 
                                                       DeviceStatus.DeviceName);
            versionLabel.Text = Environment.OSVersion.ToString();

#elif WINDOWS_APP || WINDOWS_PHONE_APP

            EasClientDeviceInformation devInfo = new EasClientDeviceInformation();
            modelLabel.Text = String.Format("{0} {1}", devInfo.SystemManufacturer, 
                                                       devInfo.SystemProductName);
            versionLabel.Text = devInfo.OperatingSystem;

#endif

        }
コード例 #10
0
ファイル: RegressionHelpers.cs プロジェクト: cg123/xenko
        public static ImageTestResultConnection GetDefaultImageTestResultConnection()
        {
            var result = new ImageTestResultConnection();

            // TODO: Check build number in environment variables
            result.BuildNumber = -1;

#if SILICONSTUDIO_PLATFORM_WINDOWS_DESKTOP
            result.Platform = "Windows";
            result.Serial = Environment.MachineName;
    #if SILICONSTUDIO_XENKO_GRAPHICS_API_DIRECT3D12
            result.DeviceName = "Direct3D12";
    #elif SILICONSTUDIO_XENKO_GRAPHICS_API_DIRECT3D11
            result.DeviceName = "Direct3D";
    #elif SILICONSTUDIO_XENKO_GRAPHICS_API_OPENGLES
            result.DeviceName = "OpenGLES";
    #elif SILICONSTUDIO_XENKO_GRAPHICS_API_OPENGL
            result.DeviceName = "OpenGL";
    #endif
#elif SILICONSTUDIO_PLATFORM_ANDROID
            result.Platform = "Android";
            result.DeviceName = Android.OS.Build.Manufacturer + " " + Android.OS.Build.Model;
            result.Serial = Android.OS.Build.Serial ?? "Unknown";
#elif SILICONSTUDIO_PLATFORM_IOS
            result.Platform = "iOS";
            result.DeviceName = iOSDeviceType.Version.ToString();
            result.Serial = UIKit.UIDevice.CurrentDevice.Name;
#elif SILICONSTUDIO_PLATFORM_WINDOWS_RUNTIME
    #if SILICONSTUDIO_PLATFORM_WINDOWS_PHONE
            result.Platform = "WindowsPhone";
    #elif SILICONSTUDIO_PLATFORM_WINDOWS_STORE
            result.Platform = "WindowsStore";
    #else
            result.Platform = "Windows10";
    #endif
            var deviceInfo = new EasClientDeviceInformation();
            result.DeviceName = deviceInfo.SystemManufacturer + " " + deviceInfo.SystemProductName;
            try
            {
                result.Serial = deviceInfo.Id.ToString();
            }
            catch (Exception)
            {
    #if SILICONSTUDIO_PLATFORM_WINDOWS_PHONE || SILICONSTUDIO_PLATFORM_WINDOWS_STORE
                var token = HardwareIdentification.GetPackageSpecificToken(null);
                var hardwareId = token.Id;

                var hasher = HashAlgorithmProvider.OpenAlgorithm("MD5");
                var hashed = hasher.HashData(hardwareId);

                result.Serial = CryptographicBuffer.EncodeToHexString(hashed);
    #else
                // Ignored on Windows 10
    #endif
            }
#endif

            return result;
        }
コード例 #11
0
ファイル: PageOK.xaml.cs プロジェクト: natufaith/haha
        async void emailClick(object sender, RoutedEventArgs e)
        {
            EasClientDeviceInformation CurrentDeviceInfor = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            Windows.ApplicationModel.Email.EmailMessage mail = new Windows.ApplicationModel.Email.EmailMessage();
            mail.Body = word;
            await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(mail);
        }
コード例 #12
0
         static public string getDeviceIDasString()
        {
            var deviceInformation = new EasClientDeviceInformation();

            //byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
            //string DeviceIDAsString = Convert.ToBase64String(myDeviceID);
            //  return DeviceIDAsString;
            return deviceInformation.Id.ToString();
        }
コード例 #13
0
ファイル: PiSystem.xaml.cs プロジェクト: D4rkF4ce/PiOs-UVA
 private void setSystemInfo()
 {
     EasClientDeviceInformation deviceInfo = new EasClientDeviceInformation();
     lblDeviceName.Text = deviceInfo.FriendlyName;
     lblOperatingSystem.Text = deviceInfo.OperatingSystem;
     lblDeviceType.Text = deviceInfo.SystemProductName;
     lblRootFolder.Text = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
     IPAddress ObjIPAddress = GetIPAddress();
     lblIpAdress.Text = ObjIPAddress.ToString();
 }
コード例 #14
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;
        }
コード例 #15
0
 private DeviceInfo()
 {
     Id = GetId();
     GUID = GetMachineId();
     var deviceInformation = new EasClientDeviceInformation();
     Model = deviceInformation.SystemProductName;
     Manufracturer = deviceInformation.SystemManufacturer;
     Name = deviceInformation.FriendlyName;
     OSName = deviceInformation.OperatingSystem;
 }
コード例 #16
0
ファイル: MainPage.xaml.cs プロジェクト: sumitkm/activities
        /// <summary>
        /// Constructor
        /// </summary>
        public MainPage()
        {
            InitializeComponent();
            this.NavigationCacheMode = NavigationCacheMode.Required;
            DataContext = ActivityData.Instance();

            // Using this method to detect if the application runs in the emulator or on a real device. Later the *Simulator API is used to read fake sense data on emulator. 
            // In production code you do not need this and in fact you should ensure that you do not include the Lumia.Sense.Test reference in your project.
            EasClientDeviceInformation x = new EasClientDeviceInformation();
            if( x.SystemProductName.StartsWith( "Virtual" ) )
            {
                _runningInEmulator = true;
            }

            Window.Current.VisibilityChanged += async ( sender, args ) =>
            {
                await CallSensorCoreApiAsync( async () =>
                {
                    if( !args.Visible )
                    {
                        // Application put to background, deactivate sensor and unregister change observer
                        if( _activityMonitor != null )
                        {
                            _activityMonitor.Enabled = true;
                            _activityMonitor.ReadingChanged -= activityMonitor_ReadingChanged;
                            await _activityMonitor.DeactivateAsync();
                        }
                    }
                    else
                    {
                        // Make sure all necessary settings are enabled in order to run SensorCore
                        await ValidateSettingsAsync();
                        // Make sure sensor is activated
                        if( _activityMonitor == null )
                        {
                            await InitializeSensorAsync();
                        }
                        else
                        {
                            await _activityMonitor.ActivateAsync();
                        }

                        // Enable change observer
                        _activityMonitor.ReadingChanged += activityMonitor_ReadingChanged;
                        _activityMonitor.Enabled = true;

                        // Update screen
                        await UpdateSummaryAsync();
                    }
                } );
            };
        }
コード例 #17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DeviceStatusService"/> class.
        /// </summary>
        public DeviceStatusService()
        {
            _easClientDeviceInformation = new EasClientDeviceInformation();
            _keyboardCapabilities = new KeyboardCapabilities();

#if WINDOWS_PHONE_APP
            Battery.GetDefault().RemainingChargePercentChanged += OnPowerChanged;
            PowerManager.PowerSavingModeChanged += OnPowerChanged;
#elif WINDOWS_UWP
            Battery.AggregateBattery.ReportUpdated += OnPowerChanged;
            PowerManager.EnergySaverStatusChanged += OnPowerChanged;
#endif
        }
コード例 #18
0
        async void email(object sender, RoutedEventArgs e)
        {
            EasClientDeviceInformation CurrentDeviceInfor = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
            String OSVersion         = CurrentDeviceInfor.OperatingSystem;
            String Manufacturer      = CurrentDeviceInfor.SystemManufacturer;
            String SystemProductName = CurrentDeviceInfor.SystemProductName;

            Windows.ApplicationModel.Email.EmailMessage mail = new Windows.ApplicationModel.Email.EmailMessage();
            mail.Subject = "[WP8.1]反馈" + appversion;
            mail.Body    = "\n\n\n生产厂商:" + Manufacturer + "\n系统名:" + SystemProductName + "\nOS版本:" + OSVersion;
            mail.To.Add(new Windows.ApplicationModel.Email.EmailRecipient("*****@*****.**", "Mukosame"));
            await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(mail);
        }
コード例 #19
0
        // Initialize the default starting properties. Should only be called once by MobileAppTracker.
        public Parameters(string advId, string advKey, byte[] bytes)
        {
            this.culture = new CultureInfo("en-US");

            this.advertiserId = advId;
            this.advertiserKey = advKey;

            this.localSettings = ApplicationData.Current.LocalSettings;

            this.urlEncrypter = new Encryption(advKey, IV);

            this.matResponse = null;

            // Default values
            this.AllowDuplicates = false;
            this.DebugMode = false;
            this.ExistingUser = false;
            this.AppAdTracking = true;
            this.Gender = MATGender.NONE;

            this.WindowsAid = AdvertisingManager.AdvertisingId;

            // Get app name asynchronously from appxmanifest
            this.AppName = GetAppName();

            var version = Package.Current.Id.Version;
            this.AppVersion = String.Format("{0}.{1}.{2}.{3}", version.Major, version.Minor, version.Build, version.Revision);

            this.PackageName = Package.Current.Id.Name;

            // Get device info
            EasClientDeviceInformation info = new EasClientDeviceInformation();

            this.DeviceBrand = info.SystemManufacturer.ToString();
            this.DeviceModel = info.SystemProductName.ToString();
            this.DeviceType = info.OperatingSystem.ToString(); //Windows or WindowsPhone

            // Get ASHWID
            this.ASHWID = BitConverter.ToString(bytes);

            // Check if we can restore existing MAT ID or should generate new one
            if (localSettings.Values.ContainsKey(SETTINGS_MATID_KEY))
            {
                this.MatId = (string)localSettings.Values[SETTINGS_MATID_KEY];
            }
            else // Don't have MAT ID, generate new guid
            {
                this.MatId = System.Guid.NewGuid().ToString();
                SaveLocalSetting(SETTINGS_MATID_KEY, this.MatId);
            }
        }
コード例 #20
0
 protected override Installation CreateInstallation(PushConfig pushConfig)
 {
     var deviceInformation = new EasClientDeviceInformation();
     var os = deviceInformation.OperatingSystem;
     var deviceType = deviceInformation.SystemProductName;
     var installation = new Installation
     {
         alias = pushConfig.Alias,
         operatingSystem = os,
         osVersion = deviceType,
         categories = pushConfig.Categories
     };
     return installation;
 }
コード例 #21
0
        public static RaygunEnvironmentMessage Build()
        {
            RaygunEnvironmentMessage message = new RaygunEnvironmentMessage();

              try
              {
            if (Window.Current != null)
            {
              message.WindowBoundsWidth = Window.Current.Bounds.Width;
              message.WindowBoundsHeight = Window.Current.Bounds.Height;

              var sensor = Windows.Devices.Sensors.SimpleOrientationSensor.GetDefault();

              if (sensor != null)
              {
            message.CurrentOrientation = sensor.GetCurrentOrientation().ToString();
              }
            }
              }
              catch (Exception ex)
              {
            Debug.WriteLine("Error retieving screen info: {0}", ex.Message);
              }

              try
              {
            DateTime now = DateTime.Now;
            message.UtcOffset = TimeZoneInfo.Local.GetUtcOffset(now).TotalHours;
            message.Locale = CultureInfo.CurrentCulture.DisplayName;
              }
              catch (Exception ex)
              {
            Debug.WriteLine("Error retieving time and locale: {0}", ex.Message);
              }

              try
              {
            var deviceInfo = new EasClientDeviceInformation();
            message.DeviceManufacturer = deviceInfo.SystemManufacturer;
            message.DeviceName = deviceInfo.SystemProductName;
            message.OSVersion = deviceInfo.OperatingSystem;
              }
              catch (Exception ex)
              {
            Debug.WriteLine("Error retieving device info: {0}", ex.Message);
              }

              return message;
        }
コード例 #22
0
        static JasilyDeviceInfo()
        {
#if WINDOWS_UWP

            EasClientDeviceInformation eas = new EasClientDeviceInformation();
            Manufacturer = eas.SystemManufacturer;
            DeviceModel = eas.SystemProductName;

#else

            Manufacturer = DefaultString;
            DeviceModel = DefaultString;

#endif
        }
コード例 #23
0
ファイル: DataClient.cs プロジェクト: peacecwz/Omubumu
        public DataClient()
        {
            Handler = new HttpClientHandler()
            {
                CookieContainer = Cookies,
                ClientCertificateOptions = ClientCertificateOption.Automatic
            };
            Client = new HttpClient(Handler);
            Client.BaseAddress = new Uri("http://omubumuapp.com/");

            EasClientDeviceInformation deviceInfo = new EasClientDeviceInformation();
            string userAgent = "FriendlyName={0};OperatingSystem={1};SystemManufacturer={2};SystemProductName={3};SystemSku={4};";
            userAgent = String.Format(userAgent, deviceInfo.FriendlyName, deviceInfo.OperatingSystem, deviceInfo.SystemManufacturer, deviceInfo.SystemProductName, deviceInfo.SystemSku);
            Client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", userAgent);
        }
コード例 #24
0
ファイル: HelpPage.xaml.cs プロジェクト: Mukosame/ChooseMe
        async void email(object sender, RoutedEventArgs e)
        {

            EasClientDeviceInformation CurrentDeviceInfor = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();
            String OSVersion = CurrentDeviceInfor.OperatingSystem;
            String Manufacturer = CurrentDeviceInfor.SystemManufacturer;
            String SystemProductName = CurrentDeviceInfor.SystemProductName;

            Windows.ApplicationModel.Email.EmailMessage mail = new Windows.ApplicationModel.Email.EmailMessage();
            mail.Subject = "[UWP-10]反馈-年会活动抽奖";
            mail.Body = "\n\n\n生产厂商:" + Manufacturer + "\n系统名:" + SystemProductName + "\nOS版本:" + OSVersion;
            mail.To.Add(new Windows.ApplicationModel.Email.EmailRecipient("*****@*****.**", "Mukosame"));
            await Windows.ApplicationModel.Email.EmailManager.ShowComposeNewEmailAsync(mail);

        }
 private void Launch_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         EasClientDeviceInformation CurrentDeviceInfor = new EasClientDeviceInformation();
         DeviceID.Text = CurrentDeviceInfor.Id.ToString();
         OperatingSystem.Text = CurrentDeviceInfor.OperatingSystem;
         FriendlyName.Text = CurrentDeviceInfor.FriendlyName;
         SystemManufacturer.Text = CurrentDeviceInfor.SystemManufacturer;
         SystemProductName.Text = CurrentDeviceInfor.SystemProductName;
         SystemSku.Text = CurrentDeviceInfor.SystemSku;
     }
     catch (Exception Error)
     {
         rootPage.NotifyUser(Error.Message, NotifyType.ErrorMessage);
     }
 }
コード例 #26
0
        public static ImageTestResultConnection GetDefaultImageTestResultConnection()
        {
            var result = new ImageTestResultConnection();

            // TODO: Check build number in environment variables
            result.BuildNumber = -1;

#if SILICONSTUDIO_PLATFORM_WINDOWS_DESKTOP
            result.Platform = "Windows";
            result.Serial = Environment.MachineName;
    #if SILICONSTUDIO_XENKO_GRAPHICS_API_DIRECT3D12
            result.DeviceName = "Direct3D12";
    #elif SILICONSTUDIO_XENKO_GRAPHICS_API_DIRECT3D11
            result.DeviceName = "Direct3D";
    #elif SILICONSTUDIO_XENKO_GRAPHICS_API_OPENGLES
            result.DeviceName = "OpenGLES";
    #elif SILICONSTUDIO_XENKO_GRAPHICS_API_OPENGL
            result.DeviceName = "OpenGL";
    #elif SILICONSTUDIO_XENKO_GRAPHICS_API_VULKAN
            result.DeviceName = "Vulkan";
    #endif
#elif SILICONSTUDIO_PLATFORM_ANDROID
            result.Platform = "Android";
            result.DeviceName = Android.OS.Build.Manufacturer + " " + Android.OS.Build.Model;
            result.Serial = Android.OS.Build.Serial ?? "Unknown";
#elif SILICONSTUDIO_PLATFORM_IOS
            result.Platform = "iOS";
            result.DeviceName = iOSDeviceType.Version.ToString();
            result.Serial = UIKit.UIDevice.CurrentDevice.Name;
#elif SILICONSTUDIO_PLATFORM_UWP
            result.Platform = "UWP";
            var deviceInfo = new EasClientDeviceInformation();
            result.DeviceName = deviceInfo.SystemManufacturer + " " + deviceInfo.SystemProductName;
            try
            {
                result.Serial = deviceInfo.Id.ToString();
            }
            catch (Exception)
            {
                // Ignored on UWP
            }
#endif

            return result;
        }
コード例 #27
0
ファイル: UtilUap.cs プロジェクト: adjust/windows_sdk
        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";
        }
 public Task<string> GenerateUserAgentHeaderAsync(bool isHybrid, string qualifier)
 {
     var appName = GetApplicationDisplayNameAsync().Result;
     var deviceInfo = AnalyticsInfo.VersionInfo.DeviceFamily + "/" + GetDeviceFamilyVersion(AnalyticsInfo.VersionInfo.DeviceFamilyVersion);
     var deviceModel = new EasClientDeviceInformation().SystemProductName;
     var deviceId = new EasClientDeviceInformation().Id;
     PackageVersion packageVersion = Package.Current.Id.Version;
     string packageVersionString = packageVersion.Major + "." + packageVersion.Minor + "." +
                                   packageVersion.Build;
     var appType = new StringBuilder(isHybrid ? "Hybrid" : "Native");
     if (!String.IsNullOrWhiteSpace(qualifier))
     {
         appType.Append(qualifier);
     }
     var UserAgentHeader = String.Format(UserAgentHeaderFormat, SdkVersion, deviceInfo, deviceModel,
     appName, packageVersionString, appType, deviceId);
     return Task.FromResult(UserAgentHeader);
 }
コード例 #29
0
        /// <summary>
        /// Get the Windows version number and processor architecture and cache it
        /// as a user agent string so it can be sent with HTTP requests.
        /// </summary>
        /// <returns>String containing formatted system parts of the user agent.</returns>
        public static string GetSystemUserAgent()
        {
            try
            {
                var info = new EasClientDeviceInformation();

                var parts = new[] {
                    "Windows Phone " + info.OperatingSystem,
                    "ARM",
                    "Touch",
                    info.SystemManufacturer,
                    info.SystemProductName
                };

                return "(" + String.Join("; ", parts.Where(e => !String.IsNullOrEmpty(e))) + ")";
            }
            catch
            {
                return "";
            }
        }
コード例 #30
0
ファイル: ExceptionHelper.cs プロジェクト: robUx4/vlc-winrt
        /// <summary>
        /// Checks if any exception has been saved for reporting, prompts the user for sending it and deletes it
        /// </summary>
        public static async Task ExceptionLogCheckup()
        {
            LogHelper.usedForRead = true;
            if (ApplicationSettingsHelper.Contains("ExceptionLog"))
            {
                var dialog = new MessageDialog(Strings.CrashReport, Strings.WeNeedYourHelp);
                dialog.Commands.Add(new UICommand(Strings.Yes, async command =>
                {
#if WINDOWS_PHONE_APP
                    EasClientDeviceInformation deviceInfo = new EasClientDeviceInformation();

                    var email = new EmailMessage();
                    email.To.Add(new EmailRecipient("*****@*****.**"));
                    email.Subject = String.Format("WP8.1 v{0} {1} ON {2}", AppVersion, deviceInfo.SystemManufacturer, deviceInfo.SystemProductName);
                    email.Body = ApplicationSettingsHelper.ReadResetSettingsValue("ExceptionLog").ToString();
                    email.Attachments.Add(new EmailAttachment(LogHelper.LogFile.Name, LogHelper.LogFile));

                    if (email.Body.Contains("GetAlbumUrl : AlbumURLWorkedViaVLC"))
                    {
                        email.Subject += " ARTCOVER";
                    }

                    await EmailManager.ShowComposeNewEmailAsync(email);
#else
                    string subject = Uri.EscapeDataString("VLC for Windows 8.1 v" + AppVersion);
                    string body = Uri.EscapeDataString(ApplicationSettingsHelper.ReadResetSettingsValue("ExceptionLog").ToString());

                    var uri = new Uri(String.Format("mailto:" + Strings.FeedbackMailAdress + "?subject={0}&body={1}", subject, body));
                    await Launcher.LaunchUriAsync(uri);
#endif
                }));
                dialog.Commands.Add(new UICommand(Strings.No, command =>
                {
                    ApplicationSettingsHelper.ReadResetSettingsValue("ExceptionLog");
                }));
                await dialog.ShowAsync();
            }
            LogHelper.usedForRead = false;
        }
コード例 #31
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

        }
コード例 #32
0
        public async Task<Model.RootObject_QuerySubmitResponse> SendQuery(string category, string mobileNo, string email, string fieldQuery, string placeholderQuery)// New Query
        {
            try
            {
                QueryResponse = new Model.RootObject_QuerySubmitResponse();
                if (UtilityClasses.Network.checkNetwork())
                {
                    if (UtilityClasses.MKValidations.isValidMobileNumber(mobileNo) && fieldQuery.Trim().Length > 0 && !fieldQuery.Equals(placeholderQuery))
                    {
                        var deviceInformation = new EasClientDeviceInformation();

                        String url = UtilityClasses.Network.URL_HOST_MOBIKWIK
                            + "sendSupport.do?ticket=new&category=" + category
                            + "&cell=" + mobileNumber
                            + "&email=" + email + "&clientId=" + deviceInformation.Id.ToString()
                            + "&issue=" + UtilityClasses.Network.encode(fieldQuery);

                        sc = new UtilityClasses.ServerCall();
                        string content = await sc.GetjsonStream(url);// uncomment after testing
                        //comment after testing
                        //var res = App.GetResourceStream(new Uri("ResponseFAQ_Chat.txt", UriKind.Relative));//comment after testing
                        //var content = new StreamReader(res.Stream).ReadToEnd().Trim();//comment after testing

                        QueryResponse = JsonConvert.DeserializeObject<Model.RootObject_QuerySubmitResponse>(content);

                    }
                }
            }
            catch (Exception ex)
            {
                //List<Parameter> Params = new List<Parameter>();
                //Params.Add(AccountFunctions.createParameter("Location", "ViewModel FAQ PastIssues"));
                //Params.Add(AccountFunctions.createParameter("Method", "SendQuery, Error:" + ex.Message));
                //FlurryWP8SDK.Api.LogEvent("FAQ Exception", Params);
            }
            return QueryResponse;
        }
        protected override string InternalGetDeviceModel()
        {
            var deviceInformation = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            return(deviceInformation.SystemProductName);
        }
コード例 #34
0
        private static WinHttpClient GetHttpClient()
        {
            var client = new WinHttpClient();

            var info = new EasClientDeviceInformation();
            var currentAssemblyName = typeof( HttpClient ).GetTypeInfo().Assembly.GetName();
            string userAgent = string.Format(
                UserAgentFormat,
                currentAssemblyName.Version.ToString( 2 ),
                info.OperatingSystem, info.SystemManufacturer, info.SystemProductName );

            client.DefaultRequestHeaders.UserAgent.ParseAdd( userAgent );

            return client;
        }
コード例 #35
0
ファイル: UtilUap.cs プロジェクト: adjust/windows_sdk
 public static string GetDeviceManufacturer(EasClientDeviceInformation deviceInfo)
 {
     return deviceInfo.SystemManufacturer;
 }
コード例 #36
0
ファイル: UtilUap.cs プロジェクト: adjust/windows_sdk
 public static string GetDeviceName(EasClientDeviceInformation deviceInfo)
 {
     return deviceInfo.SystemProductName;
 }
        public string GetDeviceModel()
        {
            var deviceInformation = new Windows.Security.ExchangeActiveSyncProvisioning.EasClientDeviceInformation();

            return(deviceInformation.SystemProductName);
        }