2017-11-29 19:13:38 +01:00
|
|
|
|
using System.Collections.Generic;
|
2017-12-01 17:59:38 +01:00
|
|
|
|
using ModernKeePass.Interfaces;
|
2017-11-29 19:13:38 +01:00
|
|
|
|
using ModernKeePass.Services;
|
2017-11-28 16:57:16 -05:00
|
|
|
|
|
|
|
|
|
namespace ModernKeePass.ViewModels
|
|
|
|
|
{
|
|
|
|
|
public class SettingsNewVm
|
|
|
|
|
{
|
2018-02-23 18:09:21 +01:00
|
|
|
|
private ISettingsService _settings;
|
2017-12-01 17:59:38 +01:00
|
|
|
|
|
2018-02-23 18:09:21 +01:00
|
|
|
|
public SettingsNewVm() : this(SettingsService.Instance)
|
2017-12-01 17:59:38 +01:00
|
|
|
|
{ }
|
|
|
|
|
|
2018-02-23 18:09:21 +01:00
|
|
|
|
public SettingsNewVm(ISettingsService settings)
|
2017-12-01 17:59:38 +01:00
|
|
|
|
{
|
|
|
|
|
_settings = settings;
|
|
|
|
|
}
|
2017-11-28 16:57:16 -05:00
|
|
|
|
|
|
|
|
|
public bool IsCreateSample
|
|
|
|
|
{
|
2017-12-01 17:59:38 +01:00
|
|
|
|
get { return _settings.GetSetting<bool>("Sample"); }
|
|
|
|
|
set { _settings.PutSetting("Sample", value); }
|
2017-11-28 16:57:16 -05:00
|
|
|
|
}
|
|
|
|
|
|
2017-11-29 19:13:38 +01:00
|
|
|
|
public IEnumerable<string> FileFormats => new []{"2", "4"};
|
2017-11-28 16:57:16 -05:00
|
|
|
|
|
2017-11-29 19:13:38 +01:00
|
|
|
|
public string FileFormatVersion
|
2017-11-28 16:57:16 -05:00
|
|
|
|
{
|
2017-12-01 17:59:38 +01:00
|
|
|
|
get { return _settings.GetSetting<string>("DefaultFileFormat"); }
|
|
|
|
|
set { _settings.PutSetting("DefaultFileFormat", value); }
|
2017-11-28 16:57:16 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|