Changed most services to singletons

Refactor the Database Service (no more enum, ...)
Restored the Donate page with Paypal web page
Added (but not working) MS App Center integration
Corrected tests accordingly
WIP AOP to detect database changes
This commit is contained in:
BONNEVILLE Geoffroy
2018-02-23 18:09:21 +01:00
parent b46ab8db51
commit 7dbf93fe7b
35 changed files with 199 additions and 194 deletions

View File

@@ -22,7 +22,7 @@ namespace ModernKeePass.ViewModels
Success = 5
}
public IDatabase Database { get; set; }
public IDatabaseService Database { get; set; }
public bool HasPassword
{
@@ -111,11 +111,11 @@ namespace ModernKeePass.ViewModels
private StatusTypes _statusType;
private StorageFile _keyFile;
private string _keyFileText;
private readonly IResource _resource;
private readonly IResourceService _resource;
public CompositeKeyVm() : this((Application.Current as App)?.Database, new ResourcesService()) { }
public CompositeKeyVm() : this(DatabaseService.Instance, new ResourcesService()) { }
public CompositeKeyVm(IDatabase database, IResource resource)
public CompositeKeyVm(IDatabaseService database, IResourceService resource)
{
_resource = resource;
_keyFileText = _resource.GetResourceValue("CompositeKeyDefaultKeyFile");