public TablesWindow(Tournament t, Turn si, TurnsWindow turnsWindow) { InitializeComponent(); this.tournament = t; this.turn = si; this.turnsWindow = turnsWindow; cbx1.ItemsSource = this.turn.getListTables(); }
private void btnOk_Click(object sender, RoutedEventArgs e) { this.name = txbName.Text; this.address = txbAddress.Text; this.game = cmBoxGame.Text; this.date = dpkData.DisplayDate; this.teams = (bool)chb1.IsChecked; this.tournament = new Tournament(this.name, this.game, this.address, this.date, this.teams, this.listPlayers.ToList <Player>()); bool b = SingletonDBMS.GetInstance().InsertTournament(this.tournament); TurnsWindow win = new TurnsWindow(this.tournament, this); win.Show(); this.Hide(); }