コード例 #1
0
 public static ExceptionHandler GetInstance()
 {
     if (_instance == null)
     {
         _instance = new ExceptionHandler();
     }
     return _instance;
 }
コード例 #2
0
ファイル: App.xaml.cs プロジェクト: ikelos555/HSROrderApp
        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();
        }