Ejemplo n.º 1
0
        private void button5_Click(object sender, EventArgs e)
        {
            changes = new NSAChanges();
            NSAMenuItem         resultItem      = new NSAMenuItem(customizeItem);
            List <NSAComponent> finalComponents = new List <NSAComponent>();

            if (customizeItem.BreadIndex > -1 && BreadList.SelectedItems.Count > 0)
            {
                finalComponents.Add((NSAComponent)BreadList.SelectedItems[0].Tag);
                resultItem.BreadIndex = 0;
            }
            resultItem.Extrascost = 0.0;
            foreach (Object customComponent in OtherListBox.CheckedItems)
            {
                finalComponents.Add((NSAComponent)customComponent);
                if (((NSAComponent)customComponent).Name == "Avocado")
                {
                    resultItem.Extrascost = 1.0;
                }
            }

            resultItem.Components = finalComponents;
            changes.FinishedItem  = resultItem;
            changes.OriginalItem  = OriginalIndex;

            Hide();
        }
Ejemplo n.º 2
0
        private void KioskWindow_Activated(object sender, EventArgs e)
        {
            if (customizeItemForm != null && !customizeItemForm.IsCancelled)
            {
                NSAChanges changes = customizeItemForm.Changes;


                customizeItemForm.Close();

                currentOrder.Items.RemoveAt(changes.OriginalItem);

                addItemToOrder(changes.FinishedItem);



                UpdateOrderView();
            }
        }