示例#1
0
 private void Buy(object?sender, EventArgs e)
 {
     if (!((sender as Control)?.Tag is Item item))
     {
         return;
     }
     using var buyItem = new BuyItem(item, saveFile.Character, saveFile.Inventory);
     buyItem.ShowDialog();
 }
示例#2
0
 private void ShopButtonClicked(int index)
 {
     buyItem = new BuyItem(ItemsArray[index], character);
     buyItem.ShowDialog();
 }