Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            PartyToys     party     = new PartyToys();
            PartyEditForm partyEdit = new PartyEditForm(party);

            partyEdit.ShowDialog();
            if (partyEdit.DialogResult == DialogResult.OK)
            {
                theShop.AddAPartyofToys(party);

                RefreshData();
            }
        }
Esempio n. 2
0
 public PartyEditForm(PartyToys partyToys)
 {
     InitializeComponent();
     thePartyToys = partyToys;
     if (partyToys.TheToy != null)
     {
         listBox1.Items.Add(partyToys);
     }
     foreach (Toy i in allToys)
     {
         listBox1.Items.Add(i);
     }
 }
Esempio n. 3
0
 public void AddAPartyofToys(PartyToys toyParty)
 {
     supplies.Add(toyParty);
     CalculateToys();
 }
Esempio n. 4
0
 private void button3_Click(object sender, EventArgs e)
 {
     thePartyToys = new PartyToys();
     DialogResult = DialogResult.No;
     Close();
 }