From d3ebc17a10d3351fd85fa54a8f6d8491a205e3c8 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sun, 12 Jan 2025 14:35:59 +0800 Subject: [PATCH] Remove rules custom Icon --- .../Views/RoutingRuleSettingWindow.axaml | 2 ++ .../Views/RoutingRuleSettingWindow.axaml.cs | 22 +++++++++---------- .../Views/RoutingRuleSettingWindow.xaml | 2 ++ .../Views/RoutingRuleSettingWindow.xaml.cs | 22 +++++++++---------- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml index 71edc63a..01b20b4b 100644 --- a/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/RoutingRuleSettingWindow.axaml @@ -123,6 +123,7 @@ Classes="Margin8" TextWrapping="Wrap" /> + vm.SelectedRouting.DomainStrategy4Singbox, v => v.cmbdomainStrategy4Singbox.SelectedValue).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); @@ -179,16 +179,16 @@ namespace v2rayN.Desktop.Views lstRules.SelectAll(); } - private async void btnBrowseCustomIcon_Click(object? sender, RoutedEventArgs e) - { - var fileName = await UI.OpenFileDialog(this, FilePickerFileTypes.ImagePng); - if (fileName.IsNullOrEmpty()) - { - return; - } + //private async void btnBrowseCustomIcon_Click(object? sender, RoutedEventArgs e) + //{ + // var fileName = await UI.OpenFileDialog(this, FilePickerFileTypes.ImagePng); + // if (fileName.IsNullOrEmpty()) + // { + // return; + // } - txtCustomIcon.Text = fileName; - } + // txtCustomIcon.Text = fileName; + //} private async void btnBrowseCustomRulesetPath4Singbox_ClickAsync(object? sender, RoutedEventArgs e) { diff --git a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml index 772a422d..02021c5c 100644 --- a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml +++ b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml @@ -186,6 +186,7 @@ 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) {