示例#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);
 }
示例#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);
 }
示例#3
0
 private void DisplayDinnerCost(DinnerParty dinnerParty)
 {
     dinnerPartyCost.Text = dinnerParty.GetPartyCost().ToString("c");
 }
示例#4
0
 private void DisplayDinnerCost(DinnerParty dinnerParty)
 {
     dinnerPartyCost.Text = dinnerParty.GetPartyCost().ToString("c");
 }