예제 #1
0
 public void BuildRarityItems()
 {
     foreach (var cardItem in Cards)
     {
         if (!(Rarities.FirstOrDefault(x => x.Rarity == cardItem.MagicCard.rarity) is OLVRarityItem rarityItem))
         {
             rarityItem = new OLVRarityItem(this, cardItem.MagicCard.Edition, cardItem.MagicCard.rarity);
             Rarities.Add(rarityItem);
             Rarities.Sort();
         }
         rarityItem.Cards.Add(cardItem);
     }
 }
예제 #2
0
 public void AddRarity(OLVRarityItem rarity)
 {
     Rarities.Add(rarity);
 }