Пример #1
0
        private void setupScoringControls()
        {
            GroupScore gScore;

            if (group.GroupScore != null && group.GroupScore.CompetitionGroupType == DataManager.CurrentCompetition)
            {
                gScore = new GroupScore(group.GroupScore);
            }
            else
            {
                gScore = new GroupScore(DataManager.CurrentCompetition, group);
            }
            scores.Clear();
            scoringContents.Controls.Clear();
            foreach (Registrant r in gScore.getRegistrants())
            {
                Score          score = gScore.getScoreForRegistrant(r);
                ScoringControl sc    = new ScoringControl(ref score, r, this);
                sc.Dock = DockStyle.Top;
                scoringContents.Controls.Add(sc);
                scores.Add(r, sc);
                updateScore();
            }
            GroupScore = gScore;
        }
Пример #2
0
 public GroupScore(GroupScore gs)
 {
     CompetitionGroupType = gs.CompetitionGroupType;
     group = gs.group;
     foreach (KeyValuePair <Registrant, Score> kvp in gs.Scoring)
     {
         internalScoring.Add(kvp.Key, new Score(kvp.Value));
     }
 }