示例#1
0
        public void Logout()
        {
            Tracing.Tracer.LogSeparator("Application is being restarted");
            if (!ignoreUserModelDiffs)
                SaveModelChanges();

            ShowViewStrategy.CloseAllWindows();
            Security.Logoff();
            Tracing.Tracer.LogSeparator("Application is now restarting");
            Setup();
            if (SecuritySystem.Instance.NeedLogonParameters)
            {
                Tracing.Tracer.LogText("Logon With Parameters");
                PopupWindowShowAction showLogonAction = CreateLogonAction();
                showLogonAction.Cancel += showLogonAction_Cancel;
                var helper = new PopupWindowShowActionHelper(showLogonAction);

                using (WinWindow popupWindow = helper.CreatePopupWindow(false))
                    ShowLogonWindow(popupWindow);
            }
            else
                Logon(null);

            ProcessStartupActions();
            ShowStartupWindow();
            Tracing.Tracer.LogSeparator("Application running");
        }
示例#2
0
        protected override void ProcessStartupActions()
        {
            base.ProcessStartupActions();
            if (UseSQLAlternativeInfoSingleton.Instance.UseAlternative)
            {
                PopupWindowShowAction showUseSQLAlternativeInfoAction = new PopupWindowShowAction();
                IObjectSpace          objectSpace           = this.CreateObjectSpace(typeof(UseSQLAlternativeInfo));
                UseSQLAlternativeInfo useSqlAlternativeInfo = objectSpace.GetObject <UseSQLAlternativeInfo>(UseSQLAlternativeInfoSingleton.Instance.Info);
                showUseSQLAlternativeInfoAction.CustomizePopupWindowParams += delegate(Object sender, CustomizePopupWindowParamsEventArgs e) {
                    e.View = this.CreateDetailView(objectSpace, useSqlAlternativeInfo, true);
                    e.DialogController.CancelAction.Active["Required"] = false;
                    e.IsSizeable = false;
                };
                Tracing.Tracer.LogVerboseText("showSQLAlternativeInfoAction is executing");
                StopSplash();//Dennis: We do not need to display splash while these startup windows are shown.
                showUseSQLAlternativeInfoAction.Application      = this;
                showUseSQLAlternativeInfoAction.HandleException += (s, e) => {
                    if (!e.Handled)
                    {
                        HandleException(e.Exception);
                        e.Handled = true;
                    }
                };

                using (PopupWindowShowActionHelper helper = new PopupWindowShowActionHelper(showUseSQLAlternativeInfoAction)) {
                    helper.ShowPopupWindow();
                }
                Tracing.Tracer.LogText("showSQLAlternativeInfoAction executed");
            }
        }
 protected override void ShowObjectCore() {
     var helper = new PopupWindowShowActionHelper(ShowObjectAction);
     helper.ShowPopupWindow();
 }
示例#4
0
        protected override void ShowObjectCore()
        {
            var helper = new PopupWindowShowActionHelper(ShowObjectAction);

            helper.ShowPopupWindow();
        }