/// <summary> /// Показывает форму команды и возвращает сведения о команде /// </summary> /// <returns>Сведения о команде или null</returns> Team GetNewTeam() { if (teamForm == null) { teamForm = new TeamForm(CurTurnir); SetTeamBounds(); } teamForm.Team = new Team { Number = (Byte)(lvCompetitors.Items.Count + 1) }; if (teamForm.ShowDialog(this) == DialogResult.OK) { return(teamForm.Team); } else { return(null); } }
private void mnuEditPlayer_Click(object sender, EventArgs e) { if (CurTurnir.IsPersonal()) { EditPlayer(); } else { ListViewItem lvi; lvi = lvCompetitors.SelectedItems[0]; Team team = (Team)lvi.Tag; if (teamForm != null) { teamForm.Team = team; } else { teamForm = new TeamForm(team, CurTurnir); SetTeamBounds(); } teamForm.ShowDialog(this); lvi.SubItems[1].Text = team.Name; } }