Code refactor and simplfication

ModernKeePassLib assembly info updated and version fixed
This commit is contained in:
2017-10-02 10:44:04 +02:00
committed by BONNEVILLE Geoffroy
parent 6d69dd4d15
commit 30838d0e00
17 changed files with 57 additions and 91 deletions

View File

@@ -1,5 +1,5 @@
<UserControl
x:Class="ModernKeePass.Controls.PasswordUserControl"
x:Class="ModernKeePass.Controls.OpenDatabaseUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ModernKeePass.Controls"

View File

@@ -1,29 +1,29 @@
using Windows.System;
using System;
using Windows.System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Input;
using ModernKeePass.Events;
// Pour en savoir plus sur le modèle d'élément Contrôle utilisateur, consultez la page http://go.microsoft.com/fwlink/?LinkId=234236
namespace ModernKeePass.Controls
{
public sealed partial class PasswordUserControl : UserControl
public sealed partial class OpenDatabaseUserControl : UserControl
{
public PasswordUserControl()
public OpenDatabaseUserControl()
{
InitializeComponent();
PasswordBox.Focus(FocusState.Programmatic);
}
public delegate void PasswordCheckedEventHandler(object sender, DatabaseEventArgs e);
public event PasswordCheckedEventHandler PasswordChecked;
public delegate void PasswordCheckedEventHandler(object sender, EventArgs e);
public event PasswordCheckedEventHandler ValidationChecked;
private void OpenButton_OnClick(object sender, RoutedEventArgs e)
{
var app = (App)Application.Current;
StatusTextBlock.Text = app.Database.Open(PasswordBox.Password);
PasswordChecked(this, new DatabaseEventArgs { IsOpen = app.Database.IsOpen });
ValidationChecked?.Invoke(this, new EventArgs());
}
private void PasswordBox_KeyDown(object sender, KeyRoutedEventArgs e)