public Form1() { InitializeComponent(); dinnerParty = new DinnerParty(); dinnerParty.CalculateCostOfDecorations(fancyBox.Checked); dinnerParty.SetHealthyOption(healthyBox.Checked); DisplayDinnerPartyCost(); }
public Form1() { InitializeComponent(); dinnerParty = new DinnerParty((int)numericUpDown1.Value); dinnerParty.SetHealthyOption(false); dinnerParty.CalculateCostOfDecorations(true); DisplayDinnerPartyCost(); }
public Form1() { InitializeComponent(); Party = new DinnerParty(); Party.SetHealthyOption(healthyOption.Checked); Party.CalculateCostOfDecorations(fancyDecor.Checked); DisplayDinnerPartyCost(); costLabel.Text = ""; }
public Form1() { InitializeComponent(); dinnerParty = new DinnerParty(); dinnerParty.SetPartyOptions((int)numericUpDown1.Value, fancyBox.Checked); dinnerParty.SetHealthyOptions(healthyBox.Checked); dinnerParty.CalculateCostOfDecorations(fancyBox.Checked); DisplayDinnerPartyCost(); }
private void DisplayDinnerPartyCost() { dinnerParty.NumberOfPeople = (int)nudPeople.Value; dinnerParty.CalculateCostOfDecorations(chbFancyDecorations.Checked); dinnerParty.SetHealthyOption(chbHealthyOption.Checked); decimal Cost = dinnerParty.CalculateCost(chbHealthyOption.Checked); lblCost.Text = Cost.ToString("c"); // TestData(); }
public Form1() { InitializeComponent(); dinnerParty = new DinnerParty() { NumberOfPeople = (int)nudPeople.Value }; //Create new dinnerparty with people equal to default. dinnerParty.SetHealthyOption(false); dinnerParty.CalculateCostOfDecorations(chbFancyDecorations.Checked); DisplayDinnerPartyCost(); }
private void fancyBox_CheckedChanged(object sender, EventArgs e) { dinnerParty.CalculateCostOfDecorations(fancyBox.Checked); DisplayDinnerPartyCost(); }
private void checkBox1_CheckedChanged(object sender, EventArgs e) { dinnerParty.CalculateCostOfDecorations(checkBox1.Checked); DisplayDinnerPartyCost(); //recalculates and displays new dinner party cost. }