Exemplo n.º 1
0
 public Form1()
 {
     InitializeComponent();
     dinnerParty = new DinnerParty((int)numericUpDown1.Value, healthyBox.Checked, fancyBox.Checked);
     dinnerParty.SetHealthyOption(false);
     dinnerParty.CalculateCostOfDecorations(true);
     DisplayDinnerPartyCost();
 }
Exemplo n.º 2
0
 public Form1()
 {
     InitializeComponent();
     dinnerParty = new DinnerParty()
     {
         NumberOfPeople = 5
     };
     dinnerParty.SetHealthyOption(false);
     dinnerParty.CalculateCostOfDecorations(true);
     DisplayDinnerPartyCost();
 }
Exemplo n.º 3
0
 private void ChkFancyDinner_CheckedChanged(object sender, System.EventArgs e)
 {
     dinnerParty.CalculateCostOfDecorations(chkFancyDinner.Checked);
     DisplayDinnerPartyCost();
 }
Exemplo n.º 4
0
 private void checkBox1_CheckedChanged(object sender, EventArgs e)
 {
     dinnerParty.CalculateCostOfDecorations(Decorations.Checked);
     DisplayDinnerPartyCost();
 }