Example #1
0
        ChickenBox chickenBoxMeal = new ChickenBox();//this is where i declare the object

        public ChickenBoxCustomiseScreen(OrderScreen oS, KitchenLiveOrderScreen kOrderScreen, ChickenBox c)
        {
            InitializeComponent();
            kitchenScreen  = kOrderScreen;
            orderScreen    = oS;
            chickenBoxMeal = c;
        }
Example #2
0
        private void chickenBoxCustomise_Click(object sender, EventArgs e)
        {
            ChickenBox chickenBox = new ChickenBox();
            ChickenBoxCustomiseScreen customiseChickenScreen = new ChickenBoxCustomiseScreen(this, kitchenScreen, chickenBox);

            this.Hide();
            customiseChickenScreen.Show();
        }
Example #3
0
        private void chickenBoxButton_Click(object sender, EventArgs e)
        {
            float totalCost = float.Parse(totalCostTextBox.Text);

            ChickenBox chickenItem = new ChickenBox();

            chickenItem.NameOfItem  = "Chicken Box";
            chickenItem.PriceOfItem = 6.29f;
            order.addItem(chickenItem);

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

            totalCost            += (float)(chickenItem.PriceOfItem);
            totalCostTextBox.Text = totalCost.ToString();
        }