Open file from Explorer with association works

Major code refactor in Open, Save and Recent pages and VM
Main page automatically opens a sub page depending on context
This commit is contained in:
2017-10-10 15:00:31 +02:00
committed by BONNEVILLE Geoffroy
parent 98ecb0b8a1
commit ec4f2e7d88
17 changed files with 205 additions and 125 deletions

View File

@@ -1,10 +1,11 @@
using System;
using System.Threading.Tasks;
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;
using ModernKeePass.Common;
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
@@ -18,13 +19,14 @@ namespace ModernKeePass.Controls
}
public event PasswordCheckedEventHandler ValidationChecked;
public delegate void PasswordCheckedEventHandler(object sender, EventArgs e);
public delegate void PasswordCheckedEventHandler(object sender, PasswordEventArgs e);
private void OpenButton_OnClick(object sender, RoutedEventArgs e)
{
var app = (App)Application.Current;
StatusTextBlock.Text = app.Database.Open(PasswordBox.Password);
ValidationChecked?.Invoke(this, new EventArgs());
if (app.Database.Status == DatabaseHelper.DatabaseStatus.Opened)
ValidationChecked?.Invoke(this, new PasswordEventArgs(app.Database.RootGroup));
}
private void PasswordBox_KeyDown(object sender, KeyRoutedEventArgs e)