private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e) { if (e.Exception is ArgumentNullException) { MessageBox.Show("Prawdopodobnie wystąpił błąd z bazą danych. Zalecana jest zmiana lokalizacji bazy."); DB.GetNewDBPath(); } }
private void MenuItem_ChangeDB(object sender, RoutedEventArgs e) { DB.GetNewDBPath(); Model.Windows.RefreshData(); }