/// <summary> /// Toggles whether the tabs are enabled, given foundGame /// </summary> private void ToggleTabs() { //If the active tab isn't the Debugging tab or the Main tab, set the active tab to the Main tab if (MainTabControl.SelectedTab != MainTab && MainTabControl.SelectedTab != DebuggingTab) { MainTabControl.ForceTabSwitch(MainTab); } //Run through each tab and set it to Data.foundGame unless it's the Main or Debugging tab, //As those are always active foreach (TabPage tab in MainTabControl.TabPages) { if (tab != MainTab && tab != DebuggingTab) { tab.Enabled = Info.foundGame; } } MainTabControl.Refresh(); }