Пример #1
0
        public PlayersManager(IFootballPlayerList players, IFootballField field, IEfficiencyChart chart)
        {
            players.LoadPlayers();
            _players      = players;
            _playerEditor = players.GetPlayerEditor();
            _playerEditor.AcceptChanges += _playerEditor_AcceptChanges;
            _players.AddedPlayer        += Players_AddedPlayer;
            _addPlayersVM       = new AddPlayerViewModel(players.Editor);
            _parametersEditorVM = new ParametersEditorViewModel(_playerEditor);
            _chartVM            = new ChartViewModel(chart);

            _selectedField = true;
            DistributePlayers(players, field);
        }
Пример #2
0
 public ChartViewModel(IEfficiencyChart chart)
 {
     _chart = chart;
     Init();
 }
 /// <summary>
 /// Инициализация ViewModel'и футбол
 /// </summary>
 /// <param name="playerList"></param>
 public FootballViewModel(IFootballPlayerList playerList, IFootballField field, IEfficiencyChart chart)
 {
     _playerList       = playerList;
     _playersManeger   = new PlayersManager(playerList, field, chart);
     _selectedTabIndex = 0;
 }