Ejemplo n.º 1
0
 private static void CardsDropped(object sender, CardsDroppedEventArgs e)
 {
     if (e.Items[0] is OLVCardItem)
     {
         var cardItems = new List <OLVCardItem>();
         foreach (OLVCardItem cardItem in e.Items)
         {
             cardItems.Add(cardItem);
         }
         CardManager.AddMagicCardsToCollection(cardItems, e.TargetCollection);
     }
     else if (e.Items[0] is OLVSetItem setItem)
     {
         CardManager.AddMagicCardsToCollection(setItem.Cards, e.TargetCollection);
     }
     else if (e.Items[0] is OLVRarityItem rarityItem)
     {
         CardManager.AddMagicCardsToCollection(rarityItem.Cards, e.TargetCollection);
     }
     else if (e.Items[0] is FullInventoryCard)
     {
         CardManager.MoveFullInventoryCardsToCollection(e.Items, e.SourceForm as CollectionViewForm, e.TargetCollection);
     }
 }
 private void OnCardsDropped(CardsDroppedEventArgs args)
 {
     CardsDropped?.Invoke(this, args);
 }
Ejemplo n.º 3
0
 public static void CollectionViewFormCardsDropped(object sender, CardsDroppedEventArgs e)
 {
     CardsDropped(sender, e);
 }
Ejemplo n.º 4
0
 public static void NavigationFormCardsDropped(object sender, CardsDroppedEventArgs e)
 {
     CardsDropped(sender, e);
 }