private void EndRound(object obj) { ShowSummary = !ShowSummary; if (ShowSummary) { ButtonText = FinishedText; stopWatch.Stop(); uiUpdateTimer.Stop(); if (obj is int) { UpdateElapsedTime(null, null); var score = new Score(stopWatch.Elapsed, Contestant, Phone); var position = competition.SaveScore(score); SummaryText = string.Format(SummaryTextSuccess, position); } else { SummaryText = SummaryTextFailed; } } else { ButtonText = RunningText; enableButtonTwo = false; ButtonTwoCommand.OnCanExecuteChanged(); competition.ResetTests(); Contestant = ""; Phone = ""; OnPropertyChanged(nameof(Running)); } }
private void StartRound(object obj) { competition.ResetTests(); competition.StartRound(); stopWatch.Reset(); stopWatch.Start(); uiUpdateTimer.Start(); enableButtonTwo = true; ButtonTwoCommand.OnCanExecuteChanged(); OnPropertyChanged(nameof(Running)); }