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

@@ -1,6 +1,5 @@
using System.Collections.ObjectModel;
using System.Linq;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using ModernKeePass.Common;
using ModernKeePass.Interfaces;
@@ -41,9 +40,9 @@ namespace ModernKeePass.ViewModels
}
}
public SettingsVm() : this((Application.Current as App)?.Database, new ResourcesService()) { }
public SettingsVm() : this(DatabaseService.Instance, new ResourcesService()) { }
public SettingsVm(IDatabase database, IResource resource)
public SettingsVm(IDatabaseService database, IResourceService resource)
{
var menuItems = new ObservableCollection<ListMenuItemVm>
{