コード例 #1
0
ファイル: BootstrapperApplication.cs プロジェクト: zooba/wix3
 void IBootstrapperApplication.OnStartup()
 {
     StartupEventArgs args = new StartupEventArgs();
     this.OnStartup(args);
 }
コード例 #2
0
ファイル: BootstrapperApplication.cs プロジェクト: zooba/wix3
        /// <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();
            }
        }