Database file is now handled by each page, instead of a central place

Opening a database while another one is open triggers a warning message
This commit is contained in:
BONNEVILLE Geoffroy
2018-06-20 11:52:17 +02:00
parent 408b4eed90
commit 188233cc81
8 changed files with 17 additions and 16 deletions

View File

@@ -9,7 +9,7 @@ namespace ModernKeePass.ViewModels
{
public bool IsFileSelected => DatabaseFile != null;
public string Name => DatabaseFile.DisplayName;
public string Name => DatabaseFile?.DisplayName;
public StorageFile DatabaseFile { get; private set; }
@@ -31,6 +31,7 @@ namespace ModernKeePass.ViewModels
DatabaseFile = file;
OnPropertyChanged("Name");
OnPropertyChanged("IsFileSelected");
OnPropertyChanged("DatabaseFile");
AddToRecentList(file, recent);
}