mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
Save error is now handled via Messenger instead of unhandled exception handler (which didn't work)
Save as actually works now WIP Styles Code cleanup
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using Windows.Storage.AccessCache;
|
||||
using Windows.Storage.Pickers;
|
||||
using Windows.System;
|
||||
using Windows.System;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Input;
|
||||
using ModernKeePass.ViewModels;
|
||||
@@ -38,24 +35,5 @@ namespace ModernKeePass.Views.UserControls
|
||||
// Stop the event from triggering twice
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private async void KeyFileButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var picker = new FileOpenPicker
|
||||
{
|
||||
ViewMode = PickerViewMode.List,
|
||||
SuggestedStartLocation = PickerLocationId.DocumentsLibrary
|
||||
};
|
||||
picker.FileTypeFilter.Add("*");
|
||||
|
||||
// Application now has read/write access to the picked file
|
||||
var file = await picker.PickSingleFileAsync();
|
||||
if (file == null) return;
|
||||
|
||||
var token = StorageApplicationPermissions.FutureAccessList.Add(file, file.Name);
|
||||
Model.KeyFilePath = token;
|
||||
Model.KeyFileText = file.Name;
|
||||
Model.HasKeyFile = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user