Correct two bugs related to key file opening

Bettter error messages with composite key
Show an error message if save has failed and don't close the database
This commit is contained in:
BONNEVILLE Geoffroy
2017-11-13 11:28:14 +01:00
parent 2779e5b7c7
commit abb12accc7
6 changed files with 65 additions and 27 deletions

View File

@@ -23,5 +23,17 @@ namespace ModernKeePass.Common
// Show the message dialog
await messageDialog.ShowAsync();
}
public static async void ShowErrorDialog(Exception exception)
{
// Create the message dialog and set its content
var messageDialog = new MessageDialog(exception.Message, "Error occured");
// Add commands and set their callbacks; both buttons use the same callback function instead of inline event handlers
messageDialog.Commands.Add(new UICommand("OK"));
// Show the message dialog
await messageDialog.ShowAsync();
}
}
}