Esempio n. 1
0
        async private void DoRefreshPlotCmd()
        {
            IsBusy = true;

            try
            {
                //lista zaznaczonych rankingów do obejrzenia historii
                var playersHistory = new Dictionary <CurrentEmpireRanking, List <EmpireScoreHistory> >();
                var killsHistory   = new Dictionary <CurrentEmpireRanking, List <UnitsKillsHistory> >();
                var defHistory     = new Dictionary <CurrentEmpireRanking, List <DefReputationHistory> >();
                var offHistory     = new Dictionary <CurrentEmpireRanking, List <OffReputationHistory> >();

                await Task.Run(() =>
                {
                    foreach (var rank in EmpireRankings.Where(x => x.UISelected))
                    {
                        playersHistory.Add(rank, GetPlayerHistory(rank.PlayerName, rank.Continent));
                        killsHistory.Add(rank, GetPlayerKillsHistory(rank.PlayerName));
                        defHistory.Add(rank, GetDefRepHistory(rank.PlayerName));
                        offHistory.Add(rank, GetOffRepHistory(rank.PlayerName));
                    }
                });

                EmpirePlotData           = playersHistory;
                EmpireUnitKillsPlotData  = killsHistory;
                EmpireDefRepHistPlotData = defHistory;
                EmpireOffRepHistPlotData = offHistory;
            }
            finally
            {
                IsBusy = false;
            }
        }
Esempio n. 2
0
        private void DoFilter()
        {
            EmpireRankings.Clear();

            if (m_RankingsCache != null)
            {
                foreach (var r in m_RankingsCache)
                {
                    if (r.ContainsSearchExp(FilterText))
                    {
                        EmpireRankings.Add(r);
                    }
                }
            }
        }