mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
WIP Split composite key user control
Some refactoring
This commit is contained in:
25
WinAppCommon/ViewModels/Items/SettingsSaveVm.cs
Normal file
25
WinAppCommon/ViewModels/Items/SettingsSaveVm.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Common;
|
||||
|
||||
namespace ModernKeePass.ViewModels.ListItems
|
||||
{
|
||||
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(Constants.Settings.SaveSuspend, true); }
|
||||
set { _settings.PutSetting(Constants.Settings.SaveSuspend, value); }
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user