コード例 #1
0
        protected override void CompleteDialogExtention()
        {
            ApplicationController.ResolveType <ISettingsManager>().SaveSettingsObject(SettingsObject);
            ApplicationController.RegisterInstance <TSettingsInterface>(SettingsObject);
            if (CompletionMessage == null)
            {
                CompletionMessage = "The Settings Have Been Saved";
            }

            if (OverideCompletionScreenMethod == null && !HasParentDialog)
            {
                //okay in this case let set the dialog to
                //keep appending the settings entry to itself when completed
                OverideCompletionScreenMethod = ()
                                                =>
                {
                    //append new dialog for the setting entry and
                    //trigger this dialog to start it
                    var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, LookupService,
                                                                  null, OnSave, null, saveButtonLabel: "Save", cancelButtonLabel: "Close", initialMessage: "Changes Have Been Saved");
                    SubDialogs             = SubDialogs.Union(new[] { configEntryDialog }).ToArray();
                    DialogCompletionCommit = false;
                    StartNextAction();
                };
            }
        }
コード例 #2
0
        public AppXrmConnectionEntryDialog(IDialogController applicationController)
            :       base(applicationController)
        {
            ObjectToEnter = new SavedXrmRecordConfiguration();
            var configEntryDialog = new ObjectEntryDialog(ObjectToEnter, this, ApplicationController, saveButtonLabel: "Next");

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
コード例 #3
0
        public AppXrmConnectionEntryDialog(DialogViewModel parentDialog, XrmRecordService xrmRecordService)
            : base(parentDialog)
        {
            ObjectToEnter = new SavedXrmRecordConfiguration();
            var configEntryDialog = new ObjectEntryDialog(ObjectToEnter, this, ApplicationController, saveButtonLabel: "Next");

            SubDialogs       = new DialogViewModel[] { configEntryDialog };
            XrmRecordService = xrmRecordService;
        }
コード例 #4
0
        protected AppSettingsDialog(DialogViewModel parentDialog, IRecordService lookupService, TSettingsObject objectToEnter)
            : base(parentDialog)
        {
            SettingsObject = objectToEnter;
            var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, lookupService,
                                                          null, OnSave, null, saveButtonLabel: "Next");

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
コード例 #5
0
        public XrmSettingsDialog(IDialogController dialogController)
            : base(dialogController)
        {
            SettingsObject = new EncryptedXrmConfiguration();
            var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, null,
                                                          null);

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
コード例 #6
0
        protected AppSettingsDialog(IDialogController dialogController,
                                    IRecordService lookupService, TSettingsObject objectToEnter)
            : base(dialogController)
        {
            SettingsObject = objectToEnter;
            var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, lookupService,
                                                          null, OnSave, null);

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
コード例 #7
0
        public ConnectionEntryDialog(IDialogController dialogController, SavedXrmRecordConfiguration objectToEnter, IVisualStudioService visualStudioService, bool addtoSolution)
            : base(dialogController)
        {
            VisualStudioService = visualStudioService;
            AddToSolution       = addtoSolution;
            ObjectToEnter       = objectToEnter;
            var configEntryDialog = new ObjectEntryDialog(ObjectToEnter, this, ApplicationController);

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
コード例 #8
0
        public ObjectEncryptDialog(IDialogController dialogController)
            : base(dialogController)
        {
            EnteredObject = new T();
            SaveTo        = new ObjectEncryptToFolder();
            var configEntryDialog  = new ObjectEntryDialog(EnteredObject, this, ApplicationController);
            var saveToFolderDialog = new ObjectEntryDialog(SaveTo, this, ApplicationController);

            SubDialogs = new DialogViewModel[] { configEntryDialog, saveToFolderDialog };
        }
コード例 #9
0
        protected AppSettingsDialog(IDialogController dialogController,
                                    IRecordService lookupService, TSettingsObject objectToEnter, string saveButtonLabel = null)
            : base(dialogController)
        {
            LookupService  = lookupService;
            SettingsObject = objectToEnter;
            var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, lookupService,
                                                          null, OnSave, null, saveButtonLabel: saveButtonLabel ?? "Save");

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
コード例 #10
0
        public ConnectionEntryDialog(DialogViewModel parentDialog, SavedXrmRecordConfiguration objectToEnter, IVisualStudioService visualStudioService, bool addtoSolution, Action doPostEntry = null)
            : base(parentDialog)
        {
            VisualStudioService = visualStudioService;
            AddToSolution       = addtoSolution;
            ObjectToEnter       = objectToEnter;
            var configEntryDialog = new ObjectEntryDialog(ObjectToEnter, this, ApplicationController, saveButtonLabel: "Next");

            SubDialogs  = new DialogViewModel[] { configEntryDialog };
            DoPostEntry = doPostEntry;
        }
コード例 #11
0
        public CreateOrUpdateSqlDialog(IDialogController dialogController, ISqlRecordMetadataService recordService, T objectLoaded)
            : base(dialogController)
        {
            SqlObject = objectLoaded;
            if (objectLoaded == null)
            {
                SqlObject = new T();
            }
            RecordService = recordService;

            var configEntryDialog = new ObjectEntryDialog(SqlObject, this, ApplicationController, RecordService,
                                                          null, () => { SaveObject(); }, null);

            SubDialogs = new DialogViewModel[] { configEntryDialog };
        }
コード例 #12
0
        public ServiceRequestDialog(TService service, IDialogController dialogController, IRecordService lookupService, TRequest request = null, Action onClose = null)
            : base(dialogController)
        {
            if (onClose != null)
            {
                OnCancel = onClose;
            }

            Service = service;

            if (request != null)
            {
                Request = request;
            }
            else
            {
                Request = ApplicationController.ResolveType <TRequest>();
            }

            ConfigEntryDialog = new ObjectEntryDialog(Request, this, ApplicationController, lookupService, null, null, onClose);
            SubDialogs        = new DialogViewModel[] { ConfigEntryDialog };
        }