示例#1
0
 private void RestartGameClick(object sender, RoutedEventArgs e)
 {
     t.Stop();
     this.DisplayGame();
     menuPopup.IsOpen = false;
     gameClock        = new GameClock();
     gameClock.Start();
     t.Start();
 }
示例#2
0
        private void LevelClick(object sender, RoutedEventArgs e)
        {
            Button b     = (Button)sender;
            string level = b.Content.ToString();

            if (level.Equals("HARD"))
            {
                game.StartGame(Game.Difficulty.HARD);
            }
            else if (level.Equals("MEDIUM"))
            {
                game.StartGame(Game.Difficulty.MEDIUM);
            }
            else
            {
                game.StartGame(Game.Difficulty.EASY);
            }

            levelPopup.IsOpen = false;
            this.DisplayGame();
            gameClock.Start();
            t.Start();
        }