Removed database status in favor of much cleaner code

Implemented (but deactivated) anti corruption mechanism
WIP detect changes and save them if opening another database
This commit is contained in:
BONNEVILLE Geoffroy
2018-01-08 18:52:03 +01:00
parent 4a3f36d38b
commit a19519fa73
17 changed files with 220 additions and 101 deletions

View File

@@ -46,9 +46,16 @@ namespace ModernKeePass
? exception.InnerException
: exception;
if (!(realException is SaveException)) return;
unhandledExceptionEventArgs.Handled = true;
MessageDialogHelper.SaveErrorDialog(realException as SaveException, Database);
if (realException is SaveException)
{
unhandledExceptionEventArgs.Handled = true;
MessageDialogHelper.SaveErrorDialog(realException as SaveException, Database);
}
else if (realException is DatabaseOpenedException)
{
unhandledExceptionEventArgs.Handled = true;
MessageDialogHelper.SaveUnchangedDialog(realException as DatabaseOpenedException, Database);
}
}
/// <summary>