Example #1
0
 public Form1()
 {
     InitializeComponent();
     mydinnerParty   = new DinnerParty((int)numericUpDown1.Value, checkBox2.Checked, checkBox1.Checked);
     mybirthdayParty = new BirthdayParty((int)numberBirthday.Value, fancyBirthday.Checked, cakeWriting.Text);
     DisplayDinnerCost(mydinnerParty);
     DisplayBirthdayCost(mybirthdayParty);
 }
Example #2
0
 public Form1()
 {
     InitializeComponent();
     mydinnerParty = new DinnerParty((int)numericUpDown1.Value, checkBox2.Checked, checkBox1.Checked);
     mybirthdayParty = new BirthdayParty((int)numberBirthday.Value, fancyBirthday.Checked, cakeWriting.Text);
     DisplayDinnerCost(mydinnerParty);
     DisplayBirthdayCost(mybirthdayParty);
 }
Example #3
0
 private void DisplayDinnerCost(DinnerParty dinnerParty)
 {
     dinnerPartyCost.Text = dinnerParty.CalculatePartyCost().ToString("c");
 }
Example #4
0
 private void DisplayDinnerCost(DinnerParty dinnerParty)
 {
     dinnerPartyCost.Text = dinnerParty.CalculatePartyCost().ToString("c");
 }