public void StartNewRun() { if (challengeList.Count == 0) { throw new InvalidOperationException(); } // TODO: Check for a already-active run. // NOTE: This is a hack so that I can get start to work. if (RunInProgress) { Challenges.EndRun(currentChallenge); RunInProgress = false; } Challenges.StartNewRun(currentChallenge); // Zero out the split counts. foreach (var split in SplitList) { split.CurrentValue = 0; } splitList.Last().CumulativePbValue = SplitList[0].CumulativePbValue; splitList.Last().CurrentPbValue = SplitList[0].CumulativePbValue; // Reset current split number. currentSplit = 0; RunInProgress = true; // We changed some of our public properties. NotifyPropertyChanged("SplitList"); }
public void EndRun() { if (!RunInProgress) { throw new InvalidOperationException(); } Challenges.EndRun(currentChallenge); RunInProgress = false; }