private void Bootstrapper_ApplyComplete(object sender, ApplyCompleteEventArgs e)
        {
            if (e.Status != 0)
            {
                BootstrapperManager.Instance.SetupExitState = Result.Cancel;
            }

            this.Invoke((MethodInvoker)delegate
            {
                DialogManager.Instance.Go<ExitDialog>();
            });
        }
        /// <summary>Called when the engine has completed installing the bundle.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnApplyComplete(Wix.ApplyCompleteEventArgs args)
        {
            this.LogBootstrapperEnterEvent(args, "ApplyComplete");
            WPFBootstrapperEventArgs <Wix.ApplyCompleteEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.ApplyCompleteEventArgs>(args);

            this.TryInvoke(new Action(() => { this.model.OnApplyComplete(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnApplyComplete(cancelArgs.Arguments);
            }
            this.LogBootstrapperLeaveEvent(null, "ApplyComplete");
        }
Example #3
0
        /// <summary>Called when the engine has completed installing the bundle.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnApplyComplete(Wix.ApplyCompleteEventArgs args)
        {
            LogVerbose("Enter Method: OnApplyComplete");
            WPFBootstrapperEventArgs <Wix.ApplyCompleteEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.ApplyCompleteEventArgs>(args);

            TryInvoke(new Action(() => { _mainWindow.OnApplyComplete(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                Threading.Dispatcher.ExitAllFrames();
                Engine.Quit(args.Status);
                base.OnApplyComplete(cancelArgs.Arguments);
            }
            LogVerbose("Leaving Method: OnApplyComplete");
        }
Example #4
0
        private void ApplyComplete(object sender, ApplyCompleteEventArgs e)
        {
            Cursor = Cursors.Arrow;
            BaseModel.Result = e.Status; // remember the final result of the apply.
            BaseModel.UploadLogEntry("Install", "Action {0} completed, result = {1}", BaseModel.PlannedAction, e.Status);

            // If we're not in Full UI mode, we need to alert the dispatcher to stop and close the window for passive.
            if (Display.Full != BaseModel.Command.Display)
            {
                // If its passive, send a message to the window to close.
                if (Display.Passive == BaseModel.Command.Display)
                {
                    Logger.Verbose("Automatically closing the window for non-interactive install");
                    Dispatcher.BeginInvoke((Action)(() => View.Close()));
                }
                else
                {
                    Dispatcher.InvokeShutdown();
                }
            }

            else if (Hresult.Succeeded(e.Status) && InstallActions.UpdateReplace == BaseModel.PlannedAction) // if we successfully applied an update close the window since the new Bundle should be running now.
            {
                Logger.Standard("Automatically closing the window since update successful.");
                Dispatcher.BeginInvoke((Action)(() => Close(e.Status)));
            }

            // Set the state to applied or failed unless the state has already been set back to the preapply state
            // which means we need to show the UI as it was before the apply started.
            if (InstallationState == PreApplyState) return;

            Logger.Error("Installation state ({0}) != pre-apply state ({1})", InstallationState, PreApplyState);
            if (!Hresult.Succeeded(e.Status))
            {
                InstallationState = InstallationState.Failed;
                return;
            }

            Logger.Error("Planned action = {0}", BaseModel.PlannedAction);
            InstallationState = BaseModel.PlannedAction.SuccessState;
        }
Example #5
0
 private void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
 {
     _completionSource.TrySetResult(true);
 }
Example #6
0
        private void ApplyComplete(object sender, ApplyCompleteEventArgs e)
        {
            WixBA.Model.Result = e.Status; // remember the final result of the apply.

            // If we're not in Full UI mode, we need to alert the dispatcher to stop and close the window for passive.
            if (Bootstrapper.Display.Full != WixBA.Model.Command.Display)
            {
                // If its passive, send a message to the window to close.
                if (Bootstrapper.Display.Passive == WixBA.Model.Command.Display)
                {
                    WixBA.Model.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install");
                    WixBA.Dispatcher.BeginInvoke((Action)delegate()
                    {
                        WixBA.View.Close();
                    }
                    );
                }
                else
                {
                    WixBA.Dispatcher.InvokeShutdown();
                }
            }
            else if (Hresult.Succeeded(e.Status) && LaunchAction.UpdateReplace == WixBA.Model.PlannedAction) // if we successfully applied an update close the window since the new Bundle should be running now.
            {
                WixBA.Model.Engine.Log(LogLevel.Verbose, "Automatically closing the window since update successful.");
                WixBA.Dispatcher.BeginInvoke((Action)delegate()
                {
                    WixBA.View.Close();
                }
                );
            }

            // Set the state to applied or failed unless the state has already been set back to the preapply state
            // which means we need to show the UI as it was before the apply started.
            if (this.root.InstallState != this.root.PreApplyState)
            {
                this.root.InstallState = Hresult.Succeeded(e.Status) ? InstallationState.Applied : InstallationState.Failed;
            }
        }
Example #7
0
 /// <summary>
 /// Called when the engine has completed installing the bundle.
 /// </summary>
 /// <param name="args">Additional arguments for this event.</param>
 protected virtual void OnApplyComplete(ApplyCompleteEventArgs args)
 {
     EventHandler<ApplyCompleteEventArgs> handler = this.ApplyComplete;
     if (null != handler)
     {
         handler(this, args);
     }
 }
Example #8
0
        Result IBootstrapperApplication.OnApplyComplete(int hrStatus, ApplyRestart restart)
        {
            ApplyCompleteEventArgs args = new ApplyCompleteEventArgs(hrStatus, restart);
            this.OnApplyComplete(args);

            this.applying = false;

            return args.Result;
        }
        private void ApplyComplete(object sender, ApplyCompleteEventArgs e)
        {
            // If we're not in Full UI mode, we need to alert the dispatcher to stop and close the window for passive.
            if (ba.Command.Display != Display.Full)
            {
                // If its passive, send a message to the window to close.
                if (ba.Command.Display == Display.Passive)
                {
                    ba.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install");
                    this.TryClose();
                }
                else
                {
                    Application.Current.Shutdown();
                }
            }

            // Set the state to applied or failed unless the state has already been set back to the preapply state
            // which means we need to show the UI as it was before the apply started.
            if (this.State != this.PreApplyState)
            {
                this.State = HResultSucceeded(e.Status) ? InstallationState.Applied : InstallationState.Failed;
            }
        }
 /// <summary>
 /// Method that gets invoked when the Bootstrapper ApplyComplete event is fired.
 /// This is called after a bundle installation has completed. Make sure we updated the view.
 /// </summary>
 private void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
 {
     IsThinking = false;
     InstallEnabled = false;
     UninstallEnabled = false;
 }
Example #11
0
 /// <summary>
 /// Method that gets invoked when the Bootstrapper ApplyComplete event is fired.
 /// This is called after a bundle installation has completed. Make sure we updated the view.
 /// </summary>
 void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
 {
     done.Set();
 }
        private void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
        {
            ExitCode = e.Status;

            if (_installer.Command.Display != Display.Full)
            {
                _engine.Log(LogLevel.Verbose, Resources.AutomaticallyExitForNonInteractiveMode);
                _mainVmFactory.GetViewModelInstance().Shutdown(ExitCode);
            }
            
            Reboot = e.Restart != ApplyRestart.None;
            if (!HResult.Succeeded(e.Status))
            {
                if (_mainVmFactory.GetViewModelInstance().Cancelled)
                {
                    Cancel();
                }
                else
                {
                    Fail();
                }
            }
        }
Example #13
0
 /// <summary>
 /// Method that gets invoked when the Bootstrapper ApplyComplete event is fired.
 /// This is called after a bundle installation has completed. Make sure we updated the view.
 /// </summary>
 void ManagedBA_ApplyComplete(object sender, ApplyCompleteEventArgs e)
 {
     done.Set();
 }
        private void ApplyComplete(object sender, ApplyCompleteEventArgs e)
        {
            // If we're not in Full UI mode, we need to alert the dispatcher to stop and close the window for passive.
            if (Display.Full != Bootstrapper.Model.Command.Display)
            {
                // If its passive, send a message to the window to close.
                if (Display.Passive == Bootstrapper.Model.Command.Display)
                {
                    Bootstrapper.Model.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install");
                    Bootstrapper.Dispatcher.BeginInvoke((Action)(() => Bootstrapper.View.Close()));
                }
                else
                    Bootstrapper.Dispatcher.InvokeShutdown();
            }

            // Set the state to applied or failed unless the state has already been set back to the preapply state
            // which means we need to show the UI as it was before the apply started.
            if (_root.State != _root.PreApplyState)
                _root.State = Hresult.Succeeded(e.Status) ? InstallationState.Applied : InstallationState.Failed;
        }
Example #15
0
		void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
		{
			IsThinking = false;
			IsInstallEnabled = false;
			IsUninstallEnabled = false;
			HeaderText = "Готово";
		}
Example #16
0
		void ApplyComplete(object sender, ApplyCompleteEventArgs e)
		{
			FiresecUX.Model.Result = e.Status; // remember the final result of the apply.

			// If we're not in Full UI mode, we need to alert the dispatcher to stop and close the window for passive.
			if (Microsoft.Tools.WindowsInstallerXml.Bootstrapper.Display.Full != FiresecUX.Model.Command.Display)
			{
				// If its passive, send a message to the window to close.
				if (Microsoft.Tools.WindowsInstallerXml.Bootstrapper.Display.Passive == FiresecUX.Model.Command.Display)
				{
					FiresecUX.Model.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install");
					FiresecUX.Dispatcher.BeginInvoke((Action)delegate()
					{
						FiresecUX.View.Close();
					}
					);
				}
				else
				{
					FiresecUX.Dispatcher.InvokeShutdown();
				}
			}

			// Set the state to applied or failed unless the state has already been set back to the preapply state
			// which means we need to show the UI as it was before the apply started.
			if (_root.State != _root.PreApplyState)
			{
				_root.State = Hresult.Succeeded(e.Status) ? InstallationState.Applied : InstallationState.Failed;
			}
		}
 /// <summary>
 /// Method that gets invoked when the Bootstrapper ApplyComplete event is fired.
 /// This is called after a bundle installation has completed. Make sure we updated the view.
 /// </summary>
 void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
 {
     this.SetupExitState = e.Result;
 }
Example #18
0
 /// <summary>
 /// Method that gets invoked when the Bootstrapper ApplyComplete event is fired.
 /// This is called after a bundle installation has completed. Make sure we updated the view.
 /// </summary>
 void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
 {
     IsBusy = false;
     InstallEnabled = false;
     UninstallEnabled = false;
 }
		private void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
		{
			if (_installer.Command.Display == Display.Full)
			{
				_isValid = true;
				_applyProgress = 100;
				ComponentProgress = 100;
				_mainVmFactory.GetViewModelInstance().MoveNextCommand.Execute(null);
			}
		}
		private void OnApplyComplete(object sender, ApplyCompleteEventArgs e)
		{
			IsApplying = false;
		}