From 2ae43f8bdbb71b94249d572231656ad6b8bbc908 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sun, 12 Jan 2025 19:33:23 +0800 Subject: [PATCH] Revert "Remove rules custom Icon" This reverts commit d3ebc17a10d3351fd85fa54a8f6d8491a205e3c8. --- .../Views/RoutingRuleSettingWindow.xaml | 2 -- .../Views/RoutingRuleSettingWindow.xaml.cs | 22 +++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml index 02021c5c..772a422d 100644 --- a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml +++ b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml @@ -186,7 +186,6 @@ Style="{StaticResource DefTextBox}" TextWrapping="Wrap" /> - vm.SelectedRouting.DomainStrategy4Singbox, v => v.cmbdomainStrategy4Singbox.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedRouting.Url, v => v.txtUrl.Text).DisposeWith(disposables); - //this.Bind(ViewModel, vm => vm.SelectedRouting.CustomIcon, v => v.txtCustomIcon.Text).DisposeWith(disposables); + this.Bind(ViewModel, vm => vm.SelectedRouting.CustomIcon, v => v.txtCustomIcon.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedRouting.CustomRulesetPath4Singbox, v => v.txtCustomRulesetPath4Singbox.Text).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedRouting.Sort, v => v.txtSort.Text).DisposeWith(disposables); @@ -173,16 +173,16 @@ namespace v2rayN.Views lstRules.SelectAll(); } - //private void btnBrowseCustomIcon_Click(object sender, System.Windows.RoutedEventArgs e) - //{ - // if (UI.OpenFileDialog(out string fileName, - // "PNG,ICO|*.png;*.ico") != true) - // { - // return; - // } + private void btnBrowseCustomIcon_Click(object sender, System.Windows.RoutedEventArgs e) + { + if (UI.OpenFileDialog(out string fileName, + "PNG,ICO|*.png;*.ico") != true) + { + return; + } - // txtCustomIcon.Text = fileName; - //} + txtCustomIcon.Text = fileName; + } private void btnBrowseCustomRulesetPath4Singbox_Click(object sender, RoutedEventArgs e) {