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; }
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)); } }