void IVisualizationActor.SetOrClearPreviousCompetitorRun(CompetitionRunResult?competitorRunResult) { if (competitorRunResult != null) { prevCompetitorNumberLabel.Text = TextFormatting.FormatCompetitorNumber(competitorRunResult.Competitor.Number); prevTimeLabel.Text = TextFormatting.FormatTime(competitorRunResult.Timings?.FinishTime?.ElapsedSince(competitorRunResult.Timings.StartTime).TimeValue); prevFaultsValueLabel.Text = TextFormatting.FormatNumber(competitorRunResult.FaultCount, 2); prevRefusalsValueLabel.Text = TextFormatting.FormatNumber(competitorRunResult.RefusalCount, 2); Color foreColor = competitorRunResult.IsEliminated ? RunHistoryLine.EliminationColor : SystemColors.ControlText; prevTimeLabel.ForeColor = foreColor; prevPlacementLabel.ForeColor = foreColor; prevPlacementLabel.Text = competitorRunResult.IsEliminated ? "X" : TextFormatting.FormatPlacement(competitorRunResult.Placement); } else { prevCompetitorNumberLabel.Text = string.Empty; prevTimeLabel.Text = string.Empty; prevFaultsValueLabel.Text = string.Empty; prevRefusalsValueLabel.Text = string.Empty; prevPlacementLabel.Text = string.Empty; } }
private void DisplayRefreshTimer_Tick(object?sender, EventArgs e) { if (startTime != null) { TimeSpan timePassed = SystemContext.UtcNow() - startTime.Value; primaryTimeLabel.Text = TextFormatting.FormatTime(timePassed); } }
void IVisualizationActor.StopAndSetOrClearPrimaryTime(TimeSpan?time) { StopPrimaryTimer(); primaryTimeLabel.Text = time != null?TextFormatting.FormatTime(time.Value) : string.Empty; }