コード例 #1
0
ファイル: MainView.cs プロジェクト: avodhel/later-list
 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);
 }
コード例 #2
0
ファイル: SettingsForm.cs プロジェクト: avodhel/later-list
        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;
                }
            }
        }