public void LoadTheme() { ThemeController.RegisterForm(mainForm); ThemeController.RegisterGroupBox(mainForm.ListOperationsGB); ThemeController.RegisterTextBox(mainForm.NameTextBox); ThemeController.RegisterTextBox(mainForm.AuthorTextBox); ThemeController.RegisterComboBox(mainForm.GenreComboBox); ThemeController.RegisterListView(mainForm.MovieListView); ThemeController.RegisterListView(mainForm.SerieListView); ThemeController.RegisterListView(mainForm.BookListView); ThemeController.RegisterButton(mainForm.ClearButton); ThemeController.RegisterButton(mainForm.AddButton); ThemeController.RegisterButton(mainForm.RemoveButton); ThemeController.RegisterButton(mainForm.EditButton); ThemeController.RegisterButton(mainForm.SaveButton); ThemeController.RegisterButton(mainForm.DiscardButton); ThemeController.CurrrentTheme(settingsForm); }
private void SettingsFormClosing(object sender, FormClosingEventArgs e) { if (SaveSettingsButton.Enabled) { DialogResult confirm = MessageBox.Show("Unsaved settings will be lost. Continue?", "Exit", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (confirm == DialogResult.OK) { sViewHandler.SaveSettingsButtonDeactive(); GetAllFilePathsFromProperties(); ThemeController.CurrrentTheme(this); } else if (confirm == DialogResult.Cancel) { e.Cancel = true; } } }