Ejemplo n.º 1
0
        private void buttonSettings_Click(object sender, EventArgs e)
        {
            FrmSettings frmSettings = new FrmSettings(this);

            frmSettings.Show();
            Hide();
        }
Ejemplo n.º 2
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));
            }
        }