Exemple #1
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");
            }
        }
Exemple #2
0
 public override IList <PopupWindowShowAction> GetStartupActions()
 {
     if (UseSQLAlternativeInfoSingleton.Instance.UseAlternative)
     {
         IList <PopupWindowShowAction> startupActions = base.GetStartupActions();
         PopupWindowShowAction         showUseSQLAlternativeInfoAction = new PopupWindowShowAction();
         IObjectSpace          objectSpace           = Application.CreateObjectSpace(typeof(UseSQLAlternativeInfo));
         UseSQLAlternativeInfo useSqlAlternativeInfo = objectSpace.GetObject <UseSQLAlternativeInfo>(UseSQLAlternativeInfoSingleton.Instance.Info);
         showUseSQLAlternativeInfoAction.CustomizePopupWindowParams += delegate(Object sender, CustomizePopupWindowParamsEventArgs e) {
             e.View = Application.CreateDetailView(objectSpace, useSqlAlternativeInfo, true);
             e.DialogController.CancelAction.Active["Required"] = false;
             e.IsSizeable = false;
         };
         startupActions.Add(showUseSQLAlternativeInfoAction);
         return(startupActions);
     }
     else
     {
         return(base.GetStartupActions());
     }
 }