Beispiel #1
0
        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;
            }
        }
Beispiel #2
0
 private void DisplayRefreshTimer_Tick(object?sender, EventArgs e)
 {
     if (startTime != null)
     {
         TimeSpan timePassed = SystemContext.UtcNow() - startTime.Value;
         primaryTimeLabel.Text = TextFormatting.FormatTime(timePassed);
     }
 }
Beispiel #3
0
 void IVisualizationActor.SetOrClearCurrentCompetitor(Competitor?competitor)
 {
     currentCompetitorNumberLabel.Text = competitor != null?TextFormatting.FormatCompetitorNumber(competitor.Number) : string.Empty;
 }
Beispiel #4
0
 void IVisualizationActor.SetOrClearRefusalCount(int?count)
 {
     currentRefusalsValueLabel.Text = TextFormatting.FormatNumber(count, 2);
 }
Beispiel #5
0
 void IVisualizationActor.StopAndSetOrClearPrimaryTime(TimeSpan?time)
 {
     StopPrimaryTimer();
     primaryTimeLabel.Text = time != null?TextFormatting.FormatTime(time.Value) : string.Empty;
 }
Beispiel #6
0
 void IVisualizationActor.SetNextCompetitorNumber(int number)
 {
     nextCompetitorNumberLabel.Text = TextFormatting.FormatCompetitorNumber(number);
 }