Corrected then broke again data binding...

Lib now uses more nuget packages
This commit is contained in:
2017-09-13 18:37:44 +02:00
parent 1cd7c0411c
commit 8c6d8056bb
229 changed files with 49677 additions and 257 deletions

View File

@@ -1,14 +1,27 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ModernKeePassLib;
namespace ModernKeePass.ViewModels
{
public class GroupVm
{
public List<EntryVm> Entries { get; set; }
public ObservableCollection<EntryVm> Entries { get; set; }
public ObservableCollection<GroupVm> Groups { get; set; }
public string Name { get; set; }
public string EntryCount {
get
{
return $"{Entries?.Count} entries.";
}
}
public GroupVm(PwGroup group)
{
Name = group.Name;
Entries = new ObservableCollection<EntryVm>(group.Entries.Select(e => new EntryVm(e)));
Groups = new ObservableCollection<GroupVm>(group.Groups.Select(g => new GroupVm(g)));
}
}
}