private bool ShowWebPos(string url) { // // Run this as a delegate inside UpdateGUI() to ensure GUI operations all work // UpdateGUI(() => { flowCloudPos.Visible = false; listBasket.Visible = false; chkCloudPos.Checked = false; if (WebPOS == null) { WebPOS = new WebPos.Client(); WebPOS.Loaded += WebPos_Loaded; WebPOS.Unloaded += WebPos_Unloaded; var opt = Program.Options(); WebPOS.InitPosWindow(opt.ClientRect.Left, opt.ClientRect.Top, opt.ClientRect.Width, opt.ClientRect.Height, url); chkWebPos.Checked = true; // In case it isn't chkWebPos.BackColor = Color.FromArgb(200, 255, 0); } }); return(true); }
private bool DestroyWebPos() { // Run this as a delegate inside UpdateGUI() to ensure GUI operations all work UpdateGUI(() => { flowCloudPos.Visible = true; listBasket.Visible = true; chkWebPos.BackColor = SystemColors.Control; if (WebPOS != null) { WebPOS.Dispose(); WebPOS = null; chkWebPos.Checked = false; } }); return(true); }