コード例 #1
0
 public static CustomApplicationContext Create(Form splash)
 {
     if (Current == null)
     {
         Current = new CustomApplicationContext(splash);
     }
     return(Current);
 }
コード例 #2
0
        private static void RunInDebugMode()
        {
            Application.ThreadException += Application_ThreadException;
            AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledException;

            var context = CustomApplicationContext.Create(new SplashForm());

            Application.Run(context);
        }
コード例 #3
0
        private static void RunInReleaseMode()
        {
            Application.ThreadException += Application_ThreadException;
            AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledException;

            try
            {
                var context = CustomApplicationContext.Create(new SplashForm());
                Application.Run(context);
            }
            catch (Exception ex)
            {
                HandleException(ex);
            }
        }