예제 #1
0
        private void buttonAddMag_Click(object sender, EventArgs e)
        {
            ToyShop newShop = new ToyShop();

            listBox1.Items.Add(newShop);

            shops.Add(newShop);
            if (buttonOpenMag.Enabled == false)
            {
                buttonOpenMag.Enabled = true;
                button1.Enabled       = true;
            }
        }
예제 #2
0
 public ToyShopForm(ToyShop toyShop)
 {
     InitializeComponent();
     theShop = toyShop;
     if (theShop != null)
     {
         MagInfo.Text = theShop.ToShortString();
         foreach (PartyToys party in theShop.supplies)
         {
             listBox1.Items.Add(party);
         }
     }
     RefreshData();
 }