diff --git a/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs b/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs index 671869f0..1bcb8bc7 100644 --- a/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/StatusBarViewModel.cs @@ -51,10 +51,7 @@ public partial class StatusBarViewModel : MyReactiveObject public ReactiveCommand SystemProxySetCmd { get; } public ReactiveCommand SystemProxyNothingCmd { get; } public ReactiveCommand SystemProxyPacCmd { get; } - - [Reactive] - public partial bool BlRouting { get; set; } - + [Reactive] public partial int SystemProxySelected { get; set; } @@ -207,8 +204,6 @@ public partial class StatusBarViewModel : MyReactiveObject await InboundDisplayStatus(); // The view refreshes its icon on initialization; interaction handlers are not registered yet. await ChangeSystemProxyAsync(_config.SystemProxyItem.SysProxyType, false); - - BlRouting = true; } private async Task CopyProxyCmdToClipboard() diff --git a/v2rayN/v2rayN/Views/StatusBarView.xaml b/v2rayN/v2rayN/Views/StatusBarView.xaml index ac4a600f..1b31a1a5 100644 --- a/v2rayN/v2rayN/Views/StatusBarView.xaml +++ b/v2rayN/v2rayN/Views/StatusBarView.xaml @@ -170,24 +170,6 @@ - - - - - - - - vm.SystemProxySetCmd, v => v.menuSystemProxySet).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.SystemProxyNothingCmd, v => v.menuSystemProxyNothing).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.SystemProxyPacCmd, v => v.menuSystemProxyPac).DisposeWith(disposables); - - //routings and servers - this.OneWayBind(ViewModel, vm => vm.RoutingItems, v => v.cmbRoutings.ItemsSource).DisposeWith(disposables); - this.Bind(ViewModel, vm => vm.SelectedRouting, v => v.cmbRoutings.SelectedItem).DisposeWith(disposables); - this.OneWayBind(ViewModel, vm => vm.BlRouting, v => v.menuRoutings.Visibility).DisposeWith(disposables); - this.OneWayBind(ViewModel, vm => vm.BlRouting, v => v.sepRoutings.Visibility).DisposeWith(disposables); - + //tray menu this.BindCommand(ViewModel, vm => vm.AddServerViaClipboardCmd, v => v.menuAddServerViaClipboard2).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.AddServerViaScanCmd, v => v.menuAddServerViaScan2).DisposeWith(disposables); @@ -56,7 +50,6 @@ public partial class StatusBarView this.Bind(ViewModel, vm => vm.SystemProxySelected, v => v.cmbSystemProxy.SelectedIndex).DisposeWith(disposables); this.OneWayBind(ViewModel, vm => vm.RoutingItems, v => v.cmbRoutings2.ItemsSource).DisposeWith(disposables); this.Bind(ViewModel, vm => vm.SelectedRouting, v => v.cmbRoutings2.SelectedItem).DisposeWith(disposables); - this.OneWayBind(ViewModel, vm => vm.BlRouting, v => v.cmbRoutings2.Visibility).DisposeWith(disposables); ViewModel.SetClipboardDataInteraction.RegisterHandler(interaction => {