private void copyFromRunResult(RunResult runResult) { _startNumber = runResult?.StartNumber; _startTime = runResult?.GetStartTime(); _finishTime = runResult?.GetFinishTime(); _runTime = runResult?.GetRunTime(true, false); }
private void TxtStartNumber_TextChanged(object sender, TextChangedEventArgs e) { uint startNumber = 0U; try { startNumber = uint.Parse(txtStartNumber.Text); } catch (Exception) { } RaceParticipant participant = _thisRace.GetParticipant(startNumber); if (participant != null) { txtParticipant.Text = participant.Fullname; RunResult rr = _currentRaceRun.GetResultList().FirstOrDefault(r => r.Participant == participant); if (rr != null) { txtStart.Text = rr.GetStartTime()?.ToString(@"hh\:mm\:ss\,ffff"); txtFinish.Text = rr.GetFinishTime()?.ToString(@"hh\:mm\:ss\,ffff"); txtRun.Text = rr.GetRunTime()?.ToString(@"mm\:ss\,ff"); } else { txtStart.Text = ""; txtFinish.Text = ""; txtRun.Text = ""; } } else { txtParticipant.Text = ""; txtStart.Text = ""; txtFinish.Text = ""; txtRun.Text = ""; } CheckTime(txtStart); CheckTime(txtFinish); CheckTime(txtRun); }