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
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (!DesignMode)
     {
         AssignLanguage();
         LoadLanguages();
         Text =
             string.Format("{0} - '{1}'", GetLocalized("MainWindowCaption"),
                           ClientEnvironment.AuthorizationService.GetCurrentUser().LoginName);
         FormWait.HideWaitForm();
     }
 }
Beispiel #3
0
        private static void GenuineGlobalEventProvider_GenuineChannelsGlobalEvent(object sender, GenuineEventArgs e)
        {
            switch (e.EventType)
            {
            case GenuineEventType.HostResourcesReleased:
                if (!DoLogin())
                {
                    return;
                }
                FormWait.HideWaitForm();
                break;

            default:
                log.Debug(string.Format("{0} - GenuineChannelsGlobalEvent: {1}", e.HostInformation.Url, e.EventType));
                break;
            }
        }