mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
Better Entry URL go to button
Migrated code from code behind pages to view models Auto select Recents if there are any recent items WIP auto focus on password box when opening database
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Windows.System;
|
||||
using Windows.UI.Core;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Input;
|
||||
@@ -13,11 +15,10 @@ namespace ModernKeePass.Controls
|
||||
public OpenDatabaseUserControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
PasswordBox.Focus(FocusState.Programmatic);
|
||||
}
|
||||
|
||||
public delegate void PasswordCheckedEventHandler(object sender, EventArgs e);
|
||||
public event PasswordCheckedEventHandler ValidationChecked;
|
||||
public delegate void PasswordCheckedEventHandler(object sender, EventArgs e);
|
||||
|
||||
private void OpenButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -30,5 +31,12 @@ namespace ModernKeePass.Controls
|
||||
{
|
||||
if (e.Key == VirtualKey.Enter) OpenButton_OnClick(null, null);
|
||||
}
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Task.Factory.StartNew(
|
||||
() => Dispatcher.RunAsync(CoreDispatcherPriority.Low,
|
||||
() => PasswordBox.Focus(FocusState.Programmatic)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user