/// <summary> /// Start a new point /// </summary> public void NewPoint() { if (Match.Status == TennisMatch.MatchStatus.InProgress) { TennisPoint newPoint = Match.CreateNewPoint(); if (!Match.Duration.SessionInProgress) { Match.Resume(); } if (CurrentPoint == null) { CurrentPoint = new vmPoint(); CurrentPoint.LogLevel = this.Match.LogLevel; } CurrentPoint.Point = newPoint; NotifyPropertyChanged("CurrentPoint"); NotifyPropertyChanged("CurrentPointDescription"); NotifyPropertyChanged("Server"); NotifyPropertyChanged("InProgress"); } else { CurrentPoint = null; NotifyPropertyChanged("Status"); //something happend that terminated the match (status != InProgess) NotifyPropertyChanged("InProgress"); NotifyPropertyChanged("CurrentPointDescription"); NotifyPropertyChanged("CurrentPoint"); } }
public vmMatch() { CurrentPoint = new vmPoint(); StatisticsCollection = new vmStatisticsCollection(); StoreMatch = true; }