Esempio n. 1
0
        /// <summary>Called by the engine to request a restart now or inform the user a manual restart is required later.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnRestartRequired(Wix.RestartRequiredEventArgs args)
        {
            LogVerbose("Enter Method: OnRestartRequired");
            WPFBootstrapperEventArgs <Wix.RestartRequiredEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.RestartRequiredEventArgs>(args);

            TryInvoke(new Action(() => { _mainWindow.OnRestartRequired(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnRestartRequired(cancelArgs.Arguments);
            }
            LogVerbose("Leaving Method: OnRestartRequired");
        }
        /// <summary>Called by the engine to request a restart now or inform the user a manual restart is required later.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnRestartRequired(Wix.RestartRequiredEventArgs args)
        {
            this.LogBootstrapperEnterEvent(args, "RestartRequired");
            WPFBootstrapperEventArgs <Wix.RestartRequiredEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.RestartRequiredEventArgs>(args);

            this.TryInvoke(new Action(() => { this.model.OnRestartRequired(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnRestartRequired(cancelArgs.Arguments);
            }
            this.LogBootstrapperLeaveEvent(null, "RestartRequired");
        }
Esempio n. 3
0
 /// <summary>
 /// Called by the engine to request a restart now or inform the user a manual restart is required later.
 /// </summary>
 /// <param name="args">Additional arguments for this event.</param>
 protected virtual void OnRestartRequired(RestartRequiredEventArgs args)
 {
     EventHandler<RestartRequiredEventArgs> handler = this.RestartRequired;
     if (null != handler)
     {
         handler(this, args);
     }
 }