private void handleNextRound(DialogResult i_AnotherRound) { if (i_AnotherRound == DialogResult.Yes) { this.Hide(); FormGame formGame = new FormGame(new GameLogic(m_GameLogic.RowsNumber, m_GameLogic.ColsNumber, m_GameLogic.Player1, m_GameLogic.Player2)); formGame.ShowDialog(); this.Dispose(); } else { Application.Exit(); } }
private void buttonStart_Click(object sender, EventArgs e) { if (textBoxPlayer1.Text == string.Empty || textBoxPlayer2.Text == string.Empty) { MessageBox.Show("Please fill the players names!"); } else { setPlayers(); setBoardSize(); this.Hide(); FormGame formGame = new FormGame(new GameLogic(m_BoardLength, m_BoardWidth, m_Player1, m_Player2)); formGame.ShowDialog(); this.Dispose(); } }