Example #1
0
        private void buttonSettings_Click(object sender, EventArgs e)
        {
            FrmSettings frmSettings = new FrmSettings(this);

            frmSettings.Show();
            Hide();
        }
        // go back to settings
        private void button_back_Click(object sender, EventArgs e)
        {
            Hide();
            FrmSettings frmSettings = new FrmSettings();

            frmSettings.ShowDialog();
            Close();
        }
Example #3
0
        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
            case (Keys.Shift | Keys.N):
                FrmPlaygame frmPlaygame = new FrmPlaygame(userName);
                frmPlaygame.Show();
                Hide();
                return(true);

            case (Keys.Shift | Keys.R):
                if (btnViewRuleBook.Text.StartsWith("View", true, null))
                {
                    picRulebook.Visible  = true;
                    btnViewRuleBook.Text = "Close Rule Book";
                }
                else
                {
                    picRulebook.Visible  = false;
                    btnViewRuleBook.Text = "View Rule Book";
                }
                return(true);

            case (Keys.Shift | Keys.S):
                FrmSettings frmSettings = new FrmSettings(this);
                frmSettings.Show();
                Hide();
                return(true);

            case (Keys.Shift | Keys.Q):
                Application.Exit();
                return(true);

            default:
                return(base.ProcessCmdKey(ref msg, keyData));
            }
        }