mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Finished Password User Control
Recent and Open now use this control
This commit is contained in:

committed by
BONNEVILLE Geoffroy

parent
324553c58c
commit
6d69dd4d15
@@ -71,19 +71,12 @@ namespace ModernKeePass.Pages
|
||||
databaseVm.Name = file.Name;
|
||||
databaseVm.NotifyPropertyChanged("SelectedVisibility");
|
||||
databaseVm.NotifyPropertyChanged("Name");
|
||||
PasswordBox.Focus(FocusState.Programmatic);
|
||||
}
|
||||
|
||||
private void OpenButton_OnClick(object sender, RoutedEventArgs e)
|
||||
private void PasswordUserControl_PasswordChecked(object sender, Events.DatabaseEventArgs e)
|
||||
{
|
||||
var app = (App)Application.Current;
|
||||
StatusTextBlock.Text = app.Database.Open(PasswordBox.Password);
|
||||
if (string.IsNullOrEmpty(StatusTextBlock.Text)) _mainFrame.Navigate(typeof(GroupDetailPage), app.Database.RootGroup);
|
||||
}
|
||||
|
||||
private void PasswordBox_KeyDown(object sender, KeyRoutedEventArgs e)
|
||||
{
|
||||
if (e.Key == VirtualKey.Enter) OpenButton_OnClick(null, null);
|
||||
if (e.IsOpen) _mainFrame.Navigate(typeof(GroupDetailPage), app.Database.RootGroup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user