Files
modernkeepass/ModernKeePass/ViewModels/Items/SettingsSaveVm.cs
Geoffroy BONNEVILLE d972b6cb5a Added the option to close DB without saving
Changed the way recent files are retrieved
Stopped showing the DB Closed exception on suspend
Reordering entries works
Moved code from infra to application
Cleanup
2020-04-09 19:43:06 +02:00

24 lines
635 B
C#

using Microsoft.Extensions.DependencyInjection;
using ModernKeePass.Application.Common.Interfaces;
namespace ModernKeePass.ViewModels
{
public class SettingsSaveVm
{
private readonly ISettingsProxy _settings;
public SettingsSaveVm() : this(App.Services.GetRequiredService<ISettingsProxy>())
{ }
public SettingsSaveVm(ISettingsProxy settings)
{
_settings = settings;
}
public bool IsSaveSuspend
{
get { return _settings.GetSetting("SaveSuspend", true); }
set { _settings.PutSetting("SaveSuspend", value); }
}
}
}