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