Пример #1
0
        public Color?GetPredictionBorderColor()
        {
            var groups = AllVisiblePredictions.GroupBy(p => p.Type).OrderBy(g => (int)g.Key);
            var colors = groups
                         .Where(g => PredictionSettings.GetVisible(g.Key))
                         .Select(g => g.First().GetBorderColor()).ToList();

            return(colors.FirstOrDefault());
        }
Пример #2
0
        public List <Note> GetPredictionNotes()
        {
            var groups = AllVisiblePredictions.GroupBy(p => p.Type).OrderBy(g => (int)g.Key);
            var result = groups
                         .Where(g => PredictionSettings.GetVisible(g.Key))
                         .Select(g =>
            {
                return(new Note(g.Min(p => p.Depth), g.First().GetTextColor()));
            }).ToList();


            var mySelectedKillPredictionNote = MySelectedKillPredictions
                                               .OrderBy(x => x.Depth)
                                               .Select(x => new Note(x.Depth, x.GetTextColor()))
                                               .FirstOrDefault();

            if (mySelectedKillPredictionNote != null)
            {
                result.Insert(0, mySelectedKillPredictionNote);
            }

            return(result);
        }