Example #1
0
        private void DisplayDinnerPartyCost()
        {
            //首先就是如果是改变了health的box,并不会改变decoration
            dinnerParty.CalculateCostOfDecorations(fancyBox.Checked);
            decimal Cost = dinnerParty.CalculateCost(healthyBox.Checked) + dinnerParty.CostOfDecorations;

            costLabel.Text = Cost.ToString("c");
        }
Example #2
0
        private void DisplayDinnerPartyCost()
        {
            decimal Cost = dinnerParty.CalculateCost(healthyBox.Checked);

            costLabel.Text = Cost.ToString("c");
        }