Username is now correctly persisted

Set credentials validation works as intended
Getting settings has default values
Add parent group in Move searchbox
Moving entries work as intended
Removed unreferenced code files
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-30 19:40:48 +02:00
parent e5353478f4
commit 8de493f987
18 changed files with 53 additions and 399 deletions

View File

@@ -1,5 +1,4 @@
using GalaSoft.MvvmLight;
using ModernKeePass.Domain.Dtos;
namespace ModernKeePass.ViewModels
{
@@ -8,32 +7,28 @@ namespace ModernKeePass.ViewModels
private string _name;
private string _path;
private string _token;
public bool IsFileSelected => !string.IsNullOrEmpty(Path);
public bool IsFileSelected => !string.IsNullOrEmpty(Token);
public string Token
{
get { return _token; }
set { Set(() => Token, ref _token, value); }
set
{
Set(() => Token, ref _token, value);
RaisePropertyChanged(nameof(IsFileSelected));
}
}
public string Name
{
get { return _name; }
private set { Set(() => Name, ref _name, value); }
set { Set(() => Name, ref _name, value); }
}
public string Path
{
get { return _path; }
private set { Set(() => Path, ref _path, value); }
}
public void OpenFile(FileInfo file)
{
Token = file.Id;
Name = file.Name;
Path = file.Path;
RaisePropertyChanged(nameof(IsFileSelected));
set { Set(() => Path, ref _path, value); }
}
}
}