/// <summary> /// Gets called when the active tab in the tab control is changed /// This is to notify the user controls of the change and make adjustments based on the change /// </summary> public void NotifyTabChanged(MainForm.Tabs oldTab, MainForm.Tabs newTab) { if (newTab == MainForm.Tabs.Vacancies) { ReloadContent(); } }
/// <summary> /// Gets called when the active tab in the tab control is changed /// This is to notify the user controls of the change and make adjustments based on the change /// </summary> public void NotifyTabChanged(MainForm.Tabs oldTab, MainForm.Tabs newTab) { if (newTab == MainForm.Tabs.Blacklist) { ReloadContent(); } }
/// <summary> /// Gets called when the active tab in the tab control is changed /// This is to notify the user controls of the change and make adjustments based on the change /// </summary> public void NotifyTabChanged(MainForm.Tabs oldTab, MainForm.Tabs newTab) { if (newTab == MainForm.Tabs.Settings) { ReloadContent(); } else if (oldTab == MainForm.Tabs.Settings) { // Ask if the user wants to save any unchanged settings if (ContentChanged()) { DialogResult dialogResult = MessageBox.Show(@"Do you want to save all unsaved settings?", @"Save changes", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { SaveChanges(); } } } }