Example #1
0
 private static void ManagerOnRemoved(object sender, InventoryEventArgs inventoryEventArgs)
 {
     //Once the item is removed, our event listener will display that it was removed.
     Console.WriteLine("Removed item {0}.", inventoryEventArgs.InventoryItem.Label);
 }
Example #2
0
 protected virtual void OnRemoved(InventoryEventArgs e)
 {
     if (Removed != null)
     {
         Removed(this, e);
     }
 }
Example #3
0
 private static void ManagerOnExpired(object sender, InventoryEventArgs inventoryEventArgs)
 {
     //When an item expires, display the label of the expired item and remove it from inventory.
     Console.WriteLine("Item {0} expired.  Requesting removal....", inventoryEventArgs.InventoryItem.Label);
     manager.Remove(inventoryEventArgs.InventoryItem.Label);
 }
Example #4
0
 protected virtual void OnExpired(InventoryEventArgs e)
 {
     if (Expired != null)
     {
         Expired(this, e);
     }
 }