private void button1_Click(object sender, RoutedEventArgs e) { PartyToys party = new PartyToys(); PartyEditWindow partyEdit = new PartyEditWindow(party); partyEdit.ShowDialog(); theShop.AddAPartyofToys(party); RefreshData(); }
public PartyEditWindow(PartyToys partyToys) { InitializeComponent(); thePartyToys = partyToys; if (partyToys.TheToy != null) { listBox1.Items.Add(partyToys); } foreach (Toy i in allToys) { listBox1.Items.Add(i); } }
private void button3_Click(object sender, RoutedEventArgs e) { thePartyToys = new PartyToys(); Close(); }
public void AddAPartyofToys(PartyToys toyParty) { supplies.Add(toyParty); CalculateToys(); }