2017-10-30 18:34:38 +01:00
|
|
|
|
using Windows.Storage;
|
2017-10-11 14:30:07 +02:00
|
|
|
|
using ModernKeePass.Common;
|
2017-10-12 10:36:58 +02:00
|
|
|
|
using Windows.Storage.AccessCache;
|
2017-11-07 18:45:35 +01:00
|
|
|
|
using ModernKeePass.Interfaces;
|
2017-10-01 08:48:29 -04:00
|
|
|
|
|
2017-10-02 10:44:04 +02:00
|
|
|
|
namespace ModernKeePass.ViewModels
|
2017-09-29 17:23:35 -04:00
|
|
|
|
{
|
2017-11-07 18:45:35 +01:00
|
|
|
|
public class RecentItemVm: NotifyPropertyChangedBase, ISelectableModel
|
2017-09-29 17:23:35 -04:00
|
|
|
|
{
|
2017-10-03 16:06:49 +02:00
|
|
|
|
private bool _isSelected;
|
2017-11-07 18:45:35 +01:00
|
|
|
|
|
|
|
|
|
public RecentItemVm() {}
|
2017-10-12 10:36:58 +02:00
|
|
|
|
public RecentItemVm(AccessListEntry entry, StorageFile file)
|
|
|
|
|
{
|
|
|
|
|
Token = entry.Token;
|
|
|
|
|
Name = entry.Metadata;
|
|
|
|
|
DatabaseFile = file;
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-07 18:45:35 +01:00
|
|
|
|
public StorageFile DatabaseFile { get; }
|
|
|
|
|
public string Token { get; }
|
|
|
|
|
public string Name { get; }
|
|
|
|
|
public string Path => DatabaseFile?.Path;
|
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; }
|
2017-11-07 18:45:35 +01:00
|
|
|
|
set { SetProperty(ref _isSelected, value); }
|
2017-10-01 08:48:29 -04:00
|
|
|
|
}
|
2017-09-29 17:23:35 -04:00
|
|
|
|
}
|
|
|
|
|
}
|