public Form1() { InitializeComponent(); dinnerParty = new DinnerParty(); dinnerParty.SetPartyOptions((int)numericUpDown1.Value, fancyBox.Checked); dinnerParty.SetHealthyOptions(healthyBox.Checked); dinnerParty.CalculateCostOfDecorations(fancyBox.Checked); DisplayDinnerPartyCost(); }
public Form1() { InitializeComponent(); dinnerParty = new DinnerParty(); // { NumberOfPeople = 5 }; dinnerParty.SetPartyOptions(5, checkBox1.Checked); dinnerParty.SetHealthyOption(checkBox2.Checked); //dinnerParty.CalculateCostOfDecorations(checkBox1.Checked); DisplayDinnerPartyCost(); }
private void numericUpDown1_ValueChanged(object sender, EventArgs e) { dinnerParty.SetPartyOptions((int)numericUpDown1.Value, fancyBox.Checked); DisplayDinnerPartyCost(); }
private void numericUpDown1_ValueChanged(object sender, EventArgs e) { //dinnerParty.numberOfPeople = (int)numericUpDown1.Value; //casting numericUpdown1.value because it is a decimal dinnerParty.SetPartyOptions((int)numericUpDown1.Value, checkBox1.Checked); DisplayDinnerPartyCost(); }