mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 16:10:16 -04:00

Added a new settings page to allow auto-save or not App now resumes correctly from suspend Settings service now allows getting default values Removed french special characters from metadata Code cleanup
34 lines
881 B
C#
34 lines
881 B
C#
using System.Collections.Generic;
|
|
using ModernKeePass.Interfaces;
|
|
using ModernKeePass.Services;
|
|
|
|
namespace ModernKeePass.ViewModels
|
|
{
|
|
public class SettingsNewVm
|
|
{
|
|
private readonly ISettingsService _settings;
|
|
|
|
public SettingsNewVm() : this(SettingsService.Instance)
|
|
{ }
|
|
|
|
public SettingsNewVm(ISettingsService settings)
|
|
{
|
|
_settings = settings;
|
|
}
|
|
|
|
public bool IsCreateSample
|
|
{
|
|
get { return _settings.GetSetting<bool>("Sample"); }
|
|
set { _settings.PutSetting("Sample", value); }
|
|
}
|
|
|
|
public IEnumerable<string> FileFormats => new []{"2", "4"};
|
|
|
|
public string FileFormatVersion
|
|
{
|
|
get { return _settings.GetSetting<string>("DefaultFileFormat"); }
|
|
set { _settings.PutSetting("DefaultFileFormat", value); }
|
|
}
|
|
}
|
|
}
|