public static ExceptionHandler GetInstance()
 {
     if (_instance == null)
     {
         _instance = new ExceptionHandler();
     }
     return _instance;
 }
Exemple #2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            HandleCulture(e);
            _exHandler = ExceptionHandler.GetInstance();
            this.DispatcherUnhandledException +=
                new DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException);
            _exHandler.ExceptionOccured += new ExceptionOccuredDelegate(_exHandler_ExceptionOccured);


            base.OnStartup(e);
            MainWindow window = new MainWindow();
            MainWindowViewModel viewModel = new MainWindowViewModel();
            window.DataContext = viewModel;
            NavigationService.AttachNavigator(new ApplicationNavigationService(viewModel));
            window.Show();
        }