Add tray tool tip for running server.
This commit is contained in:
@@ -175,6 +175,8 @@ namespace v2rayN.ViewModels
|
||||
[Reactive]
|
||||
public string RunningServerDisplay { get; set; }
|
||||
[Reactive]
|
||||
public string RunningServerToolTipText { get; set; }
|
||||
[Reactive]
|
||||
public string RunningInfoDisplay { get; set; }
|
||||
[Reactive]
|
||||
public string SpeedProxyDisplay { get; set; }
|
||||
@@ -770,7 +772,10 @@ namespace v2rayN.ViewModels
|
||||
var running = ConfigHandler.GetDefaultServer(ref _config);
|
||||
if (running != null)
|
||||
{
|
||||
RunningServerDisplay = string.Format("{0}:{1}", ResUI.menuServers, running.GetSummary());
|
||||
var runningSummary = running.GetSummary();
|
||||
var runningProfileItemModel = _profileItems.FirstOrDefault(t => t.indexId == running.indexId);
|
||||
RunningServerDisplay = $"{ResUI.menuServers}:{runningSummary}";
|
||||
RunningServerToolTipText = runningProfileItemModel is null ? runningSummary : $"[{runningProfileItemModel.subRemarks}] {runningSummary}";
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -158,6 +158,7 @@ namespace v2rayN.Views
|
||||
this.BindCommand(ViewModel, vm => vm.SubUpdateViaProxyCmd, v => v.menuSubUpdateViaProxy2).DisposeWith(disposables);
|
||||
|
||||
this.OneWayBind(ViewModel, vm => vm.NotifyIcon, v => v.tbNotify.Icon).DisposeWith(disposables);
|
||||
this.OneWayBind(ViewModel, vm => 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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user