public static CustomApplicationContext Create(Form splash) { if (Current == null) { Current = new CustomApplicationContext(splash); } return(Current); }
private static void RunInDebugMode() { Application.ThreadException += Application_ThreadException; AppDomain.CurrentDomain.UnhandledException += AppDomainUnhandledException; var context = CustomApplicationContext.Create(new SplashForm()); Application.Run(context); }
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); } }