/** * Updates the labels to display average putts count statistic */ private void updateAveragePutts() { double averagePutts = StatistiquesGolf.getAveragePutts(this.scorePartie.scoreHoles); if (averagePutts == -1.0) { this.averagePutt.Text = GeneralStatPage.NO_DATA; this.averagePutt.TextColor = Color.Gray; this.averagePutt.FontSize = 15; } else { this.averagePutt.Text = "" + averagePutts.ToString("0.00"); this.averagePutt.TextColor = Color.FromHex("#39B54A"); this.averagePutt.FontSize = 30; } }
/** * Updates the average putts count labels */ private void updateAveragePutts(List <ScoreHole> allScoreHoles) { double avPutts = StatistiquesGolf.getAveragePutts(StatistiquesGolf.getScoreHoles(allScoreHoles, this.golfCourse)); if (avPutts == -1.0) { this.averagePutts.Text = GeneralStatPage.NO_DATA; this.averagePutts.TextColor = Color.Gray; this.averagePutts.FontSize = 15; } else { this.averagePutts.Text = "" + avPutts.ToString("0.00"); this.averagePutts.TextColor = Color.FromHex("#39B54A"); this.averagePutts.FontSize = 30; } }