2020-04-22 16:21:47 +02:00
|
|
|
|
using GalaSoft.MvvmLight;
|
2020-04-06 20:20:45 +02:00
|
|
|
|
using ModernKeePass.Domain.Dtos;
|
2020-03-30 19:43:04 +02:00
|
|
|
|
using ModernKeePass.Domain.Interfaces;
|
2017-10-01 08:48:29 -04:00
|
|
|
|
|
2020-04-20 20:02:43 +02:00
|
|
|
|
namespace ModernKeePass.ViewModels.ListItems
|
2017-09-29 17:23:35 -04:00
|
|
|
|
{
|
2020-04-22 16:21:47 +02:00
|
|
|
|
public class RecentItemVm: ObservableObject, ISelectableModel
|
2017-09-29 17:23:35 -04:00
|
|
|
|
{
|
2017-10-03 16:06:49 +02:00
|
|
|
|
private bool _isSelected;
|
2020-04-07 12:48:18 +02:00
|
|
|
|
private string _name;
|
|
|
|
|
private string _token;
|
|
|
|
|
private string _path;
|
|
|
|
|
|
|
|
|
|
public string Token
|
|
|
|
|
{
|
|
|
|
|
get { return _token; }
|
2020-04-22 16:21:47 +02:00
|
|
|
|
set { Set(() => Token, ref _token, value); }
|
2020-04-07 12:48:18 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name
|
|
|
|
|
{
|
|
|
|
|
get { return _name; }
|
2020-04-22 16:21:47 +02:00
|
|
|
|
set { Set(() => Name, ref _name, value); }
|
2020-04-07 12:48:18 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Path
|
|
|
|
|
{
|
|
|
|
|
get { return _path; }
|
2020-04-22 16:21:47 +02:00
|
|
|
|
set { Set(() => Path, ref _path, value); }
|
2020-04-07 12:48:18 +02:00
|
|
|
|
}
|
2017-10-01 08:48:29 -04:00
|
|
|
|
|
2017-10-03 16:06:49 +02:00
|
|
|
|
public bool IsSelected
|
2017-10-01 08:48:29 -04:00
|
|
|
|
{
|
2017-10-03 16:06:49 +02:00
|
|
|
|
get { return _isSelected; }
|
2020-04-22 16:21:47 +02:00
|
|
|
|
set { Set(() => IsSelected, ref _isSelected, value); }
|
2017-10-01 08:48:29 -04:00
|
|
|
|
}
|
2020-04-21 17:13:39 +02:00
|
|
|
|
|
|
|
|
|
public RecentItemVm(FileInfo file)
|
2017-12-01 17:59:38 +01:00
|
|
|
|
{
|
2020-04-07 12:48:18 +02:00
|
|
|
|
Token = file.Id;
|
2020-04-06 20:20:45 +02:00
|
|
|
|
Name = file.Name;
|
2020-04-07 12:48:18 +02:00
|
|
|
|
Path = file.Path;
|
2017-12-01 17:59:38 +01:00
|
|
|
|
}
|
2017-09-29 17:23:35 -04:00
|
|
|
|
}
|
|
|
|
|
}
|