Пример #1
0
        private void startButton_Click(object sender, EventArgs e)
        {
            Board          board = new Board(numberOfChances);
            List <GameRow> Rows  = new List <GameRow>();

            for (int i = 0; i < board.NumRows; i++)
            {
                GameRow row = new GameRow((82 + 52 * i), i);
                Rows.Add(row);
            }
            GameButtons gameButtons = new GameButtons(Rows);
            GameForm    gameForm    = new GameForm(gameButtons, board);

            foreach (GameRow row in gameForm.m_GameButtons.m_GameRows)
            {
                row.m_Game     = gameButtons;
                row.m_GameForm = gameForm;
            }
            gameForm.Owner = this;
            this.Hide();
            gameForm.ShowDialog();
        }