Exemple #1
0
        /// <summary>Called by the engine while executing on payload.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnExecuteProgress(Wix.ExecuteProgressEventArgs args)
        {
            LogVerbose("Enter Method: OnExecuteProgress");
            WPFBootstrapperEventArgs <Wix.ExecuteProgressEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.ExecuteProgressEventArgs>(args);

            TryInvoke(new Action(() => { _mainWindow.OnExecuteProgress(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnExecuteProgress(cancelArgs.Arguments);
            }
            LogVerbose("Leaving Method: OnExecuteProgress");
        }
        /// <summary>Called by the engine while executing on payload.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnExecuteProgress(Wix.ExecuteProgressEventArgs args)
        {
            this.LogBootstrapperEnterEvent(args, "ExecuteProgress");
            WPFBootstrapperEventArgs <Wix.ExecuteProgressEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.ExecuteProgressEventArgs>(args);

            this.TryInvoke(new Action(() => { this.model.OnExecuteProgress(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnExecuteProgress(cancelArgs.Arguments);
            }
            this.LogBootstrapperLeaveEvent(null, "ExecuteProgress");
        }
        private void ApplyExecuteProgress(object sender, ExecuteProgressEventArgs e)
        {
            lock (this)
            {

                this.executeProgress = e.OverallPercentage;
                this.Progress = (this.cacheProgress + this.executeProgress) / 2;

                if (WixBA.Model.Command.Display == Display.Embedded)
                {
                    WixBA.Model.Engine.SendEmbeddedProgress(e.ProgressPercentage, this.Progress);
                }

                e.Result = this.root.Canceled ? Result.Cancel : Result.Ok;
            }
        }
		private void OnExecuteProgress(object sender, ExecuteProgressEventArgs e)
		{
			lock (_lock)
			{
				_applyProgress = e.OverallPercentage;

				ComponentProgress = _applyProgress / _progressPhases;
				Progress = (_acquireProgress + _applyProgress) / _progressPhases;

				if (_installer.Command.Display == Display.Embedded)
				{
					_engine.SendEmbeddedProgress(e.ProgressPercentage, Progress);
				}

				e.Result = _mainVmFactory.GetViewModelInstance().Cancelled ? Result.Cancel : Result.Ok;
			}
		}
Exemple #5
0
        void ExecuteProgressHandler(object sender, ExecuteProgressEventArgs e)
        {
            if (!Cancelled) return;

            Logger.Standard("Execute Process cancelled handler - {0}", InstallationState);
            if (!AskCancel())
            {
                Cancelled = false;
                return;
            }

            RaiseCancelledIssue();
            e.Result = Result.Cancel;
        }
        Result IBootstrapperApplication.OnExecuteProgress(string wzPackageId, int dwProgressPercentage, int dwOverallPercentage)
        {
            ExecuteProgressEventArgs args = new ExecuteProgressEventArgs(wzPackageId, dwProgressPercentage, dwOverallPercentage);
            this.OnExecuteProgress(args);

            return args.Result;
        }
 /// <summary>
 /// Called by the engine while executing on payload.
 /// </summary>
 /// <param name="args">Additional arguments for this event.</param>
 protected virtual void OnExecuteProgress(ExecuteProgressEventArgs args)
 {
     EventHandler<ExecuteProgressEventArgs> handler = this.ExecuteProgress;
     if (null != handler)
     {
         handler(this, args);
     }
 }
 void ExecuteProgressHandler(object sender, ExecuteProgressEventArgs e)
 {
     lock (this)
     {
         Subtitle = string.Format("{0}% complete", e.ProgressPercentage);
         e.Result = Result.Ok;
     }
 }
        private void ApplyExecuteProgress(object sender, ExecuteProgressEventArgs e)
        {
            lock (this)
            {
                ExecuteProgress = e.OverallPercentage;
                OverallProgress = (CacheProgress + ExecuteProgress) / 2;

                if (Bootstrapper.Model.Command.Display == Display.Embedded)
                    Bootstrapper.Model.Engine.SendEmbeddedProgress(e.ProgressPercentage, OverallProgress);

                e.Result = _root.Canceled ? Result.Cancel : Result.Ok;
            }
        }
        private void Bootstrapper_ExecuteProgress(object sender, ExecuteProgressEventArgs e)
        {
            // If setup has failed, set the Result to Error to let Engine know
            // about the state.
            if (this.setupFailed)
            {
                e.Result = Result.Cancel;

                this.Invoke((MethodInvoker)delegate
                {
                    this.label4.Text = BootstrapperResources.ProgressSetupFailedMessage;
                });
            }
            else
            {
                this.Invoke((MethodInvoker)delegate
                {
                    this.packageName = MsiPackages.MsiPackageMap[e.PackageId];
                    this.label4.Text = string.Format(ProgressStatus(), packageName);
                });
            }
        }
        private void ApplyExecuteProgress(object sender, ExecuteProgressEventArgs e)
        {
            lock (this)
            {
                this.ExecuteProgress = e.OverallPercentage;

                if (ba.Command.Display == Display.Embedded)
                {
                    ba.Engine.SendEmbeddedProgress(e.ProgressPercentage, this.Progress);
                }

                e.Result = this.Cancelled ? Result.Cancel : Result.Ok;
            }
        }