void IVisualizationActor.SetOrClearPreviousCompetitorRun(CompetitionRunResult?competitorRunResult) { if (competitorRunResult != null) { prevCompetitorNumberLabel.Text = TextFormatting.FormatCompetitorNumber(competitorRunResult.Competitor.Number); prevHandlerNameLabel.Text = competitorRunResult.Competitor.HandlerName; prevDogNameLabel.Text = competitorRunResult.Competitor.DogName; 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; prevHandlerNameLabel.Text = string.Empty; prevDogNameLabel.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.SetOrClearSecondaryTime(TimeSpan?time, bool doBlink) { secondaryTimeLabel.Text = time != null?TextFormatting.FormatTime(time) : string.Empty; secondaryTimeHighlighter.IsHighlightEnabled = doBlink && time != null; if (secondaryTimeHighlighter.IsHighlightEnabled) { secondaryTimeHighlightCount = 0; } }
void IVisualizationActor.StopAndSetOrClearPrimaryTime(TimeSpan?time) { StopPrimaryTimer(); primaryTimeLabel.Text = time != null?TextFormatting.FormatTime(time.Value) : string.Empty; }