コード例 #1
0
        private void burgerMealButton_Click(object sender, EventArgs e)
        {
            //Maybe have public interger to increment orderNumber?
            float totalCost = float.Parse(totalCostTextBox.Text);
            //create object to pass to kitchen screen
            Burger burger = new Burger();

            //setting name of item
            burger.NameOfItem  = "Burger";
            burger.PriceOfItem = 2.49f;
            order.addItem(burger);

            orderListBox.Items.Add(burger.NameOfItem + " \t\t\t\t\t £" + burger.PriceOfItem);

            totalCost            += (float)(burger.PriceOfItem);
            totalCostTextBox.Text = totalCost.ToString();
        }
コード例 #2
0
 public SubCustomiseScreen(OrderScreen oS, KitchenLiveOrderScreen kOrderScreen, Burger b)
 {
     InitializeComponent();
     orderScreen   = oS;
     kitchenScreen = kOrderScreen;
     burgerItem    = b;
 }