Moved application code to the Application layer

Imported Win10 project
Code cleanup
WIP - Use common UWP services for Win8.1 and Win10
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-06 20:20:45 +02:00
parent e795a8c3c4
commit 56d93a5187
292 changed files with 48614 additions and 837 deletions

View File

@@ -2,12 +2,12 @@
using System.Linq;
using Windows.UI.Xaml.Controls;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using ModernKeePass.Application.Database.Queries.GetDatabase;
using ModernKeePass.Common;
using ModernKeePass.Domain.AOP;
using ModernKeePass.Domain.Interfaces;
using ModernKeePass.Interfaces;
using ModernKeePass.Views;
using ModernKeePass.Services;
namespace ModernKeePass.ViewModels
{
@@ -43,10 +43,11 @@ namespace ModernKeePass.ViewModels
}
}
public SettingsVm() : this(App.Mediator, new ResourcesService()) { }
public SettingsVm() : this(App.Services.GetService<IMediator>()) { }
public SettingsVm(IMediator mediator, IResourceService resource)
public SettingsVm(IMediator mediator)
{
var resource = new ResourceHelper();
var database = mediator.Send(new GetDatabaseQuery()).GetAwaiter().GetResult();
var menuItems = new ObservableCollection<ListMenuItemVm>
{