예제 #1
0
 public ItemTypeSelector()
 {
     InitializeComponent();
     for (int x = 0; x < ObjTemplate.MAX_ITEM_TYPE; x++)
     {
         cbItemType.Items.Add(ObjTemplate.ItemTypeString((ObjTemplate.ObjectType)x));
     }
 }
예제 #2
0
 void UpdateWindowContents(Shop shop)
 {
     txtKeeperIndexNumber.Text = shop.Keeper.ToString();
     txtBuyPercent.Text        = shop.PercentBuy.ToString();
     txtSellPercent.Text       = shop.PercentSell.ToString();
     txtOpenHour.Text          = shop.OpenHour.ToString();
     txtCloseHour.Text         = shop.CloseHour.ToString();
     lstBuyTypes.Items.Clear();
     foreach (int item in shop.BuyTypes)
     {
         lstBuyTypes.Items.Add(ObjTemplate.ItemTypeString((ObjTemplate.ObjectType)item));
     }
     lstItemsForSale.Items.Clear();
     foreach (int item in shop.ItemsForSale)
     {
         lstItemsForSale.Items.Add(item.ToString());
     }
 }