private void btnEditRounds_Click(object sender, EventArgs e)
        {
            if (EditRoundForm != null)
            {
                EditRoundForm.WindowState = FormWindowState.Normal;
                EditRoundForm.Focus();
                return;
            }

            var tournament = Config.Settings.GetTournament(TournamentName);
            var completedRounds = tournament.Rounds.Count;
            if (!tournament.Rounds[completedRounds - 1].Completed) completedRounds--;
            if (completedRounds == 0) return;

            int roundNum;
            using (var getRoundNum = new frmGetRoundToEdit(completedRounds))
            {
                if (getRoundNum.ShowDialog() == DialogResult.Cancel) return;
                roundNum = getRoundNum.SelectedRound;
            }

            var round = Config.Settings.GetTournament(TournamentName).Rounds[roundNum - 1];

            EditRoundForm = new frmTournamentRound(round, roundNum, true) { MdiParent = MdiParent };
            EditRoundForm.FormClosing += EditRoundForm_FormClosing;
            EditRoundForm.FormClosed += EditRoundForm_FormClosed;
            EditRoundForm.Show();
            SetRoundButton();
        }
        private void btnRound_Click(object sender, EventArgs e)
        {
            if (RoundForm != null)
            {
                RoundForm.WindowState = FormWindowState.Normal;
                RoundForm.Focus();
                return;
            }

            TournamentRound round;
            int roundNum = Config.Settings.GetTournament(TournamentName).Rounds.Count;
            if (roundNum == 0 ||
                Config.Settings.GetTournament(TournamentName).Rounds[roundNum - 1].Completed)
            {
                round = Config.Settings.GetTournament(TournamentName).GenerateNextRound();
                Config.Settings.SaveEvents();
                roundNum++;
                if (!chkOpenRound.Checked)
                {
                    SetRoundButton();
                    return;
                }
            }
            else
                round = Config.Settings.GetTournament(TournamentName).Rounds[roundNum - 1];

            RoundForm = new frmTournamentRound(round, roundNum, false) { MdiParent = MdiParent };
            RoundForm.FormClosing += RoundForm_FormClosing;
            RoundForm.FormClosed += RoundForm_FormClosed;
            RoundForm.Show();
            SetRoundButton();
        }