2020-04-06 20:20:45 +02:00
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
using ModernKeePass.Application.Common.Interfaces;
|
2018-03-09 18:06:06 +01:00
|
|
|
|
|
|
|
namespace ModernKeePass.ViewModels
|
|
|
|
{
|
|
|
|
public class SettingsSaveVm
|
|
|
|
{
|
2020-04-06 20:20:45 +02:00
|
|
|
private readonly ISettingsProxy _settings;
|
2018-03-09 18:06:06 +01:00
|
|
|
|
2020-04-06 20:20:45 +02:00
|
|
|
public SettingsSaveVm() : this(App.Services.GetService<ISettingsProxy>())
|
2018-03-09 18:06:06 +01:00
|
|
|
{ }
|
|
|
|
|
2020-04-06 20:20:45 +02:00
|
|
|
public SettingsSaveVm(ISettingsProxy settings)
|
2018-03-09 18:06:06 +01:00
|
|
|
{
|
|
|
|
_settings = settings;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool IsSaveSuspend
|
|
|
|
{
|
|
|
|
get { return _settings.GetSetting("SaveSuspend", true); }
|
|
|
|
set { _settings.PutSetting("SaveSuspend", value); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|