private void buttonAddMag_Click(object sender, RoutedEventArgs e) { ToyShop newShop = new ToyShop(); listBox1.Items.Add(newShop); shops.Add(newShop); if (buttonOpenMag.IsEnabled == false) { buttonOpenMag.IsEnabled = true; button1.IsEnabled = true; } }
public ToyShopWindow(ToyShop toyShop) { InitializeComponent(); theShop = toyShop; if (theShop != null) { MagInfo.Text = theShop.ToShortString(); foreach (Circle party in theShop.supplies) { listBox1.Items.Add(party); } } RefreshData(); }