mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Save and close for setting tab
This commit is contained in:
@@ -309,15 +309,6 @@ namespace Wox
|
||||
|
||||
#endregion
|
||||
|
||||
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
// Hide window with ESC, but make sure it is not pressed as a hotkey
|
||||
if (e.Key == Key.Escape && !HotkeyControl.IsFocused)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnCheckUpdates(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var version = await Updater.NewVersion();
|
||||
@@ -338,5 +329,15 @@ namespace Wox
|
||||
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnClosed(object sender, EventArgs e)
|
||||
{
|
||||
_viewModel.Save();
|
||||
}
|
||||
|
||||
private void OnCloseExecuted(object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user