Example #1
0
 public Form1()
 {
     InitializeComponent();
     dinnerParty = new DinnerParty();
     dinnerParty.SetPartyOptions((int)numericUpDown1.Value, fancyBox.Checked);
     dinnerParty.SetHealthyOptions(healthyBox.Checked);
     dinnerParty.CalculateCostOfDecorations(fancyBox.Checked);
     DisplayDinnerPartyCost();
 }
Example #2
0
        public Form1()
        {
            InitializeComponent();

            dinnerParty = new DinnerParty(); // { NumberOfPeople = 5 };
            dinnerParty.SetPartyOptions(5, checkBox1.Checked);
            dinnerParty.SetHealthyOption(checkBox2.Checked);
            //dinnerParty.CalculateCostOfDecorations(checkBox1.Checked);
            DisplayDinnerPartyCost();
        }
Example #3
0
 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
 {
     dinnerParty.SetPartyOptions((int)numericUpDown1.Value, fancyBox.Checked);
     DisplayDinnerPartyCost();
 }
Example #4
0
 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();
 }