/// <summary> /// Handles the Click event of the btnNewTeam control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void btnNewTeam_Click(object sender, EventArgs e) { CreateTeamForm teamForm = new CreateTeamForm(Database); teamForm.ShowDialog(this); // Reload teams for possible new team / updated team cbxTeams.Items.Clear(); LoadTeams(); }
/// <summary> /// Shows the form to create a new team. /// </summary> /// <returns>The <see cref="DialogResult"/> of the form.</returns> private DialogResult ShowCreateTeamForm() { CreateTeamForm createForm = new CreateTeamForm(database, true); DialogResult result = createForm.ShowDialog(this); // Set the team, that was recently updated / created recentlyUpdatedTeam = createForm.UpdatedTeam; return result; }