mirror of
https://github.com/2dust/v2rayN.git
synced 2026-10-20 12:15:00 +03:00
Press the Esc button to close the window
https://github.com/2dust/v2rayN/issues/7819
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Reactive.Disposables;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using v2rayN.Desktop.Base;
|
||||
@@ -14,6 +15,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Loaded += Window_Loaded;
|
||||
btnCancel.Click += (s, e) => this.Close();
|
||||
_config = AppManager.Instance.Config;
|
||||
|
||||
@@ -209,4 +211,8 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
||||
ViewModel.destOverride = clbdestOverride.SelectedItems.Cast<string>().ToList();
|
||||
}
|
||||
}
|
||||
private void Window_Loaded(object? sender, RoutedEventArgs e)
|
||||
{
|
||||
btnCancel.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user