private void FinalDashboard_Load(object sender, EventArgs e) { OrderUserControl afc = new OrderUserControl(); MainControlClass.showControl(afc, panelMainContainer); lblRName.Text = Properties.Settings.Default.Name; }
/// <summary> /// Loads orders from the Middleware REST API into the GUI /// </summary> private async void LoadUI() { StaticData.masterPage.ShowProgressRing(); await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { PageContentStackPanel.Children.Clear(); }); foreach (var order in (await Middleware.MiddlewareConnections.GetOutstandingOrders()).Where(xOrder => !xOrder.fulfilled)) { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { var orderUI = new OrderUserControl(order); orderUI.click += (s, o) => { StaticData.masterPage.ShowProgressRing(); string url = Middleware.MiddlewareConnections.DownloadImage((s as ProductUserControl).product.name); if (!string.IsNullOrWhiteSpace(url)) { ShowImage(url, (s as ProductUserControl).product.name); } StaticData.masterPage.HideProgressRing(); }; PageContentStackPanel.Children.Add(orderUI); }); } StaticData.masterPage.HideProgressRing(); }
private void btnOrder_Click(object sender, EventArgs e) { hideSubMenu(); sidePanel.Height = btnOrder.Height; sidePanel.Top = btnOrder.Top; OrderUserControl afc = new OrderUserControl(); MainControlClass.showControl(afc, panelMainContainer); btnAllFoodCategory.ForeColor = Color.Red; }
private void LabelControl_MouseClick(object sender, MouseEventArgs e) { TableSeat uc = (TableSeat)((Label)sender).Tag; OrderUserControl ucOrder = new OrderUserControl(); ucOrder.BackToTablesHandler += new EventHandler <EventArgs>(ucOrder_BackToTablesHandler); ucOrder.SelectedTable = uc; ucOrder.ctx = this.ctx; panelKassa.Controls.Clear(); panelKassa.Controls.Add(ucOrder); ucOrder.Dock = DockStyle.Fill; ucOrder.PopulateMenus(); }