void snookerBreakControl_Done(bool isOpponent) { var balls = snookerBreakControl.EnteredBalls; if (balls.Count == 0) { snookerBreakControl.ClearBalls(); return; } //this.labelTapToEditFrameScore.Opacity = 1.0; //this.labelTapToEditFrameScore.Text = "(edit any time)"; this.changeOpacityOnControls(false); SnookerBreak snookerBreak = new SnookerBreak(); snookerBreak.AthleteID = !isOpponent ? MatchScore.YourAthleteID : MatchScore.OpponentAthleteID; snookerBreak.OpponentAthleteID = !isOpponent ? MatchScore.OpponentAthleteID : MatchScore.YourAthleteID; snookerBreak.Date = DateTime.Now; snookerBreak.IsFoul = snookerBreakControl.isFoul; snookerBreak.FrameNumber = this.MatchScore.FrameScores.IndexOf(this.CurrentFrameScore) + 1; snookerBreak.Balls = balls; snookerBreak.CalcFromBalls(); if (this.MatchScore.YourBreaks == null) { this.MatchScore.YourBreaks = new List <SnookerBreak>(); } if (this.MatchScore.OpponentBreaks == null) { this.MatchScore.OpponentBreaks = new List <SnookerBreak>(); } if (!isOpponent) { this.MatchScore.YourBreaks.Add(snookerBreak); } else { this.MatchScore.OpponentBreaks.Add(snookerBreak); } snookerBreakControl.ClearBalls(); if (!isOpponent) { this.CurrentFrameScore.A += snookerBreak.Points; } else { this.CurrentFrameScore.B += snookerBreak.Points; } // Fill list of breaks AFTER the currentFrameScore has been updated this.listOfBreaksInMatchControl.Fill(this.MatchScore, snookerBreak.FrameNumber); updateFrameScoreInSnookerBreakControl(); if (App.UserPreferences.IsVoiceOn) { // Announce break points and name string name = isOpponent ? MatchScore.OpponentName : MatchScore.YourName; string textToPronounce = snookerBreak.Points.ToString(); if (string.IsNullOrEmpty(name) == false) { textToPronounce += ". " + name; } // Also say the new frame score if (Config.IsIOS == false) { textToPronounce += ". " + CurrentFrameScore.A.ToString() + ". " + CurrentFrameScore.B.ToString(); } App.ScorePronouncer.Pronounce(textToPronounce, App.UserPreferences.Voice, App.UserPreferences.VoiceRate, App.UserPreferences.VoicePitch); } //if (this.isMatchEditMode == false) new TempSavedMatchHelper(App.KeyChain).Save(MatchScore); }