/// <summary> /// Initializes a new instance of the <see cref="DeployPowerAppsInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public DeployPowerAppsInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); SequentialRunner = new OperationRunner( model.OperationsProgress, this, WizardContext.LogFileStream); LogOutputControl = DetailsRichTextBox; SequentialRunner.OnLog += WriteLog; SequentialRunner.OnComplete += SequentialRunner_OnComplete; DataModel.CurrentOperationRunner = SequentialRunner; DataModel.SuccessFinalStatusMessage = "Advocacy Platform installed successfully."; DataModel.FailureFinalStatusMessage = "Advocacy Platform failed to install."; // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; OperationsProgressControl.OperationsSource = DataModel.OperationsProgress; QueueOperations(); SequentialRunner.BeginOperationsAsync(); }
/// <summary> /// Event handler for the Next button. /// </summary> /// <param name="context">The wizard context instance.</param> public override void HandleNext(InstallerWizard context) { bool continueAction = true; DataModel.InstallationConfiguration.Features.Features = new List <Feature>(); switch (DataModel.InstallerAction) { case InstallerActionType.New: BuildNewInstallationFeatureTree(); break; case InstallerActionType.Modify: continueAction = GetConfiguration(); BuildUpdateFeatureTree(); break; case InstallerActionType.Remove: continueAction = GetConfiguration(); SetUninstallMode(context); break; } if (continueAction) { context.NextPage(); } }
/// <summary> /// Initializes a new instance of the <see cref="InstallerConfirmActionsInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public InstallerConfirmActionsInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); SequentialRunner = new OperationRunner( model.OperationsProgress, this, WizardContext.LogFileStream); SequentialRunner.IndeterminateOps = true; LogOutputControl = DetailsRichTextBox; SequentialRunner.OnLog += WriteLog; SequentialRunner.OnComplete += SequentialRunner_OnComplete; DataModel.CurrentOperationRunner = SequentialRunner; // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; BuildSummary(); QueueOperations(); SequentialRunner.BeginOperationsAsync(); }
/// <summary> /// Initializes a new instance of the <see cref="FeatureSelectionInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public FeatureSelectionInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; }
/// <summary> /// Initializes a new instance of the <see cref="WizardPageBase"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public WizardPageBase(InstallerModel model, InstallerWizard context) { DataContext = DataModel = model; WizardContext = context; WizardContext.OnNext += WizardContext_OnNext; WizardContext.OnPrevious += WizardContext_OnPrevious; WizardContext.OnCancel += WizardContext_OnCancel; WizardContext.OnFinish += WizardContext_OnFinish; }
/// <summary> /// Initializes a new instance of the <see cref="WelcomeInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public WelcomeInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); DataModel.NextEnabled = true; DataModel.InstallerAction = InstallerActionType.New; WizardContext.LoadPagesCheckpoint(); }
/// <summary> /// Initializes a new instance of the <see cref="DependenciesControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public DependenciesControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); ConsentBrowser.Navigating += ConsentBrowser_Navigating; // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; }
private void SetUninstallMode(InstallerWizard wizard) { DataModel.InstallationConfiguration.Azure.ShouldDelete = true; DataModel.InstallationConfiguration.Azure.ShouldDeleteAppRegistration = true; DataModel.InstallationConfiguration.Azure.Luis.ShouldDelete = true; DataModel.InstallationConfiguration.PowerApps.ShouldDelete = true; wizard.RemovePage(typeof(FeatureSelectionInstallationControl)); wizard.AddPage(typeof(UninstallInstallationControl), UninstallInstallationControl.PageName, UninstallInstallationControl.PageDescription, false, false); wizard.AddPage(typeof(InstallerConfirmActionsInstallationControl), "Confirm Uninstall", "Confirm the removal of resources.", false, true); wizard.AddPage(typeof(UninstallRemoveInstallationControl), UninstallRemoveInstallationControl.PageName, UninstallRemoveInstallationControl.PageDescription, false, true); wizard.AddPage(typeof(InstallerCompleteInstallationControl), InstallerCompleteInstallationControl.PageName, InstallerCompleteInstallationControl.PageDescription, true, false); }
/// <summary> /// Sets the operations for a selected installer action. /// </summary> /// <param name="wizardContext">The wizard context instance.</param> private void SetOperations(InstallerWizard wizardContext) { switch (DataModel.InstallerAction) { case InstallerActionType.New: BuildInstallationSteps(wizardContext); break; case InstallerActionType.Modify: BuildUpdateSteps(wizardContext); break; } }
/// <summary> /// Event handler for the Finish button. /// </summary> /// <param name="context">The wizard context instance.</param> public override void HandleFinish(InstallerWizard context) { if (!DataModel.InstallationConfiguration.IsSaved && DataModel.InstallerAction != InstallerActionType.Remove) { Dispatcher.Invoke(new Action(() => { MessageBoxResult result = MessageBox.Show("You did not save the installation configuration. Without this file you will need to manually enter information to perform upgrades or removals.\n\nWould you like to save the installation configuration before closing the installer?", "Warning: Please save installation configuration", MessageBoxButton.YesNo, MessageBoxImage.Warning); if (result == MessageBoxResult.Yes) { InstallationConfigurationSaveHyperlink_Click(this, new RoutedEventArgs()); } Application.Current.MainWindow.Close(); })); } }
/// <summary> /// Initializes a new instance of the <see cref="AzureFunctionAppInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public AzureFunctionAppInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); SequentialRunner = new OperationRunner( model.OperationsProgress, this, WizardContext.LogFileStream); SequentialRunner.OnLog += WriteLog; SetDefaults(); // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; }
private void BuildUpdateSteps(InstallerWizard wizardContext) { Feature uiComponents = DataModel.InstallationConfiguration.Features[FeatureNames.UIComponents]; if (uiComponents.ShouldInstall) { wizardContext.BuildWizard(uiComponents, DataModel.InstallationConfiguration.Features); } Feature apiComponents = DataModel.InstallationConfiguration.Features[FeatureNames.APIComponents]; if (apiComponents.ShouldInstall) { wizardContext.BuildWizard(apiComponents, DataModel.InstallationConfiguration.Features); } wizardContext.AddPage(typeof(InstallerCompleteInstallationControl), null, null, true, false); }
/// <summary> /// Initializes a new instance of the <see cref="DynamicsCRMSolutionInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public DynamicsCRMSolutionInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); LogOutputControl = DetailsRichTextBox; DataModel.SuccessFinalStatusMessage = "Advocacy Platform installed successfully."; DataModel.FailureFinalStatusMessage = "Advocacy Platform failed to install."; SetOptions(); SetDefaults(); // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; }
/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> public MainWindow() { InitializeComponent(); DataModel = new InstallerModel(this); DataContext = DataModel; DataModel.StatusMessageBgColor = (SolidColorBrush)Background; DataModel.StatusMessageFgColor = (SolidColorBrush)Foreground; DataModel.InstallationConfiguration.Features = new FeatureTree(); Wizard = new InstallerWizard(this, WizardPageGrid, DataModel) .AddPage(typeof(WelcomeInstallationControl), null, null, false, false) .AddPage(typeof(DependenciesControl), "Dependency Check", "Checking to ensure dependencies for deployment are available.", false, false) .AddPage(typeof(FeatureSelectionInstallationControl), "Feature Selection", "Select the features you want to install/deploy.", false, false); Wizard.SetPagesCheckpoint(); Wizard.Start(); }
/// <summary> /// Initializes a new instance of the <see cref="PowerAppsInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public PowerAppsInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); LogOutputControl = DetailsRichTextBox; DataModel.SuccessFinalStatusMessage = "Advocacy Platform installed successfully."; DataModel.FailureFinalStatusMessage = "Advocacy Platform failed to install."; DataModel.InstallationConfiguration.PowerApps.PropertyChanged -= PowerApps_PropertyChanged; DataModel.InstallationConfiguration.PowerApps.PropertyChanged += PowerApps_PropertyChanged; SetOptions(); SetDefaults(); // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; }
/// <summary> /// Initializes a new instance of the <see cref="InstallerCompleteInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public InstallerCompleteInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); DataModel.FinishEnabled = true; DataModel.ShowPrevious = false; DataModel.ShowNext = false; DataModel.ShowCancel = false; DataModel.IsFinished = true; BuildFinalMessage(); if (DataModel.IsSuccess) { if (File.Exists(InstallationConfiguration.InstallationConfigurationFilePath)) { File.Delete(InstallationConfiguration.InstallationConfigurationFilePath); } } }
/// <summary> /// Initializes a new instance of the <see cref="DeployDynamicsCRMSolutionInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public DeployDynamicsCRMSolutionInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); SequentialRunner = new OperationRunner( model.OperationsProgress, this, WizardContext.LogFileStream); LogOutputControl = DetailsRichTextBox; SequentialRunner.OnLog += WriteLog; SequentialRunner.OnComplete += SequentialRunner_OnComplete; DataModel.CurrentOperationRunner = SequentialRunner; _dynamicsCrmClient = new DynamicsCrmClient( DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.OrganizationName, DataModel.InstallationConfiguration.PowerApps.SelectedEnvironment.OrganizationDomainName, WizardContext.TokenProvider); _dynamicsCrmClient.SetLogger(SequentialRunner.Logger); DataModel.SuccessFinalStatusMessage = "Advocacy Platform installed successfully."; DataModel.FailureFinalStatusMessage = "Advocacy Platform failed to install."; // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; OperationsProgressControl.OperationsSource = DataModel.OperationsProgress; QueueOperations(); SequentialRunner.BeginOperationsAsync(); }
/// <summary> /// Handles the click event for the Next button. /// </summary> /// <param name="context">The installer wizard context instance.</param> public override void HandleNext(InstallerWizard context) { SetOperations(context); base.HandleNext(context); }