public void PopulateScoreInput(Score score, int judgeIndex, int diverIndex = -1, int roundIndex = -1) { if (diverIndex == -1) { diverIndex = CurrentDiverIndex; } if (roundIndex == -1) { roundIndex = CurrentRoundIndex; } Panel divePanel = _divePanels[roundIndex][diverIndex]; if (divePanel.InvokeRequired) { PopulateScoreInputDelegate d = new PopulateScoreInputDelegate(PopulateScoreInput); this.Invoke(d, new object[] { score, judgeIndex, diverIndex, roundIndex }); return; } TextBox scoreInput = (TextBox)divePanel.Controls.Find("Score", true)[judgeIndex]; scoreInput.Text = score.Points.ToString(); scoreInput.Tag = score; }
public void PopulateScoreInput(Score score, int judgeIndex, int diverIndex = -1, int roundIndex = -1) { if (diverIndex == -1) diverIndex = CurrentDiverIndex; if (roundIndex == -1) roundIndex = CurrentRoundIndex; Panel divePanel = _divePanels[roundIndex][diverIndex]; if (divePanel.InvokeRequired) { PopulateScoreInputDelegate d = new PopulateScoreInputDelegate(PopulateScoreInput); this.Invoke(d, new object[] {score, judgeIndex, diverIndex, roundIndex}); return; } TextBox scoreInput = (TextBox)divePanel.Controls.Find("Score", true)[judgeIndex]; scoreInput.Text = score.Points.ToString(); scoreInput.Tag = score; }