private void UpdateCells(DataGridViewRow row) { Split split = Splits[row]; row.Cells[0].Value = split.Name; row.Cells[1].Value = TIME_FORMATTER.FormatTicks(split.Ticks, Run.Category.TicksPerSecond); row.Cells[2].Value = split.Ticks.ToString(); row.Cells[3].Value = TIME_FORMATTER.FormatTicks(split.BestSegment, Run.Category.TicksPerSecond); row.Cells[4].Value = split.BestSegment.ToString(); }
private void LoadSplit(int i, Split split) { dynamic s = Splits[i]; s.Split = split; s.NameLabel.Text = split.Name; DifferenceLabel diffLabel = s.DiffLabel; diffLabel.SetDifference(Run, split, GetDifference); s.TimeLabel.Text = TIME_TIME_FORMATTER.FormatTicks(GetRelevantTicks(split), Run.Category.TicksPerSecond); }
public void UpdateComponent() { if (!run.LastSplitDone()) { int?possibleTimeSave = run.GetCurrentSplit().Segment - run.GetCurrentSplit().BestSegment; PossibleTimeSaveTimeLabel.Text = TIME_FORMATTER.FormatTicks(possibleTimeSave, run.Category.TicksPerSecond); } else { PossibleTimeSaveTimeLabel.Text = TIME_FORMATTER.NullTime; } }
public void SetDifference(Run run, Split split, Func <Split, int?> differenceFunction) { int?difference = differenceFunction(split); if (difference == null) { SetNull(); } else { ForeColor = GetDiffColor(run, split, differenceFunction); string diff = TIME_FORMATTER.FormatTicks(Math.Abs((int)difference), run.Category.TicksPerSecond); if (difference < 0) { Text = "-" + diff; } else { Text = "+" + diff; } } }
public void UpdateComponent() { int?sumOfBest = run.GetSumOfBest(); sumOfBestTimeLabel.Text = TIME_FORMATTER.FormatTicks(sumOfBest, run.Category.TicksPerSecond); }
public void UpdateComponent() { int?BestPossibleTime = run.GetBestPossibleTime(); BestPossibleTimeTimeLabel.Text = TIME_FORMATTER.FormatTicks(BestPossibleTime, run.Category.TicksPerSecond); }