Exemple #1
0
 public SetDetailInfoViewModel()
 {
     PropertyChanged += (sender, args) =>
     {
         if (args.PropertyName == "SetCards")
         {
             List <CardStatsByRarity> cardStats = SetCards.GroupBy(c => c.Card.Rarity, c => c)
                                                  .Select(gr => new CardStatsByRarity(gr.Key.ToString(), gr.AsEnumerable()))
                                                  .ToList();
             TotalSetStats = new CardStatsByRarity("Total", SetCards);
             cardStats.Add(TotalSetStats);
             StatsByRarity = cardStats;
         }
     };
 }
 public SetDetailInfoViewModel()
 {
     PropertyChanged += (sender, args) =>
     {
         if (args.PropertyName == "SetCards")
         {
             List<CardStatsByRarity> cardStats = SetCards.GroupBy(c => c.Card.Rarity, c => c)
                 .Select(gr => new CardStatsByRarity(gr.Key.ToString(), gr.AsEnumerable()))
                 .ToList();
             TotalSetStats = new CardStatsByRarity("Total", SetCards);
             cardStats.Add(TotalSetStats);
             StatsByRarity = cardStats;
         }
     };
 }