mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00

Bettter error messages with composite key Show an error message if save has failed and don't close the database
20 lines
455 B
C#
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);
|
|
}
|
|
}
|
|
} |