Open from Explorer works again

Updated ModernKeePassLib
This commit is contained in:
Geoffroy BONNEVILLE
2020-04-24 15:52:46 +02:00
parent eacb3b182e
commit 3967db41b3
6 changed files with 13 additions and 12 deletions

View File

@@ -3,7 +3,7 @@
"dependencies": { "dependencies": {
"AutoMapper": "5.2.0", "AutoMapper": "5.2.0",
"Microsoft.NETCore.Portable.Compatibility": "1.0.1", "Microsoft.NETCore.Portable.Compatibility": "1.0.1",
"ModernKeePassLib": "2.44.2", "ModernKeePassLib": "2.44.3",
"NETStandard.Library": "2.0.3" "NETStandard.Library": "2.0.3"
}, },
"frameworks": { "frameworks": {

View File

@@ -249,9 +249,12 @@ namespace ModernKeePass
var rootFrame = new Frame(); var rootFrame = new Frame();
var file = args.Files[0] as StorageFile; var file = args.Files[0] as StorageFile;
Window.Current.Content = rootFrame;
if (file != null) if (file != null)
{ {
var token = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name); // TODO: use service
var token = StorageApplicationPermissions.MostRecentlyUsedList.Add(file, file.Path);
var fileInfo = new FileInfo var fileInfo = new FileInfo
{ {
Id = token, Id = token,
@@ -265,7 +268,6 @@ namespace ModernKeePass
_navigation.NavigateTo(Constants.Navigation.MainPage); _navigation.NavigateTo(Constants.Navigation.MainPage);
} }
Window.Current.Content = rootFrame;
Window.Current.Activate(); Window.Current.Activate();
} }

View File

@@ -44,10 +44,9 @@ namespace ModernKeePass.Views
// Application now has read/write access to the picked file // Application now has read/write access to the picked file
var file = await picker.PickSingleFileAsync().AsTask(); var file = await picker.PickSingleFileAsync().AsTask();
if (file == null) return; if (file == null) return;
//var token = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
// TODO: use service // TODO: use service
var token = StorageApplicationPermissions.MostRecentlyUsedList.Add(file, file.Name); var token = StorageApplicationPermissions.MostRecentlyUsedList.Add(file, file.Path);
var fileInfo = new FileInfo var fileInfo = new FileInfo
{ {
Path = file.Path, Path = file.Path,

View File

@@ -382,8 +382,8 @@
<HintPath>..\packages\Microsoft.Toolkit.Uwp.Notifications.2.0.0\lib\dotnet\Microsoft.Toolkit.Uwp.Notifications.dll</HintPath> <HintPath>..\packages\Microsoft.Toolkit.Uwp.Notifications.2.0.0\lib\dotnet\Microsoft.Toolkit.Uwp.Notifications.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="ModernKeePassLib, Version=2.44.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ModernKeePassLib, Version=2.44.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ModernKeePassLib.2.44.2\lib\netstandard1.2\ModernKeePassLib.dll</HintPath> <HintPath>..\packages\ModernKeePassLib.2.44.3\lib\netstandard1.2\ModernKeePassLib.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="SixLabors.Core, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="SixLabors.Core, Version=0.1.0.0, Culture=neutral, processorArchitecture=MSIL">

View File

@@ -15,7 +15,7 @@
<package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.1" targetFramework="win81" /> <package id="Microsoft.NETCore.Portable.Compatibility" version="1.0.1" targetFramework="win81" />
<package id="Microsoft.NETCore.UniversalWindowsPlatform" version="6.1.7" targetFramework="win81" /> <package id="Microsoft.NETCore.UniversalWindowsPlatform" version="6.1.7" targetFramework="win81" />
<package id="Microsoft.Toolkit.Uwp.Notifications" version="2.0.0" targetFramework="win81" /> <package id="Microsoft.Toolkit.Uwp.Notifications" version="2.0.0" targetFramework="win81" />
<package id="ModernKeePassLib" version="2.44.2" targetFramework="win81" /> <package id="ModernKeePassLib" version="2.44.3" targetFramework="win81" />
<package id="MvvmLight" version="5.4.1.1" targetFramework="win81" /> <package id="MvvmLight" version="5.4.1.1" targetFramework="win81" />
<package id="MvvmLightLibs" version="5.4.1.1" targetFramework="win81" /> <package id="MvvmLightLibs" version="5.4.1.1" targetFramework="win81" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="win81" /> <package id="NETStandard.Library" version="2.0.3" targetFramework="win81" />

View File

@@ -77,10 +77,10 @@ namespace ModernKeePass.ViewModels
public SettingsSecurityVm SettingsSecurity => ServiceLocator.Current.GetInstance<SettingsSecurityVm>(Guid.NewGuid().ToString()); public SettingsSecurityVm SettingsSecurity => ServiceLocator.Current.GetInstance<SettingsSecurityVm>(Guid.NewGuid().ToString());
public OpenDatabaseControlVm OpenDatabaseControl => ServiceLocator.Current.GetInstance<OpenDatabaseControlVm>(Guid.NewGuid().ToString()); public OpenDatabaseControlVm OpenDatabaseControl => ServiceLocator.Current.GetInstance<OpenDatabaseControlVm>(Guid.NewGuid().ToString());
public SetCredentialsVm SetCredentials => ServiceLocator.Current.GetInstance<SetCredentialsVm>(Guid.NewGuid().ToString()); public SetCredentialsVm SetCredentials => ServiceLocator.Current.GetInstance<SetCredentialsVm>(Guid.NewGuid().ToString());
public NewVm New => ServiceLocator.Current.GetInstance<NewVm>(); public NewVm New => ServiceLocator.Current.GetInstance<NewVm>(Guid.NewGuid().ToString());
public OpenVm Open => ServiceLocator.Current.GetInstance<OpenVm>(); public OpenVm Open => ServiceLocator.Current.GetInstance<OpenVm>(Guid.NewGuid().ToString());
public RecentVm Recent => ServiceLocator.Current.GetInstance<RecentVm>(Guid.NewGuid().ToString()); public RecentVm Recent => ServiceLocator.Current.GetInstance<RecentVm>(Guid.NewGuid().ToString());
public SaveVm Save => ServiceLocator.Current.GetInstance<SaveVm>(); public SaveVm Save => ServiceLocator.Current.GetInstance<SaveVm>(Guid.NewGuid().ToString());
public static void Cleanup() public static void Cleanup()
{ {