private void askForAnotherRound() { string winnerMessage = createWinnerMessage(); DialogResult userChoice = MessageBox.Show(winnerMessage, k_GameName, MessageBoxButtons.YesNo); if (userChoice == DialogResult.Yes) { newRound(); } else { m_FormGame.Close(); } }
public void Info() { FormGame.labelHrac1veHre.Content = Reds.Count; FormGame.labelHrac2veHre.Content = Blues.Count; FormGame.labelHrac1vyrazeno.Content = 12 - Reds.Count; FormGame.labelHrac2vyrazeno.Content = 12 - Blues.Count; if (Reds.Count == 0) { MessageBox.Show("Vyhrál modrý!!", "Výhra", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); MainWindow Lobby = new MainWindow(); Lobby.Show(); FormGame.Close(); } else if (Blues.Count == 0) { MessageBox.Show("Vyhrál červený!!", "Výhra", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); MainWindow Lobby = new MainWindow(); Lobby.Show(); FormGame.Close(); } }