void OptionsPanel.initialize() { showInTaskBar.Checked = Options.ShowInTaskBar; autoStart.Checked = Options.AutoStart; hideWhenStarted.Checked = Options.HideAfterStart; // Restore previously set locale languageSelector.Items.Add("English"); languageSelector.SelectedIndex = 0; // Update UI according to the current locale OptionsDialog.updateUI(); modified = false; }
void OptionsPanel.apply() { if (modified) { Options.ShowInTaskBar = showInTaskBar.Checked; Options.AutoStart = autoStart.Checked; Options.HideAfterStart = hideWhenStarted.Checked; // Save locale // Options.AppLocale = ... // Apply locale // Thread.CurrentThread.CurrentUICulture = Options.englishCulture; // Update UI according to the current locale OptionsDialog.updateUI(); modified = false; } }