コード例 #1
0
        private void buttonPlay_Click(object sender, EventArgs e)
        {
            this.Hide();

            if (textBoxPlayer1.Text == string.Empty)
            {
                textBoxPlayer1.Text = "Player 1";
            }

            if (textBoxPlayer2.Text == string.Empty)
            {
                textBoxPlayer2.Text = "Player 2";
            }

            if (!checkBox1VsPc.Checked)
            {
                textBoxPlayer2.Text = "Computer";
            }

            FourInARowForm fourInARowForm = new FourInARowForm(this);

            fourInARowForm.ShowDialog();

            this.Close();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: GeertBellekens/FourInARow
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var game = new FourInARowGame(true);
            var form = new FourInARowForm(game);

            Application.Run(form);
        }