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

@@ -7,7 +7,7 @@ namespace ModernKeePass.ViewModels
{
public class RecentVm : NotifyPropertyChangedBase, IHasSelectableObject
{
private readonly IRecent _recent;
private readonly IRecentService _recent;
private ISelectableModel _selectedItem;
private ObservableCollection<IRecentItem> _recentItems = new ObservableCollection<IRecentItem>();
@@ -35,10 +35,10 @@ namespace ModernKeePass.ViewModels
}
}
public RecentVm() : this (new RecentService())
public RecentVm() : this (RecentService.Instance)
{ }
public RecentVm(IRecent recent)
public RecentVm(IRecentService recent)
{
_recent = recent;
RecentItems = _recent.GetAllFiles();