public Form1() { InitializeComponent(); dinnerParty = new DinnerParty((int)numericUpDown1.Value, healthyBox.Checked, fancyBox.Checked); dinnerParty.SetHealthyOption(false); dinnerParty.CalculateCostOfDecorations(true); DisplayDinnerPartyCost(); }
public Form1() { InitializeComponent(); dinnerParty = new DinnerParty() { NumberOfPeople = 5 }; dinnerParty.SetHealthyOption(false); dinnerParty.CalculateCostOfDecorations(true); DisplayDinnerPartyCost(); }
private void ChkHealthyOption_CheckedChanged(object sender, System.EventArgs e) { dinnerParty.SetHealthyOption(chkHealthyOption.Checked); DisplayDinnerPartyCost(); }
private void checkBox2_CheckedChanged(object sender, EventArgs e) { dinnerParty.SetHealthyOption(Healthy.Checked); DisplayDinnerPartyCost(); }