コード例 #1
0
        public StatisticVM(Action <Type> changeWindowContent, IReposStatistic reposStatistic)
        {
            windowsChanger      = changeWindowContent ?? throw new ArgumentNullException(nameof(windowsChanger));
            this.reposStatistic = reposStatistic;
            UsersStatisticDto usersStatisticDto = reposStatistic.LoadStatistic();

            UserStatistic[] users = usersStatisticDto.UsersStatistic.Values.Select(u => new UserStatistic()
            {
                Name = u.Name, Win = u.Win, Lose = u.Lose, Draw = u.Draw
            }).ToArray();
            Users = new ObservableCollection <UserStatistic>(users);
        }
コード例 #2
0
 /// <summary>Конструктор модели</summary>
 /// <param name="rowsCount">Колиичество строк</param>
 /// <param name="columnsCount">Количество колонок</param>
 /// <param name="lineLength">Минимальная длина линии из однородных элементов, необходимая для учета ее завершенности</param>
 public ModelTicTacToe(IReposSaveGame reposGame, IReposStatistic reposStatistic)
 {
     ReposGame     = reposGame;
     RepoStatistic = reposStatistic;
 }