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(); }; } }
public AppXrmConnectionEntryDialog(IDialogController applicationController) : base(applicationController) { ObjectToEnter = new SavedXrmRecordConfiguration(); var configEntryDialog = new ObjectEntryDialog(ObjectToEnter, this, ApplicationController, saveButtonLabel: "Next"); SubDialogs = new DialogViewModel[] { configEntryDialog }; }
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; }
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 }; }
public XrmSettingsDialog(IDialogController dialogController) : base(dialogController) { SettingsObject = new EncryptedXrmConfiguration(); var configEntryDialog = new ObjectEntryDialog(SettingsObject, this, ApplicationController, null, null); SubDialogs = new DialogViewModel[] { configEntryDialog }; }
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 }; }
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 }; }
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 }; }
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 }; }
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; }
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 }; }
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 }; }