/// <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> /// Initializes a new instance of the <see cref="InstallerWizard"/> class. /// </summary> /// <param name="uiContext">The owner of this object.</param> /// <param name="contentControl">Grid control to place content in.</param> /// <param name="dataModel">The UI view model.</param> /// <param name="noLogging">Specifies whether logging should occur.</param> public InstallerWizard( MainWindow uiContext, Grid contentControl, InstallerModel dataModel, bool noLogging = false) { _contentControl = contentControl; _dataModel = dataModel; _pages = new List <InstallerPageDescriptor>(); TokenProvider = new TokenProvider( ConfigurationManager.AppSettings[_clientIdAppSettingsKey], ConfigurationManager.AppSettings[_redirectUriAppSettingsKey], null, uiContext); string directoryPath = Path.GetDirectoryName(_logFilePath); if (!Directory.Exists(directoryPath)) { Directory.CreateDirectory(_logFilePath); } if (!noLogging) { _logFileStream = new StreamWriter(_logFilePath); _logFileStream.AutoFlush = true; } }
/// <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="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; }
/// <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="AzureInstallationControl"/> class. /// </summary> /// <param name="model">The view model to bind to this control.</param> /// <param name="context">The wizard context instance.</param> public AzureInstallationControl( InstallerModel model, InstallerWizard context) : base(model, context) { InitializeComponent(); SetOptions(); SetDefaults(); // TODO: Data binding isn't working WizardProgress.PagesSource = DataModel.Progress; }
/// <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; }
/// <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(); }