Exemplo n.º 1
0
        internal void Run()
        {
            DialogResult createFormGame = m_StartGameForm.ShowDialog();

            if (createFormGame != DialogResult.Cancel)
            {
                m_GameBoardForm = new GameBoardForm(m_StartGameForm.GetNumberOfChances);
                m_GameBoardForm.ShowDialog();
            }
        }
Exemplo n.º 2
0
 private void m_ButtonStart_Click(object sender, EventArgs e)
 {
     try
     {
         m_Player1.Name = TextBoxPlayer1Name.Text;
         m_Player2.Name = (m_Player2.Type == ePlayerTypes.Person) ? TextBoxPlayer2Name.Text : k_DefaultPlayer2Name;
         m_Board.Size   = (byte)NumericCols.Value; // Rows == Cols
         this.Visible   = false;
         GameBoardForm gameBoardForm = new GameBoardForm(m_Player1, m_Player2, m_Board);
         gameBoardForm.ShowDialog();
     }
     catch (Exception ex)
     { // We are verifying all values on the fly, so we souldn't get any exception here!
         showErrorMessage(ex.Message);
     }
     finally
     {
         closeApplication();
     }
 }