mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
WIP Split composite key user control
Some refactoring
This commit is contained in:
34
WinAppCommon/ViewModels/Items/SettingsNewVm.cs
Normal file
34
WinAppCommon/ViewModels/Items/SettingsNewVm.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Common;
|
||||
|
||||
namespace ModernKeePass.ViewModels.ListItems
|
||||
{
|
||||
public class SettingsNewVm
|
||||
{
|
||||
private readonly ISettingsProxy _settings;
|
||||
|
||||
public SettingsNewVm() : this(App.Services.GetRequiredService<ISettingsProxy>())
|
||||
{ }
|
||||
|
||||
public SettingsNewVm(ISettingsProxy settings)
|
||||
{
|
||||
_settings = settings;
|
||||
}
|
||||
|
||||
public bool IsCreateSample
|
||||
{
|
||||
get { return _settings.GetSetting<bool>(Constants.Settings.Sample); }
|
||||
set { _settings.PutSetting(Constants.Settings.Sample, value); }
|
||||
}
|
||||
|
||||
public IEnumerable<string> FileFormats => new []{"2", "4"};
|
||||
|
||||
public string FileFormatVersion
|
||||
{
|
||||
get { return _settings.GetSetting<string>(Constants.Settings.DefaultFileFormat); }
|
||||
set { _settings.PutSetting(Constants.Settings.DefaultFileFormat, value); }
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user