Added functionality to switch database

This commit is contained in:
Andre Beging
2017-09-11 11:52:20 +02:00
parent 3d2d4851cc
commit 68cd02e99b
4 changed files with 40 additions and 15 deletions

View File

@@ -1,17 +1,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using DebtMgr.Extensions;
namespace DebtMgr.View.Dialogs
@@ -34,6 +24,14 @@ namespace DebtMgr.View.Dialogs
private void Window_OnKeyUp(object sender, KeyEventArgs e)
{
if (e.Key.Equals(Key.Escape))
Close();
}
protected override void OnClosing(CancelEventArgs e)
{
base.OnClosing(e);
if (!App.Locator.DatabaseSelectorDialogView.ProgramRequestedClose)
Application.Current.Shutdown();
}
}