private void SetProperties() { this.mImgSettings.ToolTip = (object)LocaleStrings.GetLocalizedString("STRING_MANAGE_NOTIFICATION", ""); this.mImgMute.ToolTip = (object)LocaleStrings.GetLocalizedString("STRING_MUTE_NOTIFICATION_TOOLTIP", ""); this.mImgDismiss.ToolTip = (object)LocaleStrings.GetLocalizedString("STRING_DISMISS_TOOLTIP", ""); this.mLbl1Hour.Text = LocaleStrings.GetLocalizedString("STRING_HOUR", ""); this.mLbl1Day.Text = LocaleStrings.GetLocalizedString("STRING_DAY", ""); this.mLbl1Week.Text = LocaleStrings.GetLocalizedString("STRING_WEEK", ""); this.mLblForever.Text = LocaleStrings.GetLocalizedString("STRING_FOREVER", ""); }
public void ShowWindow() { string path1 = Path.Combine(RegistryManager.Instance.UserDefinedDir, "Client\\Helper"); this.mMuteButton.ImageName = Path.Combine(path1, "mute2.png"); this.mCloseButton.ImageName = Path.Combine(path1, "close.png"); this.mMuteButton.ToolTip = (object)LocaleStrings.GetLocalizedString("STRING_MUTE_NOTIFICATION_TOOLTIP", ""); this.mCloseButton.ToolTip = (object)LocaleStrings.GetLocalizedString("STRING_CLOSE", ""); this.Show(); }
public static string GetThemeName(string themeName) { try { if (File.Exists(BlueStacksUIColorManager.GetThemeFilePath(themeName))) { return(LocaleStrings.GetLocalizedString(BluestacksUIColor.Load(BlueStacksUIColorManager.GetThemeFilePath(themeName)).DictThemeAvailable["ThemeDisplayName"], "")); } throw new Exception("Theme file not found exception " + themeName); } catch (Exception ex) { Logger.Warning("Error checking for theme availability in Theme file " + themeName + Environment.NewLine + ex.ToString()); return(""); } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null || parameter == null) { return(Binding.DoNothing); } string[] strArray = parameter.ToString().Split('|'); if (strArray.Length != 2) { return(Binding.DoNothing); } flag = false; if (!(value is bool flag) && value is bool?nullable) { flag = nullable.HasValue && nullable.Value; } return(!flag ? (object)LocaleStrings.GetLocalizedString(strArray[1], "") : (object)LocaleStrings.GetLocalizedString(strArray[0], "")); }
private void BuildResolutionsList() { int width; int height; Utils.GetWindowWidthAndHeight(out width, out height); ObservableCollection <ResolutionModel> observableCollection = new ObservableCollection <ResolutionModel>(); observableCollection.Add(new ResolutionModel() { OrientationType = OrientationType.Landscape, OrientationName = LocaleStrings.GetLocalizedString("STRING_ORIENTATION_LANDSCAPE", ""), AvailableResolutionsDict = new Dictionary <string, string>() { { "960 x 540", "960 x 540" }, { "1280 x 720", "1280 x 720" }, { "1600 x 900", "1600 x 900" }, { "1920 x 1080", "1920 x 1080" }, { "2560 x 1440", "2560 x 1440" } }, CombinedResolution = string.Format("{0} x {1}", (object)width, (object)height), SystemDefaultResolution = string.Format("{0} x {1}", (object)width, (object)height) }); observableCollection.Add(new ResolutionModel() { OrientationType = OrientationType.Portrait, OrientationName = LocaleStrings.GetLocalizedString("STRING_ORIENTATION_PORTRAIT", ""), AvailableResolutionsDict = new Dictionary <string, string>() { { "960 x 540", "540 x 960" }, { "1280 x 720", "720 x 1280" }, { "1600 x 900", "900 x 1600" }, { "1920 x 1080", "1080 x 1920" }, { "2560 x 1440", "1440 x 2560" } }, CombinedResolution = string.Format("{0} x {1}", (object)width, (object)height), SystemDefaultResolution = string.Format("{0} x {1}", (object)height, (object)width) }); observableCollection.Add(new ResolutionModel() { OrientationType = OrientationType.Custom, OrientationName = LocaleStrings.GetLocalizedString("STRING_CUSTOM1", ""), AvailableResolutionsDict = new Dictionary <string, string>(), CombinedResolution = string.Format("{0} x {1}", (object)width, (object)height), SystemDefaultResolution = string.Format("{0} x {1}", (object)width, (object)height) }); this.ResolutionsList = observableCollection; }
public void SettingsBtn_Click(object sender, RoutedEventArgs e) { CustomSettingsButton customSettingsButton = (CustomSettingsButton)sender; if (customSettingsButton == null) { return; } customSettingsButton.IsSelected = true; UserControl control = this.SettingsWindowControlsDict[customSettingsButton.Name]; Logger.Info("Clicked {0} button", (object)customSettingsButton.Name); this.BringToFront(control); if (customSettingsButton.Name.Equals("STRING_SHORTCUT_KEY_SETTINGS", StringComparison.OrdinalIgnoreCase)) { Stats.SendMiscellaneousStatsAsync("KeyboardShortcuts", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "shortcut_open", (string)null, (string)null, (string)null, (string)null, (string)null, "Android", 0); } else { Stats.SendMiscellaneousStatsAsync("settings", RegistryManager.Instance.UserGuid, LocaleStrings.GetLocalizedString(customSettingsButton.Name, ""), "MouseClick", RegistryManager.Instance.ClientVersion, Oem.Instance.OEM, (string)null, (string)null, (string)null, "Android", 0); } }
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { return(values == null ? (object)string.Empty : (object)LocaleStrings.GetLocalizedString(values[0].ToString(), "")); }
public static string AssignErrorStringForInstallerExitCodes( int mInstallFailedErrorCode, string prefixKey) { string str1 = LocaleStrings.GetLocalizedString(prefixKey, ""); string str2 = ((InstallerCodes)mInstallFailedErrorCode).ToString(); string str3 = string.Empty; bool flag = true; if (prefixKey != "STRING_ROLLBACK_FAILED_SORRY_MESSAGE") { switch (mInstallFailedErrorCode) { case -59: case -58: str3 = string.Format((IFormatProvider)CultureInfo.InvariantCulture, "{0}\n{1}", (object)LocaleStrings.GetLocalizedString("STRING_OLD_INSTALLATION_INTERFERING", ""), (object)LocaleStrings.GetLocalizedString("STRING_TRY_RESTARTING_MACHINE", "")); break; case -55: case -54: case -53: case -52: str3 = LocaleStrings.GetLocalizedString("STRING_COULDNT_RESTORE_UNUSABLE", ""); break; case -51: case -49: case -43: case -42: case -41: case -40: case -39: case -38: case -37: case -36: case -35: case -33: str3 = LocaleStrings.GetLocalizedString("STRING_ERROR_OCCURED_DEPLOYING_FILES", ""); break; case -46: case -45: case -44: case -32: str3 = LocaleStrings.GetLocalizedString("STRING_FAILED_TO_RESTORE_OLD_DATA", ""); break; case -30: str3 = LocaleStrings.GetLocalizedString("STRING_OLD_INSTALLATION_INTERFERING", ""); break; case -19: str3 = LocaleStrings.GetLocalizedString("STRING_HYPERV_DISABLED_WARNING", ""); flag = false; str1 = string.Empty; break; case -18: str3 = LocaleStrings.GetLocalizedString("STRING_HYPERV_INSTALLER_WARNING", ""); flag = false; str1 = string.Empty; break; case -17: str3 = LocaleStrings.GetLocalizedString("STRING_DISABLED_VT", ""); flag = false; str1 = string.Empty; break; case -14: str3 = string.Format((IFormatProvider)CultureInfo.InvariantCulture, "{0} {1}", (object)LocaleStrings.GetLocalizedString("STRING_INSUFFICIENT_DISKSPACE", ""), (object)string.Format((IFormatProvider)CultureInfo.InvariantCulture, "{0}GB", (object)5L)); break; default: string id = "STRING_" + str2; str3 = LocaleStrings.GetLocalizedString(id, ""); if (str3.Equals(id, StringComparison.InvariantCultureIgnoreCase)) { str3 = LocaleStrings.GetLocalizedString("STRING_ERROR_OCCURED_DEPLOYING_FILES", ""); break; } break; } } if (Enumerable.Range(-30, 20).Contains <int>(mInstallFailedErrorCode) & flag) { str3 = string.Format((IFormatProvider)CultureInfo.InvariantCulture, "{0} {1}", (object)LocaleStrings.GetLocalizedString("STRING_PREINSTALL_FAIL", ""), (object)str3); } return(string.Format((IFormatProvider)CultureInfo.InvariantCulture, "{0}\n{1}\n\n{2} {3}", (object)str1, (object)str3, (object)LocaleStrings.GetLocalizedString("STRING_ERROR_CODE_COLON", ""), (object)str2).TrimStart('\n')); }