private void friesCustomise_Click(object sender, EventArgs e) { Chips chips = new Chips(); ChipsCustomiseScreen customiseChipsScreen = new ChipsCustomiseScreen(this, kitchenScreen, chips); this.Hide(); customiseChipsScreen.Show(); }
private void chipsButton_Click(object sender, EventArgs e) { float totalCost = float.Parse(totalCostTextBox.Text); //creating setting name and price of object Chips chipsItem = new Chips(); chipsItem.NameOfItem = "Medium Chips"; chipsItem.PriceOfItem = chipsItem.ReturnTotalCost(); chipsItem.PriceOfItem = 1.69f; order.addItem(chipsItem); //adding to customer order list orderListBox.Items.Add(chipsItem.NameOfItem + " \t\t\t\t £" + chipsItem.PriceOfItem); //adding cost of item to total totalCost += (float)(chipsItem.PriceOfItem); totalCostTextBox.Text = totalCost.ToString(); }
public ChipsCustomiseScreen(OrderScreen oS, KitchenLiveOrderScreen kOrderScreen, Chips c) { InitializeComponent(); kitchenScreen = kOrderScreen; orderScreen = oS; }