コード例 #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
 public UsersStatisticDto LoadStatistic()
 {
     return(RepoStatistic.LoadStatistic());
 }