mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
20 lines
692 B
C#
20 lines
692 B
C#
![]() |
using System.Collections.Generic;
|
|||
|
using MediatR;
|
|||
|
using ModernKeePass.Application.Database.Queries.GetDatabase;
|
|||
|
using ModernKeePass.Application.Group.Models;
|
|||
|
using ModernKeePass.Application.Group.Queries.GetAllGroups;
|
|||
|
|
|||
|
namespace ModernKeePass.ViewModels
|
|||
|
{
|
|||
|
public class TopMenuVm
|
|||
|
{
|
|||
|
public IEnumerable<GroupVm> Groups { get; set; }
|
|||
|
public string SelectedDestinationGroup { get; set; }
|
|||
|
|
|||
|
public TopMenuVm(IMediator mediator)
|
|||
|
{
|
|||
|
var database = mediator.Send(new GetDatabaseQuery()).GetAwaiter().GetResult();
|
|||
|
Groups = mediator.Send(new GetAllGroupsQuery { GroupId = database.RootGroupId }).GetAwaiter().GetResult();
|
|||
|
}
|
|||
|
}
|
|||
|
}
|