mirror of https://github.com/2dust/v2rayN
Add tray tool tip for running server.
parent
3ab992f5fb
commit
13cb8b84bf
|
@ -175,6 +175,8 @@ namespace v2rayN.ViewModels
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public string RunningServerDisplay { get; set; }
|
public string RunningServerDisplay { get; set; }
|
||||||
[Reactive]
|
[Reactive]
|
||||||
|
public string RunningServerToolTipText { get; set; }
|
||||||
|
[Reactive]
|
||||||
public string RunningInfoDisplay { get; set; }
|
public string RunningInfoDisplay { get; set; }
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public string SpeedProxyDisplay { get; set; }
|
public string SpeedProxyDisplay { get; set; }
|
||||||
|
@ -770,7 +772,10 @@ namespace v2rayN.ViewModels
|
||||||
var running = ConfigHandler.GetDefaultServer(ref _config);
|
var running = ConfigHandler.GetDefaultServer(ref _config);
|
||||||
if (running != null)
|
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.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.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.NotifyLeftClickCmd, v => v.tbNotify.LeftClickCommand).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.AppIcon, v => v.Icon).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.AppIcon, v => v.Icon).DisposeWith(disposables);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue