示例#1
0
        /// <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();
        }
示例#2
0
        /// <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();
        }
示例#3
0
        /// <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();
        }