WIP strings in ressource file (XAML is done, code-behind is not)

Invalid URI now shows a message
Create entry is now a link above entries
Entries gridview allows reordering (WIP enable it conditionnally)
Code cleanup in adding/removing PwEntries from VM
This commit is contained in:
BONNEVILLE Geoffroy
2017-11-28 18:53:10 +01:00
parent fcbda1e33d
commit 7b39fe79c8
17 changed files with 587 additions and 233 deletions

View File

@@ -226,7 +226,6 @@ namespace ModernKeePass.ViewModels
{
PreviousGroup = ParentGroup;
PreviousGroup.Entries.Remove(this);
PreviousGroup.RemovePwEntry(_pwEntry);
if (destination == null)
{
_database.AddDeletedItem(IdUuid);
@@ -234,19 +233,22 @@ namespace ModernKeePass.ViewModels
}
ParentGroup = destination;
ParentGroup.Entries.Add(this);
ParentGroup.AddPwEntry(_pwEntry);
}
public void CommitDelete()
{
_pwEntry.ParentGroup.Entries.Remove(_pwEntry);
if (_database.RecycleBinEnabled && !PreviousGroup.IsSelected) _database.RecycleBin.AddPwEntry(_pwEntry);
else _database.AddDeletedItem(IdUuid);
if (!_database.RecycleBinEnabled || PreviousGroup.IsSelected) _database.AddDeletedItem(IdUuid);
}
public void Save()
{
_database.Save();
}
public PwEntry GetPwEntry()
{
return _pwEntry;
}
}
}