コード例 #1
0
        /// <summary>
        /// Triggers when a checkbox is toggled
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ConsoleCheckboxToggle(object sender, EventArgs e)
        {
            CustomCheckBox box = (sender as CustomCheckBox);

            box.StartRotate();

            if (box.Checked)
            {
                ConsoleTab.Enabled = false;
                console.Show();
            }
            else
            {
                ConsoleTab.Enabled = true;
                console.Hide();
            }

            MainTabControl.Refresh();

            Data.Save(new SaveData()
            {
                ConsolePopOut = box.Checked,
                SmallBlind    = smallBlind,
                StartingChips = startingChips,
                Players       = players
            });
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: StarOfDoom/RotMGScripts
        /// <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();
        }