public ChartStatistic(TeamStatistics stats, string name, bool win) { _stats = stats; _name = name; _win = win; _stats.PropertyChanged += _statsPropertyChanged; }
public Game() { this.Config = new GameConfiguration(); this.Config.Init(); Date = DateTime.Now.Date; this.Sets = new ItemObservableCollection<Set>(); this.OnCourtPlayers = new ItemObservableCollection<Player>(); Sets.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(PointsChanged); _playerStats = new ObservableCollection<PlayerStatistics>(); _us = new TeamStatistics(true, Config.CloneReasons(), this.Sets); _them = new TeamStatistics(false, Config.CloneReasons(), this.Sets); this.LineUp = new LineUpHelper(this.Config); }
public Set(Game currentGame) { this.Points = new ItemObservableCollection <Point>(); Points.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(PointsChanged); _currentIndex = 0; game = currentGame; Them = new TeamStatistics(false, currentGame.Config.CloneReasons()); Us = new TeamStatistics(true, currentGame.Config.CloneReasons()); foreach (var player in this.game.Config.Players) { if (player.Stats == null) { player.Stats = new PlayerStatistics(player, game.Config.CloneReasons()); } } _playerStats = new ObservableCollection <Player>(); }