protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); PatchManager.Patch(); string fileName; AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); ApplicationService.Closing += new System.ComponentModel.CancelEventHandler(ApplicationService_Closing); ThemeHelper.LoadThemeFromRegister(); #if DEBUG bool trace = false; BindingErrorListener.Listen(m => { if (trace) MessageBox.Show(m); }); #endif _bootstrapper = new Bootstrapper(); using (new DoubleLaunchLocker(SignalId, WaitId)) _bootstrapper.Initialize(); try { if (e.Args != null && e.Args.Length > 0) { fileName = e.Args[0]; FileConfigurationHelper.LoadFromFile(fileName); } } catch { } }
protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); #if DEBUG BindingErrorListener.Listen(m => MessageBox.Show(m)); #endif AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); ApplicationService.Closing += new System.ComponentModel.CancelEventHandler(ApplicationService_Closing); _bootstrapper = new Bootstrapper(); using (new DoubleLaunchLocker(SignalId, WaitId)) _bootstrapper.Initialize(); }