Added functionality to switch database
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user