More queries/commands

This commit is contained in:
Geoffroy BONNEVILLE
2020-03-26 15:38:29 +01:00
parent a17d6b05ae
commit 903e7649e4
10 changed files with 118 additions and 29 deletions

View File

@@ -10,6 +10,7 @@ using ModernKeePassLib;
using ModernKeePassLib.Cryptography.KeyDerivation;
using ModernKeePassLib.Interfaces;
using ModernKeePassLib.Keys;
using ModernKeePassLib.Security;
using ModernKeePassLib.Serialization;
using ModernKeePassLib.Utility;
@@ -196,12 +197,15 @@ namespace ModernKeePass.Infrastructure.KeePass
});
}
public Task UpdateEntry(string entry)
public void UpdateEntry(string entryId, string fieldName, string fieldValue)
{
throw new NotImplementedException();
var pwEntry = _pwDatabase.RootGroup.FindEntry(BuildIdFromString(entryId), true);
pwEntry.Touch(true);
pwEntry.CreateBackup(null);
pwEntry.Strings.Set(EntryFieldMapper.MapFieldToPwDef(fieldName), new ProtectedString(true, fieldValue));
}
public Task UpdateGroup(string group)
public void UpdateGroup(string group)
{
throw new NotImplementedException();
}