예제 #1
0
 /// <summary>
 /// Move to the next question
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnNext_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (!currentGame.GameOver)
         {
             // The game is not yet over go to the next round
             currentRound = currentGame.GetCurrentRoundInfo();
             UpdateDisplay();
             tbkResult.Visibility = Visibility.Hidden;
             btnSubmit.IsEnabled  = true;
             btnNext.IsEnabled    = false;
             btnSubmit.IsDefault  = true;
             txtUserAnswer.Text   = "";
         }
         else
         {
             // The game is over go to the score screen
             HighScoreWindow highScoreWind = new HighScoreWindow(mainMenu);
             highScoreWind.Show();
             this.Close();
         }
     }
     catch (Exception ex)
     {
         ex.Log();
     }
 }
예제 #2
0
 /// <summary>
 /// Open the high score menu
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnScore_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         this.Hide();
         HighScoreWindow highScoreWindow = new HighScoreWindow(this);
         highScoreWindow.Show();
     }
     catch (Exception ex)
     {
         ex.Log();
     }
 }