Exemple #1
0
        /// <summary>Called when the engine has changed progress for the bundle installation.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnProgress(Wix.ProgressEventArgs args)
        {
            LogVerbose("Enter Method: OnProgress");
            WPFBootstrapperEventArgs <Wix.ProgressEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.ProgressEventArgs>(args);

            TryInvoke(new Action(() => { _mainWindow.OnProgress(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnProgress(cancelArgs.Arguments);
            }
            LogVerbose("Leaving Method: OnProgress");
        }
        /// <summary>Called when the engine has changed progress for the bundle installation.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnProgress(Wix.ProgressEventArgs args)
        {
            this.LogBootstrapperEnterEvent(args, "Progress");
            WPFBootstrapperEventArgs <Wix.ProgressEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.ProgressEventArgs>(args);

            this.TryInvoke(new Action(() => { this.model.OnProgress(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnProgress(cancelArgs.Arguments);
            }
            this.LogBootstrapperLeaveEvent(null, "Progress");
        }
 private void ApplyProgress(object sender, ProgressEventArgs e)
 {
     lock (this)
     {
         e.Result = this.root.Canceled ? Result.Cancel : Result.Ok;
     }
 }
		private void OnProgress(object sender, ProgressEventArgs e)
		{
			lock (_lock)
			{
				_acquireProgress = e.OverallPercentage;
				Progress = (_acquireProgress + _applyProgress) / _progressPhases;
				ComponentProgress = _acquireProgress / _progressPhases;

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

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

            RaiseCancelledIssue();
            e.Result = Result.Cancel;
        }
        Result IBootstrapperApplication.OnProgress(int dwProgressPercentage, int dwOverallPercentage)
        {
            ProgressEventArgs args = new ProgressEventArgs(dwProgressPercentage, dwOverallPercentage);
            this.OnProgress(args);

            return args.Result;
        }
 /// <summary>
 /// Called when the engine has changed progress for the bundle installation.
 /// </summary>
 /// <param name="args">Additional arguments for this event.</param>
 protected virtual void OnProgress(ProgressEventArgs args)
 {
     EventHandler<ProgressEventArgs> handler = this.Progress;
     if (null != handler)
     {
         handler(this, args);
     }
 }