Пример #1
0
        private void DoAlianceFilter()
        {
            AlianceRankings.Clear();

            if (m_AlianceRankingsCache != null)
            {
                foreach (var r in m_AlianceRankingsCache)
                {
                    if (r.ContainsSearchExp(AlianceFilterText))
                    {
                        AlianceRankings.Add(r);
                    }
                }
            }
        }
Пример #2
0
        async private void DoRefreshAliancePlotCmd()
        {
            IsBusy = true;

            try
            {
                //lista zaznaczonych rankingów sojuszy do obejrzenia historii
                var aliancesHistory = new Dictionary <CurrentAlianceRanking, List <AlianceScoreHistory> >();

                await Task.Run(() =>
                {
                    foreach (var rank in AlianceRankings.Where(x => x.UISelected))
                    {
                        aliancesHistory.Add(rank, GetAlianceHistory(rank.AlianceName, rank.Continent));
                    }
                });

                AliancePlotData = aliancesHistory;

                //wybieram te sojusze które są zaznaczone na chociaż jednym kontynencie
                var selectedAlianceNames = AlianceRankings.Where(x => x.UISelected).GroupBy(x => x.AlianceName);

                var aliances2Plot = new List <CurrentAlianceRanking>();

                foreach (var alianceName in selectedAlianceNames)
                {
                    aliances2Plot.AddRange(m_AlianceRankingsCache.Where(x => x.AlianceName == alianceName.Key));
                }

                AlianceRankingsPlotData = aliances2Plot;
            }
            finally
            {
                IsBusy = false;
            }
        }