2017-09-15 11:24:14 +02:00
|
|
|
|
using System.ComponentModel;
|
2017-09-22 18:48:09 +02:00
|
|
|
|
using ModernKeePassLibPCL;
|
2017-09-12 18:20:32 +02:00
|
|
|
|
|
|
|
|
|
namespace ModernKeePass.ViewModels
|
|
|
|
|
{
|
2017-09-15 11:24:14 +02:00
|
|
|
|
public class EntryVm : INotifyPropertyChanged
|
2017-09-12 18:20:32 +02:00
|
|
|
|
{
|
2017-09-25 18:34:27 +02:00
|
|
|
|
public string Title { get; set; }
|
2017-09-13 18:37:44 +02:00
|
|
|
|
public string UserName { get; private set; }
|
2017-09-17 10:00:03 -04:00
|
|
|
|
public string Password { get; private set; }
|
2017-09-13 18:37:44 +02:00
|
|
|
|
public string URL { get; private set; }
|
|
|
|
|
public string Notes { get; private set; }
|
|
|
|
|
|
2017-09-14 18:33:29 +02:00
|
|
|
|
public EntryVm() { }
|
2017-09-13 18:37:44 +02:00
|
|
|
|
public EntryVm(PwEntry entry)
|
|
|
|
|
{
|
|
|
|
|
Title = entry.Strings.GetSafe(PwDefs.TitleField).ReadString();
|
|
|
|
|
UserName = entry.Strings.GetSafe(PwDefs.UserNameField).ReadString();
|
2017-09-17 10:00:03 -04:00
|
|
|
|
Password = entry.Strings.GetSafe(PwDefs.PasswordField).ReadString();
|
2017-09-13 18:37:44 +02:00
|
|
|
|
URL = entry.Strings.GetSafe(PwDefs.UrlField).ReadString();
|
|
|
|
|
Notes = entry.Strings.GetSafe(PwDefs.NotesField).ReadString();
|
|
|
|
|
}
|
2017-09-15 11:24:14 +02:00
|
|
|
|
|
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
2017-09-12 18:20:32 +02:00
|
|
|
|
}
|
|
|
|
|
}
|