private void btnNewRoundHand_Click(object sender, RoutedEventArgs e)
{
if (!this.tournament.IsLastRoundEnded())
{
new PMW(StringTable.MainWindow_LastRoundNotEnd);
return;
}
if (this.tournament.Rounds.Count == 0) this.tournament.GenerateAllGames();
CreateRoundWindow wnd = new CreateRoundWindow(this.tournament.AllGames, (this.tournament.PointsTable.Where(p => p.Active == true).Count() + 1) / 2);
if (wnd.ShowDialog() == true)
{
foreach (Round ctrl in this.tabRound.Items)
{
ctrl.ScoreEnabled = false;
}
this.tournament.AddRound(wnd.Round);
this.tabRound.SelectedIndex = this.tabRound.Items.Count - 1;
}
}