mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Edit mode works in Groups and Entries
This commit is contained in:
@@ -13,12 +13,17 @@ namespace ModernKeePass.ViewModels
|
||||
public GroupVm ParentGroup { get; }
|
||||
public ObservableCollection<EntryVm> Entries { get; set; } = new ObservableCollection<EntryVm>();
|
||||
public ObservableCollection<GroupVm> Groups { get; set; } = new ObservableCollection<GroupVm>();
|
||||
public string Name => _pwGroup == null ? "New group" : _pwGroup.Name;
|
||||
|
||||
public int EntryCount => Entries.Count - 1;
|
||||
public int GroupCount => Groups.Count - 1;
|
||||
public bool IsNotRoot => ParentGroup != null;
|
||||
public FontWeight FontWeight => _pwGroup == null ? FontWeights.Bold : FontWeights.Normal;
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return _pwGroup == null ? "New group" : _pwGroup.Name; }
|
||||
set { _pwGroup.Name = value; }
|
||||
}
|
||||
public Symbol IconSymbol
|
||||
{
|
||||
get
|
||||
@@ -35,8 +40,15 @@ namespace ModernKeePass.ViewModels
|
||||
set { SetProperty(ref _isLeftPaneOpen, value); }
|
||||
}
|
||||
|
||||
public bool IsEditMode
|
||||
{
|
||||
get { return _isEditMode; }
|
||||
set { SetProperty(ref _isEditMode, value); }
|
||||
}
|
||||
|
||||
private readonly PwGroup _pwGroup;
|
||||
private bool _isLeftPaneOpen;
|
||||
private bool _isEditMode;
|
||||
|
||||
public GroupVm() {}
|
||||
|
||||
|
Reference in New Issue
Block a user