public override void LoadSettings() { base.SaveSettings(); cboLanguage.Items.Clear(); cboLanguage.Items.Add(Language.strLanguageDefault); foreach (var nativeName in SupportedCultures.CultureNativeNames) { cboLanguage.Items.Add(nativeName); } if (!string.IsNullOrEmpty(mRemoteNG.Settings.Default.OverrideUICulture) && SupportedCultures.IsNameSupported(mRemoteNG.Settings.Default.OverrideUICulture)) { cboLanguage.SelectedItem = SupportedCultures.get_CultureNativeName(mRemoteNG.Settings.Default.OverrideUICulture); } if (cboLanguage.SelectedIndex == -1) { cboLanguage.SelectedIndex = 0; } chkShowDescriptionTooltipsInTree.Checked = mRemoteNG.Settings.Default.ShowDescriptionTooltipsInTree; chkShowFullConnectionsFilePathInTitle.Checked = mRemoteNG.Settings.Default.ShowCompleteConsPathInTitle; chkShowSystemTrayIcon.Checked = mRemoteNG.Settings.Default.ShowSystemTrayIcon; chkMinimizeToSystemTray.Checked = mRemoteNG.Settings.Default.MinimizeToTray; }
private static void SetSupportedCulture() { if (mRemoteNG.Settings.Default.OverrideUICulture != "" && SupportedCultures.IsNameSupported(mRemoteNG.Settings.Default.OverrideUICulture)) { Thread.CurrentThread.CurrentUICulture = new CultureInfo(mRemoteNG.Settings.Default.OverrideUICulture); Logger.Instance.InfoFormat("Override Culture: {0}/{1}", Thread.CurrentThread.CurrentUICulture.Name, Thread.CurrentThread.CurrentUICulture.NativeName); } }
private void SetSupportedCulture() { if (mRemoteNG.Settings.Default.OverrideUICulture == "" || !SupportedCultures.IsNameSupported(mRemoteNG.Settings.Default.OverrideUICulture)) { return; } Thread.CurrentThread.CurrentUICulture = new CultureInfo(mRemoteNG.Settings.Default.OverrideUICulture); _messageCollector.AddMessage(MessageClass.InformationMsg, $"Override Culture: {Thread.CurrentThread.CurrentUICulture.Name}/{Thread.CurrentThread.CurrentUICulture.NativeName}", true); }