WIP Windows 10

Dependencies finally installed
Removal of useless code
Big cleanup in XAML styles (override colors the correct way)
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-29 16:39:20 +02:00
parent d6529646a8
commit 14cd3ab57a
224 changed files with 1265 additions and 38545 deletions

View File

@@ -0,0 +1,24 @@
using Windows.Storage;
using MediatR;
using ModernKeePass.Application.Common.Interfaces;
using ModernKeePass.Application.Database.Queries.GetDatabase;
namespace ModernKeePass.ViewModels
{
public class MainVm
{
public bool IsDatabaseOpened { get; }
public bool HasRecentItems { get; }
public string OpenedDatabaseName { get; }
public IStorageFile File { get; set; }
public MainVm(IMediator mediator, IRecentProxy recent)
{
var database = mediator.Send(new GetDatabaseQuery()).GetAwaiter().GetResult();
IsDatabaseOpened = database.IsOpen;
OpenedDatabaseName = database.Name;
HasRecentItems = recent.EntryCount > 0;
}
}
}