static void Main(string[] args) { Console.CursorVisible = false; Menu menu = new Menu(); menu.MainMenu(); Console.WindowHeight = Menu.screenheight; Console.WindowWidth = Menu.screenwidth; }
/* * Method for loading the menu: * - Instanciate/attach the menu. * - Define event handlers. * */ private void LoadMenu() { _Menu = new Menu(); this.gameBoardPictureBox.Controls.Add(_Menu); _Menu.MainMenu(); _Menu.playPictureBox.Click += new EventHandler(playPictureBox_Click); _Menu.retryPictureBox.Click += new EventHandler(retryPictureBox_Click); _Menu.mainMenuPictureBox.Click += new EventHandler(mainMenuPictureBox_Click); _Menu.multiplayerPictureBox.Click += new EventHandler(multiplayerPictureBox_Click); _Menu.highScoresPictureBox.Click += new EventHandler(highScoresPictureBox_Click); _Menu.backPictureBox.Click += new EventHandler(backPictureBox_Click); _Menu.createGamePictureBox.Click += new EventHandler(createGamePictureBox_Click); _Menu.joinGamePictureBox.Click += new EventHandler(joinGamePictureBox_Click); _Menu.okPictureBox.Click += new EventHandler(okPictureBox_Click); _Menu.startGamePictureBox.Click += new EventHandler(startGamePictureBox_Click); }