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"); } }
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"); } }