mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Corrected then broke again data binding...
Lib now uses more nuget packages
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user