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

@@ -1,11 +1,11 @@
using System.Windows.Input;
using Windows.UI.Xaml;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Xaml.Interactivity;
using ModernKeePass.Application.Database.Queries.GetDatabase;
using ModernKeePass.Common;
using ModernKeePass.Interfaces;
using ModernKeePass.Services;
using ModernKeePass.ViewModels;
namespace ModernKeePass.Actions
@@ -34,7 +34,7 @@ namespace ModernKeePass.Actions
DependencyProperty.Register("Command", typeof(ICommand), typeof(DeleteEntityAction),
new PropertyMetadata(null));
public DeleteEntityAction() : this(App.Mediator) { }
public DeleteEntityAction() : this(App.Services.GetService<IMediator>()) { }
public DeleteEntityAction(IMediator mediator)
{
@@ -43,7 +43,7 @@ namespace ModernKeePass.Actions
public object Execute(object sender, object parameter)
{
var resource = new ResourcesService();
var resource = new ResourceHelper();
var type = Entity is GroupDetailVm ? "Group" : "Entry";
var isRecycleOnDelete = _mediator.Send(new GetDatabaseQuery()).GetAwaiter().GetResult().IsRecycleBinEnabled;