void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { var ex = e.Exception; string error = ex.InnerException == null ? ex.Message : ex.InnerException.Message; ViewModelServiceError.Instance().Errors.Add(error); }
void MainWindow_Loaded(object sender, RoutedEventArgs e) { this.Button_Click(null, null); this.tabMonitor.DataContext = MDF.Framework.Bus.ServiceMonitor.Instance(); this.errorListBox.ItemsSource = ViewModelServiceError.Instance().Errors; }