示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            player1name = textBoxPlayer1.Text;
            player2name = textBoxPlayer2.Text;

            OyunForm form1 = new OyunForm();

            form1.Show();
            this.Hide();
        }
示例#2
0
        private void MenuForm_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
            {
                Application.Exit();
            }
            else
            if (e.KeyCode == Keys.Enter)
            {
                player1name = textBoxPlayer1.Text;
                player2name = textBoxPlayer2.Text;

                OyunForm form1 = new OyunForm();
                form1.Show();
                this.Hide();
            }
        }