public static void ShowScreen(Param.Screen screen) { if (screen == Param.Screen.Sell && Param.SelectedScreen != (int)Param.Screen.Sell) { Param.UserControl = new UcSell(); } else if (screen == Param.Screen.ReceiveProduct && Param.SelectedScreen != (int)Param.Screen.ReceiveProduct) { Param.UserControl = new UcReceiveProduct(); } else if (screen == Param.Screen.Product && Param.SelectedScreen != (int)Param.Screen.Product) { Param.UserControl = new UcProduct(); } else if (screen == Param.Screen.Category && Param.SelectedScreen != (int)Param.Screen.Category) { Param.UserControl = new UcCategory(); } else if (screen == Param.Screen.Brand && Param.SelectedScreen != (int)Param.Screen.Brand) { Param.UserControl = new UcBrand(); } else if (screen == Param.Screen.Customer && Param.SelectedScreen != (int)Param.Screen.Customer) { Param.UserControl = new UcCustomer(); } else if (screen == Param.Screen.User && Param.SelectedScreen != (int)Param.Screen.User) { Param.UserControl = new UcUser(); } else if (screen == Param.Screen.Color && Param.SelectedScreen != (int)Param.Screen.Color) { Param.UserControl = new UcColor(); } else if (screen == Param.Screen.Report && Param.SelectedScreen != (int)Param.Screen.Report) { Param.UserControl = new UcReport(); } else if (screen == Param.Screen.ShopInfo && Param.SelectedScreen != (int)Param.Screen.ShopInfo) { Param.UserControl = new UcShopInfo(); } else if (screen == Param.Screen.Config && Param.SelectedScreen != (int)Param.Screen.Config) { Param.UserControl = new UcConfig(); } else if (screen == Param.Screen.Claim && Param.SelectedScreen != (int)Param.Screen.Claim) { Param.UserControl = new UcClaim(); } else if (screen == Param.Screen.Return && Param.SelectedScreen != (int)Param.Screen.Return) { Param.UserControl = new UcReturn(); } else if (screen == Param.Screen.Stock && Param.SelectedScreen != (int)Param.Screen.Stock) { Param.UserControl = new UcStock(); } Param.UserControl.Dock = System.Windows.Forms.DockStyle.Fill; if (!Param.MainPanel.Contains(Param.UserControl)) { Param.MainPanel.Controls.Clear(); Param.MainPanel.Controls.Add(Param.UserControl); } }
public static void SetStatusMessage(string message, Param.StatusIcon icon) { Param.lblStatus.Text = message; switch (icon) { case Param.StatusIcon.Loading: Param.lblStatus.Image = global::PowerPOS_Online.Properties.Resources.loading; break; case Param.StatusIcon.Success: Param.lblStatus.Image = global::PowerPOS_Online.Properties.Resources.accept; break; /*case Param.StatusIcon.Info: Param.lblStatus.Image = global::PowerPOS_Online.Properties.Resources.accept; break;*/ default: Param.lblStatus.Image = null; break; } }