mirror of https://github.com/2dust/v2rayN
bug fix
parent
0f099a19cd
commit
781fab5aab
|
@ -11,6 +11,7 @@ namespace v2rayN.Views
|
|||
public RoutingSettingWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Closing += RoutingSettingWindow_Closing;
|
||||
this.PreviewKeyDown += RoutingSettingWindow_PreviewKeyDown;
|
||||
lstRoutings.SelectionChanged += lstRoutings_SelectionChanged;
|
||||
lstRoutings.MouseDoubleClick += LstRoutings_MouseDoubleClick;
|
||||
|
@ -61,6 +62,14 @@ namespace v2rayN.Views
|
|||
});
|
||||
}
|
||||
|
||||
private void RoutingSettingWindow_Closing(object? sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
if (ViewModel?.IsModified == true)
|
||||
{
|
||||
this.DialogResult = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void RoutingSettingWindow_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using ReactiveUI;
|
||||
using System.ComponentModel;
|
||||
using System.Reactive.Disposables;
|
||||
using System.Windows.Input;
|
||||
using v2rayN.ViewModels;
|
||||
|
@ -12,6 +13,7 @@ namespace v2rayN.Views
|
|||
InitializeComponent();
|
||||
|
||||
ViewModel = new SubSettingViewModel(this);
|
||||
this.Closing += SubSettingWindow_Closing;
|
||||
lstSubscription.MouseDoubleClick += LstSubscription_MouseDoubleClick;
|
||||
|
||||
this.WhenActivated(disposables =>
|
||||
|
@ -27,10 +29,18 @@ namespace v2rayN.Views
|
|||
});
|
||||
}
|
||||
|
||||
private void SubSettingWindow_Closing(object? sender, CancelEventArgs e)
|
||||
{
|
||||
if (ViewModel?.IsModified == true)
|
||||
{
|
||||
this.DialogResult = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void LstSubscription_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
ViewModel?.EditSub(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void menuClose_Click(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue