Пример #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         theShop.SellToy(listBox1.SelectedIndex);
         if (theShop.supplies[listBox1.SelectedIndex].Count == 0)
         {
             theShop.supplies.RemoveAt(listBox1.SelectedIndex);
         }
         RefreshData();
     }
 }