private static void RunInDebugMode() { AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledException; try { bootstrapper = new Bootstrapper(); bootstrapper.Run(); } catch (Exception ex) { HandleException(ex); } }
/// <summary> /// Handles the Startup event of the Application. /// </summary> /// <param name="sender"> /// The source of the event. /// </param> /// <param name="e"> /// The <see cref="System.Windows.StartupEventArgs"/> instance containing the event data. /// </param> private void ApplicationStartup(object sender, StartupEventArgs e) { // Check to see if application is already running and terminate if so if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1) { Environment.Exit(1); } // Log application version Trace.Write("Application Startup. Version " + Assembly.GetExecutingAssembly().GetName().Version); // Enable visual styles for windows forms System.Windows.Forms.Application.EnableVisualStyles(); // Check there is a valid license or evaluation for the application #if LICENSED this.CheckLicense(); #endif // Show Splash Screen new SplashScreen("Resources/SplashScreen.jpg").Show(true); var bootstrapper = new Bootstrapper(); #if DEBUG bootstrapper.Run(); #else try { bootstrapper.Run(); } catch (Exception ex) { this.HandleException(ex); } #endif }
private void Application_Startup(object sender, StartupEventArgs e) { Bootstrapper boot = new Bootstrapper(); boot.Run(); }
private static void RunInDebugMode() { UnityBootstrapper bootstrapper = new Bootstrapper(); bootstrapper.Run(); }