Exemple #1
0
 public void AddToTrash(Book toAdd)
 {
     if (currUser != null)
     {
         currUser.sTrash.Add(new TrashObj(toAdd, 1));
     }
     else
     {
         publicTrash.Add(new TrashObj(toAdd, 1));
     }
 }
Exemple #2
0
 private void BuySupply()
 {
     if (Money >= BuyList[0].cost)
     {
         buysupply = BuyList[0].name;
     }
     if (buysupply == "")
     {
         for (int i = 0; i < BuyList.Count; i++)
         {
             if (Money >= BuyList[i].cost && form1.GetSupplyCount(BuyList[i].name) != 0)
             {
                 buysupply = BuyList[i].name;
                 break;
             }
         }
     }
     GetForm().Invoke(new buySupplyDelegate(form1.BuySuplly), buysupply, this);
     Trash.Add(buysupply);
 }