Beispiel #1
0
 private static void RunInReleaseMode()
 {
     AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledException;
     try
     {
         bootstrapper = new Bootstrapper();
         bootstrapper.Run();
     }
     catch (Exception ex)
     {
         HandleException(ex);
     }
 }
Beispiel #2
0
 private static void RunInReleaseMode()
 {
     AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledException;
     try
     {
         UnityBootstrapper bootstrapper = new Bootstrapper();
         bootstrapper.Run();
     }
     catch ( Exception ex )
     {
         HandleException( ex );
     }
 }
Beispiel #3
0
        /// <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
        }
Beispiel #4
0
        /// <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
        }
Beispiel #5
0
 protected override void OnStartup(StartupEventArgs e)
 {
     base.OnStartup(e);
     bootstrapper.Run();
 }
Beispiel #6
0
 private void Application_Startup(object sender, StartupEventArgs e)
 {
     Bootstrapper boot = new Bootstrapper();
     boot.Run();
 }
Beispiel #7
0
 private static void RunInDebugMode()
 {
     UnityBootstrapper bootstrapper = new Bootstrapper();
     bootstrapper.Run();
 }
        private static void RunInDebugMode()
        {
            Bootstrapper bootstrapper = new Bootstrapper();

            bootstrapper.Run();
        }