Beispiel #1
0
        private static bool DoLogin()
        {
            if (LoginFrm.IsDialogVisible)
            {
                return(false);
            }

            if ((mainForm != null) && (mainForm.InvokeRequired))
            {
                return((bool)mainForm.Invoke(new LoginDelegate(DoLogin)));
            }
            else
            {
                FormWait.HideWaitForm();

                if (LoginFrm.ShowLogin(mainForm) != DialogResult.OK)
                {
                    Application.Exit();
                    return(false);
                }

                FormWait.ShowWaitForm();

                DoInitServices();
                OnIdleService.AddTask(new OnIdleOneRunTask(NotificationService.RunDataCheck));
            }
            return(true);
        }
Beispiel #2
0
        public static DialogResult ShowLogin(IWin32Window wnd)
        {
            _IsDialogVisible = true;

            using (LoginFrm frm = new LoginFrm())
            {
                DialogResult res = frm.ShowDialog(wnd);
                _IsDialogVisible = false;
                return res;
            }
        }
Beispiel #3
0
        public static DialogResult ShowLogin(IWin32Window wnd)
        {
            _IsDialogVisible = true;

            using (LoginFrm frm = new LoginFrm())
            {
                DialogResult res = frm.ShowDialog(wnd);
                _IsDialogVisible = false;
                return(res);
            }
        }