private void updateTournamentInfo(Tournament tournament) { if (tournament != null) { tournament.setup(); lTournament.Text = tournament.getName(); lType.Text = tournament.getTypeLabel(); lSections.Text = tournament.getSectionsNum(); lTables.Text = tournament.getTablesNum(); if (tournament.GetType().Equals(typeof(TeamyTournament))) { lSkok.Visible = true; numTeamsTableOffset.Visible = true; bTeamsNamesSettings.Visible = true; teamNames = new TeamNamesSettings(); teamNames.initTournament((TeamyTournament)tournament, this); bTeamsNamesSettings.Text = teamNames.getLabel(); cbNamesSection.Items.Remove("*"); string sectionForTournament = bws.detectTeamySection(tournament.getName()); if (sectionForTournament != null) { cbNamesSection.SelectedItem = sectionForTournament; } else { cbNamesSection.SelectedItem = cbNamesSection.Items[0]; } } else { lSkok.Visible = false; numTeamsTableOffset.Visible = false; bTeamsNamesSettings.Visible = false; cbNamesSection.SelectedIndex = 0; } syncToolStrip.Visible = true; namesPanel.Visible = true; tournament.clearCellLocks(namesGridView); tournament.displayNameList(namesGridView); tournament.clearCellLocks(namesGridView); } else { lSkok.Visible = false; numTeamsTableOffset.Visible = false; } }