/// <summary>
        /// Creates a new instance of the frmTournamentRound form.
        /// </summary>
        /// <param name="round">The TournamentRound to display on this form.</param>
        /// <param name="roundNumber">The round number to display on this form.</param>
        /// <param name="revisionMode">If true, the round is in Revision Mode.</param>
        public frmTournamentRound(TournamentRound round, int roundNumber, bool revisionMode = false)
        {
            InitializeComponent();

            ThisRound = round;
            RoundNumber = roundNumber;
            RevisionMode = revisionMode;

            Text = round.TournamentName + " -- Round " + roundNumber;
            int matchNumber = Config.Settings.GetTournament(round.TournamentName).TableNumbering == TableNumbering.Even ? 2 : 1;
            int openMatches = 0;
            foreach (TournamentMatch match in ThisRound.Matches)
            {
                var matchControl = new ctlTournamentMatch(match, matchNumber);
                matchNumber += Config.Settings.GetTournament(round.TournamentName).TableNumbering == TableNumbering.Normal ? 1 : 2; 
                matchControl.MatchLockChanged += MatchControl_MatchLockChanged;
                if (match.Results.Count > 0) matchControl.LockScores();
                if (!matchControl.ScoresLocked) openMatches++;
                pnlMatches.Controls.Add(matchControl);
            }
            if (RevisionMode)
            {
                lblMatches.Text = "Viewing and Editing Round " + roundNumber;
                mnuOptions.Visible = false;
            }
            else
                lblMatchesLeft.Text = openMatches.ToString();
        }
 public void UpdateMatch(ctlTournamentMatch match, string player1VP, string player2VP)
 {
     foreach (ctlTournamentMatch matchCtl in pnlMatches.Controls)
     {
         if (matchCtl.Player1ID == match.Player1ID && matchCtl.Player2ID == match.Player2ID)
         {
             if (player1VP != "F")
                 matchCtl.Player1VictoryPoints = Convert.ToInt32(player1VP);
             else
                 matchCtl.Player1Forfeit = true;
             if (player2VP != "F")
                 matchCtl.Player2VictoryPoints = Convert.ToInt32(player2VP);
             else
                 matchCtl.Player2Forfeit = true;
             matchCtl.LockScores();
             UpdateForm();
             break;
         }
     }
 }