public void onLogin() { form.Invoke(new Action(() => { form.hideInTaskbar(); Program.openStatusBar(); })); }
public void onLogout() { BrowserPopupForm f = Program.Windows.Items["landingPage"]; f.Invoke(new Action(() => { Program.CloseAllButLandingPage(); f.clearContextMenu(); f.SetTopNoActive(); CefSharp.Cef.GetGlobalCookieManager().DeleteCookiesAsync("", "").Wait(); })); }
public void closeAndLogout() { BrowserPopupForm f = Program.Windows.Items["landingPage"]; Task.Run(async() => { await Task.Delay(100); f.Invoke(new Action(() => { Program.CloseAllButLandingPage(); CefSharp.Cef.GetGlobalCookieManager().DeleteCookiesAsync("", "").Wait(); f.Browser.GetBrowser().MainFrame.ExecuteJavaScriptAsync("window.location.reload();"); f.clearContextMenu(); f.SetTopNoActive(); })); }); }
public static int showWindow(String windowId) { if (!Program.Windows.Items.ContainsKey(windowId)) { return(0); } else { BrowserPopupForm form = Program.Windows.Items[windowId]; if (form.InvokeRequired) { form.Invoke(new Action(() => { form.SetTopNoActive(); })); } else { form.SetTopNoActive(); } return(1); } }