Files
BONNEVILLE Geoffroy abb12accc7 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
2017-11-13 11:28:14 +01:00

20 lines
455 B
C#

using Windows.Storage;
using Windows.UI.Xaml;
namespace ModernKeePass.ViewModels
{
public class SaveVm
{
public void Save(bool close = true)
{
var app = (App)Application.Current;
if (close && app.Database.Save()) app.Database.Close();
}
internal void Save(StorageFile file)
{
var app = (App)Application.Current;
app.Database.Save(file);
}
}
}