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

@@ -1,4 +1,5 @@
using Windows.UI.Xaml.Controls;
using Windows.Storage;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
using ModernKeePass.ViewModels;
@@ -32,7 +33,8 @@ namespace ModernKeePass.Views
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
DataContext = new MainVm(Frame, MenuFrame);
var file = e.Parameter as StorageFile;
DataContext = new MainVm(Frame, MenuFrame, file);
}
}
}