Esempio n. 1
0
        /// <summary>Called by the engine on startup of the bootstrapper application.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnStartup(Wix.StartupEventArgs args)
        {
            LogVerbose("Enter Method: OnStartup");
            WPFBootstrapperEventArgs <Wix.StartupEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.StartupEventArgs>(args);

            TryInvoke(new Action(() => { _mainWindow.OnStartup(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnStartup(cancelArgs.Arguments);
            }
            LogVerbose("Leaving Method: OnStartup");
        }
        /// <summary>Called by the engine on startup of the bootstrapper application.</summary>
        /// <param name="args">The arguments of the event.</param>
        protected override void OnStartup(Wix.StartupEventArgs args)
        {
            this.LogBootstrapperEnterEvent(args, "Startup");
            WPFBootstrapperEventArgs <Wix.StartupEventArgs> cancelArgs = new WPFBootstrapperEventArgs <Wix.StartupEventArgs>(args);

            this.TryInvoke(new Action(() => { this.model?.OnStartup(cancelArgs); }));
            if (!cancelArgs.Cancel)
            {
                base.OnStartup(cancelArgs.Arguments);
            }
            this.LogBootstrapperLeaveEvent(null, "Startup");
        }
Esempio n. 3
0
 void IBootstrapperApplication.OnStartup()
 {
     StartupEventArgs args = new StartupEventArgs();
     this.OnStartup(args);
 }
Esempio n. 4
0
        /// <summary>
        /// Called by the engine on startup of the bootstrapper application.
        /// </summary>
        /// <param name="args">Additional arguments for this event.</param>
        protected virtual void OnStartup(StartupEventArgs args)
        {
            EventHandler<StartupEventArgs> handler = this.Startup;
            if (null != handler)
            {
                handler(this, args);
            }

            if (this.AsyncExecution)
            {
                this.Engine.Log(LogLevel.Verbose, "Creating BA thread to run asynchronously.");
                Thread uiThread = new Thread(this.Run);
                uiThread.Name = "UIThread";
                uiThread.SetApartmentState(ApartmentState.STA);
                uiThread.Start();
            }
            else
            {
                this.Engine.Log(LogLevel.Verbose, "Creating BA thread to run synchronously.");
                this.Run();
            }
        }