Exemplo n.º 1
0
 private void startTimedGameButton_Click(object sender, RoutedEventArgs e)
 {
     try {
         game = new gameWindow(playerNameTimed.Text, null, 0, "Timed");
         App.bgMusic.Stop();
         game.Show();
         this.Close();
     } catch (Exception ex) {
         MessageBox.Show(ex.Message, "StartTimedGame");
     }
 }
Exemplo n.º 2
0
 private void startPvPGameButton_Click(object sender, RoutedEventArgs e)
 {
     try {
         game = new gameWindow(player1Name.Text, player2Name.Text, (int)pointsSlider.Value, "PvP");
         App.bgMusic.Stop();
         game.Show();
         this.Close();
     } catch (Exception ex) {
         MessageBox.Show(ex.Message, "StartPvPGame");
     }
 }