mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-29 14:26:20 +00:00
最小化图标设置中的服务器最多显示20个,不会隐藏
This commit is contained in:
parent
325d91621c
commit
1fb1805956
1 changed files with 15 additions and 2 deletions
|
@ -14,6 +14,7 @@ using System.Reactive;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using v2rayN.Base;
|
using v2rayN.Base;
|
||||||
using v2rayN.Handler;
|
using v2rayN.Handler;
|
||||||
|
@ -952,13 +953,25 @@ namespace v2rayN.ViewModels
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RefreshServersMenu()
|
private void RefreshServersMenu()
|
||||||
{
|
{
|
||||||
_servers.Clear();
|
_servers.Clear();
|
||||||
if (_lstProfile.Count > _config.guiItem.trayMenuServersLimit)
|
if (_lstProfile.Count > _config.guiItem.trayMenuServersLimit)
|
||||||
{
|
{
|
||||||
BlServers = false;
|
BlServers = true;
|
||||||
|
for (int k = 0; k < _config.guiItem.trayMenuServersLimit; k++)
|
||||||
|
{
|
||||||
|
ProfileItem it = _lstProfile[k];
|
||||||
|
string name = it.GetSummary();
|
||||||
|
|
||||||
|
var item = new ComboItem() { ID = it.indexId, Text = name };
|
||||||
|
_servers.Add(item);
|
||||||
|
if (_config.indexId == it.indexId)
|
||||||
|
{
|
||||||
|
SelectedServer = item;
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue