Exemplo n.º 1
0
 public void onLogin()
 {
     form.Invoke(new Action(() => {
         form.hideInTaskbar();
         Program.openStatusBar();
     }));
 }
Exemplo n.º 2
0
        public void onLogout()
        {
            BrowserPopupForm f = Program.Windows.Items["landingPage"];

            f.Invoke(new Action(() => {
                Program.CloseAllButLandingPage();
                f.clearContextMenu();
                f.SetTopNoActive();
                CefSharp.Cef.GetGlobalCookieManager().DeleteCookiesAsync("", "").Wait();
            }));
        }
Exemplo n.º 3
0
        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();
                }));
            });
        }
Exemplo n.º 4
0
        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);
            }
        }