private void RedrawPendingItems() { PendingItemsComponent.Children.Clear(); foreach (OrderedItem item in pendingItems) { PendingItemControl component = new PendingItemControl(); component.ItemName.Text = item.itemDefinition.name; component.Price.Text = item.isRefill ? "0.00" : (item.EffectiveCost() / 100.0).ToString("F"); component.XButton.Click += (s, eArgs) => { if (initialized) { pendingItems.Remove(item); RedrawPendingItems(); } }; component.EditButton.Click += (s, args) => { Global.Main.Hide(); ItemProfile itemProfile = new ItemProfile(item); itemProfile.EnterEditMode(); itemProfile.ShowDialog(); RedrawPendingItems(); }; PendingItemsComponent.Children.Add(component); } RecalculatePrice(); UpdateAddToOrderButton(); }
public void OnMenuItemSelected(object sender, RoutedEventArgs e) { OrderedItem menuItem = new OrderedItem(ItemDefinitionController.itemDefinitions[(sender as Button).Tag as string], "currentUserId"); ItemProfile profile = new ItemProfile(menuItem); Global.Main.Hide(); profile.ShowDialog(); }
public Customize(OrderedItem item, ItemProfile ip) { InitializeComponent(); menuItem = item; UpdateCustomItems(); IP = ip; IP.setEnabled(false); }
public SpecialRequest(OrderedItem item, ItemProfile ip) { InitializeComponent(); menuItem = item; RequestField.Text = item.specialRequest; IP = ip; IP.setEnabled(false); Global.kb_Left = 400; Global.kb_Top = 0; Global.showKeyboard(); }