From 1ce5571ac663b722a02d15e4e76284ab5f3016a9 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Fri, 21 Apr 2023 10:32:41 +0800 Subject: [PATCH] Hide tray tip text --- v2rayN/v2rayN/Mode/ConfigItems.cs | 3 +-- v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs | 4 ++++ v2rayN/v2rayN/Views/MainWindow.xaml | 1 + v2rayN/v2rayN/Views/MainWindow.xaml.cs | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/v2rayN/v2rayN/Mode/ConfigItems.cs b/v2rayN/v2rayN/Mode/ConfigItems.cs index 1096eb0f..92301c45 100644 --- a/v2rayN/v2rayN/Mode/ConfigItems.cs +++ b/v2rayN/v2rayN/Mode/ConfigItems.cs @@ -96,8 +96,6 @@ namespace v2rayN.Mode public int autoUpdateInterval { get; set; } = 10; - public int autoUpdateSubInterval { get; set; } = 10; - public bool checkPreReleaseUpdate { get; set; } = false; public bool enableSecurityProtocolTls13 { get; set; } @@ -126,6 +124,7 @@ namespace v2rayN.Mode public bool doubleClick2Activate { get; set; } public bool autoHideStartup { get; set; } = true; public string mainMsgFilter { get; set; } + public bool showTrayTip { get; set; } public List mainColumnItem { get; set; } } diff --git a/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs b/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs index c18c8e3c..32fca42b 100644 --- a/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs +++ b/v2rayN/v2rayN/ViewModels/MainWindowViewModel.cs @@ -167,6 +167,9 @@ namespace v2rayN.ViewModels [Reactive] public ImageSource AppIcon { get; set; } + [Reactive] + public bool BlShowTrayTip { get; set; } + #endregion Menu #region System Proxy @@ -1694,6 +1697,7 @@ namespace v2rayN.ViewModels } CurrentFontSize = _config.uiItem.currentFontSize; CurrentLanguage = _config.uiItem.currentLanguage; + BlShowTrayTip = _config.uiItem.showTrayTip; this.WhenAnyValue( x => x.ColorModeDark, diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml b/v2rayN/v2rayN/Views/MainWindow.xaml index 136cb7a9..ea76bba8 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml +++ b/v2rayN/v2rayN/Views/MainWindow.xaml @@ -844,6 +844,7 @@ vm.RunningServerToolTipText, v => v.tbNotify.ToolTipText).DisposeWith(disposables); this.OneWayBind(ViewModel, vm => vm.NotifyLeftClickCmd, v => v.tbNotify.LeftClickCommand).DisposeWith(disposables); this.OneWayBind(ViewModel, vm => vm.AppIcon, v => v.Icon).DisposeWith(disposables); + this.OneWayBind(ViewModel, vm => vm.BlShowTrayTip, v => v.borTrayToolTip.Visibility).DisposeWith(disposables); //status bar this.OneWayBind(ViewModel, vm => vm.InboundDisplay, v => v.txtInboundDisplay.Text).DisposeWith(disposables);