示例#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();
            }
        }
示例#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);
     }
 }
示例#3
0
 public void AddAPartyofToys(PartyToys toyParty)
 {
     supplies.Add(toyParty);
     CalculateToys();
 }
示例#4
0
 private void button3_Click(object sender, EventArgs e)
 {
     thePartyToys = new PartyToys();
     DialogResult = DialogResult.No;
     Close();
 }