private void OnApplyComplete(object sender, ApplyCompleteEventArgs e) { IsThinking = false; InstallEnabled = false; UninstallEnabled = false; this.Progress = 100; }
protected void ApplyComplete(object sender, ApplyCompleteEventArgs e) { _model.LogMessage("ApplyComplete event fired."); if (this.Action == LaunchAction.Install) { this.Message = "Installation Completed Successfully"; } else if (this.Action == LaunchAction.Uninstall) { this.Message = "Uninstallation Completed Successfully"; } _model.LogMessage(string.Format("FinalResult : {0}", e.Result)); this._model.FinalResult = e.Status; this.FinishVisible = true; this.InstallVisible = false; this.UninstallVisible = false; if (this.DisplayLevel == Display.None) { CustomBootstrapperApplication.Dispatcher.InvokeShutdown(); } }
/// <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 OnApplyCompleteUiUpdate(object sender, ApplyCompleteEventArgs e) { ExitCode = e.Status; IsThinking = false; InstallEnabled = false; UninstallEnabled = false; }
private void ApplyComplete(object sender, ApplyCompleteEventArgs e) { // 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; if (State == InstallationState.Applied) { _agg.PublishOnBackgroundThread(new TerminationMessages.Success("Installed successfully. GLHF.")); } else { _agg.PublishOnBackgroundThread(new TerminationMessages.Error("Installation failed. No changes have been made to your computer.")); } } // 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.Command.Display == Display.Embedded) { _ba.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install"); this.TryClose(); } else { Application.Current.Shutdown(); } } }
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(); } } // 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.State != this.root.PreApplyState) { this.root.State = Hresult.Succeeded(e.Status) ? InstallationState.Applied : InstallationState.Failed; } }
private void Bootstrapper_ApplyComplete(object sender, ApplyCompleteEventArgs e) { Log(LogLevel.Debug, $"Bootstrapper has called {nameof(this.Bootstrapper_ApplyComplete)}"); lock (this) { Bootstrapper.ApplyComplete -= Bootstrapper_ApplyComplete; BurnInstallationState = e.Status >= 0 ? BurnInstallationState.Applied : BurnInstallationState.Failed; ExecutedAction = LaunchAction; Status = e.Status; if (IsInteractive) { NavigateToPage(e.Status >= 0 ? PageType.FinishPage : PageType.FinishErrorPage); } else { Bootstrapper.Engine.Quit(Status); } } }
protected override void OnApplyComplete(ApplyCompleteEventArgs args) { // Output what the privileges are now. this.Log("After elevation: WixBundleElevated = {0}", this.Engine.GetVariableNumeric("WixBundleElevated")); this.result = args.Status; this.ShutdownUiThread(); }
protected void ApplyComplete(object sender, ApplyCompleteEventArgs e) { model.FinalResult = e.Status; if (e.Status == 0) { FuseBootstrapperApplication.Dispatcher.InvokeShutdown(); } }
protected override void OnApplyComplete(ApplyCompleteEventArgs args) { // Output what the privileges are now. this.Log("After elevation: WixBundleElevated = {0}", this.Engine.NumericVariables["WixBundleElevated"]); this.result = args.Status; this.wait.Set(); }
private void ApplyComplete(object sender, ApplyCompleteEventArgs e) { Model.FinalResult = e.Status; State = InstallState.Applied; isUnstalling = false; OnPropertyChanged("CompleteEnabled"); OnPropertyChanged("ProgressEnabled"); }
/// <summary> /// Apply结束 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ApplyComplete(object sender, ApplyCompleteEventArgs e) { model.FinalResult = e.Status; State = InstallState.Applied; isUnstalling = false; OnPropertyChanged("CompleteEnabled"); OnPropertyChanged("ProgressEnabled"); // CustomBootstrapperApplication.Dispatcher.InvokeShutdown(); }
private void OnApplyComplete(object sender, ApplyCompleteEventArgs e) { if (_installer.Command.Display == Display.Full) { _isValid = true; _applyProgress = 100; ComponentProgress = 100; _mainVmFactory.GetViewModelInstance().MoveNextCommand.Execute(null); } }
protected void ApplyComplete( object sender, ApplyCompleteEventArgs e) { this.model.FinalResult = e.Status; NewWindowHandler(null, new RoutedEventArgs()); this.model.LogMessage("OOOOOOOOOOOOOOOOOOOOO"); //CustomBootstrapperApplication.Dispatcher //.InvokeShutdown(); }
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>(); }); }
private void ApplyComplete(object sender, ApplyCompleteEventArgs e) { if (Hresult.Succeeded(e.Status)) { root.State = InstallationState.Applied; } else { root.State = InstallationState.Failed; } StartFinishView(); }
private void OnApplyComplete(object sender, ApplyCompleteEventArgs e) { if (e.Status == 0) { Result = ActionResult.Success; Dispatcher.InvokeShutdown(); } else { Result = ActionResult.Failure; } }
private void ApplyComplete(object sender, ApplyCompleteEventArgs e) { WixBA.Model.Result = e.Status; // remember the final result of the apply. // 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; } // 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 != WixBA.Model.Command.Display) { // If its passive, send a message to the window to close. if (Display.Passive == WixBA.Model.Command.Display) { WixBA.Model.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install"); WixBA.Dispatcher.BeginInvoke(new Action(WixBA.View.Close)); } else { WixBA.Dispatcher.InvokeShutdown(); } return; } 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(new Action(WixBA.View.Close)); return; } else if (root.AutoClose) { // Automatically closing since the user clicked the X button. WixBA.Dispatcher.BeginInvoke(new Action(WixBA.View.Close)); return; } // Force all commands to reevaluate CanExecute. // InvalidateRequerySuggested must be run on the UI thread. root.Dispatcher.Invoke(new Action(CommandManager.InvalidateRequerySuggested)); }
private void SetupApplication_ApplyComplete(object sender, ApplyCompleteEventArgs e) { string logName = "Engine hook SetupApplication_ApplyComplete: "; this.Error -= SetupApplication_Error; this.ExecuteFilesInUse -= SetupApplication_ExecuteFilesInUse; this.ExecuteProgress -= SetupApplication_ExecuteProgress; this.ExecuteMsiMessage -= SetupApplication_ExecuteMsiMessage; this.ApplyComplete -= SetupApplication_ApplyComplete; if (e.Status >= 0) { if (!this.IsQuietUninstall) { this.wizardWindowVM.ShowFinishedDialog(); } this.Log(logName + "Execution phase ended successfully. Setting exit action to '" + ActionResult.Success.ToString() + "'"); this.exitAction = ActionResult.Success; } else { if (!this.IsQuietUninstall) { if (this.CancelledByUser) { this.wizardWindowVM.ShowUserCancelDialog(); } else { this.wizardWindowVM.ShowErrorDialog(); } } this.Log(logName + "Execution phase failed. Setting exit action to '" + ActionResult.Failure.ToString() + "'"); this.exitAction = ActionResult.Failure; } this.Log(logName + "Set ApplyComplete WaitHandle"); this.applyCompleteHandle.Set(); }
private void ApplyComplete(object sender, ApplyCompleteEventArgs e) { PanelSwWixBA.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 != PanelSwWixBA.Model.Command.Display) { // If its passive, send a message to the window to close. if (Microsoft.Tools.WindowsInstallerXml.Bootstrapper.Display.Passive == PanelSwWixBA.Model.Command.Display) { PanelSwWixBA.Model.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install"); PanelSwWixBA.Dispatcher.BeginInvoke((Action) delegate() { PanelSwWixBA.View.Close(); } ); } else { PanelSwWixBA.Dispatcher.InvokeShutdown(); } } else if (Hresult.Succeeded(e.Status) && LaunchAction.UpdateReplace == PanelSwWixBA.Model.PlannedAction) // if we successfully applied an update close the window since the new Bundle should be running now. { PanelSwWixBA.Model.Engine.Log(LogLevel.Verbose, "Automatically closing the window since update successful."); PanelSwWixBA.Dispatcher.BeginInvoke((Action) delegate() { PanelSwWixBA.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.State != this.root.PreApplyState) { this.root.State = Hresult.Succeeded(e.Status) ? InstallationState.Applied : InstallationState.Failed; } }
private void OnApplyComplete(object sender, ApplyCompleteEventArgs e) { Result = 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 (InstallState != PreApplyState) { InstallState = e.Status >= 0 ? InstallationState.Applied : InstallationState.Failed; } // If we're not in Full UI mode, we need to alert the dispatcher to stop and close the window for passive. if (_bootstrapper.Command.Display != Display.Full) { // If its passive, send a message to the window to close. if (_bootstrapper.Command.Display == Display.Passive) { _bootstrapper.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install"); PicoBA.Dispatcher.BeginInvoke(new Action(PicoBA.View.Close)); } else { PicoBA.Dispatcher.InvokeShutdown(); } return; } else if (e.Status >= 0 && PlannedAction == LaunchAction.UpdateReplace) // if we successfully applied an update close the window since the new Bundle should be running now. { _bootstrapper.Engine.Log(LogLevel.Verbose, "Automatically closing the window since update successful."); PicoBA.Dispatcher.BeginInvoke(new Action(PicoBA.View.Close)); return; } // Force all commands to reevaluate CanExecute. // InvalidateRequerySuggested must be run on the UI thread. PicoBA.Dispatcher.Invoke(new Action(CommandManager.InvalidateRequerySuggested)); }
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(); } } }
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; } }
private void ApplyComplete(ApplyCompleteEventArgs eventArgs) { this.RestartRequired = eventArgs.Restart == ApplyRestart.RestartRequired; this.FinalResult = eventArgs.Status; // TODO Handle Unknown state somehow? if (this.InstallationResult == InstallationResult.Error || this.InstallationResult == InstallationResult.Cancelled) { this.WixBootstrapper.BootstrapperDispatcher.BeginInvoke(new Action(() => this.ViewController.GoToErrorView())); } else { if (eventArgs.Restart == ApplyRestart.RestartRequired) { this.RestartRequired = true; } this.ViewController.InstallStageChange(InstallerStage.Finished); this.WixBootstrapper.BootstrapperDispatcher.BeginInvoke(new Action(() => this.ViewController.GoNext())); } }
private void ApplyComplete(object sender, ApplyCompleteEventArgs e) { App.Current.Result = e.Status; if (App.Current.Command.Display != Display.Full) { if (App.Current.Command.Display == Display.Passive) { App.Current.Engine.Log(LogLevel.Verbose, "Automatically closing the window for non-interactive install"); App.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(() => App.Current.Finish())); } else { App.Current.Dispatcher.InvokeShutdown(); } } if (State != PreApplyState) { State = e.Restart != ApplyRestart.None ? InstallationState.RebootRequired : HResult.Succeeded(e.Status) ? InstallationState.Successful : 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 ManagedBA_ApplyComplete(object sender, ApplyCompleteEventArgs e) { done.Set(); }
protected override void OnApplyComplete(ApplyCompleteEventArgs e) { base.OnApplyComplete(e); this._installer.Result = new InstallResult(e.Status == 0, e.Restart == ApplyRestart.RestartRequired); this._installer.Status = Status.Completed; }
/// <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) { IsApplying = false; }
/// <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 ApplyCompleted(object sender, ApplyCompleteEventArgs e) { this.model.LogMessage("Applying has been completed for silent uninstallation."); this.model.FinalResult = e.Status; this.engine.Quit(this.model.FinalResult); }