mirror of https://github.com/2dust/v2rayN
Optimize speed test info
parent
8ba05cb4ed
commit
47e6eb546d
|
@ -30,6 +30,10 @@ namespace v2rayN.Handler
|
||||||
_selecteds = new List<ServerTestItem>();
|
_selecteds = new List<ServerTestItem>();
|
||||||
foreach (var it in selecteds)
|
foreach (var it in selecteds)
|
||||||
{
|
{
|
||||||
|
if (it.configType == EConfigType.Custom)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
_selecteds.Add(new ServerTestItem()
|
_selecteds.Add(new ServerTestItem()
|
||||||
{
|
{
|
||||||
indexId = it.indexId,
|
indexId = it.indexId,
|
||||||
|
@ -38,6 +42,25 @@ namespace v2rayN.Handler
|
||||||
configType = it.configType
|
configType = it.configType
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//clear test result
|
||||||
|
foreach (var it in _selecteds)
|
||||||
|
{
|
||||||
|
switch (actionType)
|
||||||
|
{
|
||||||
|
case ESpeedActionType.Ping:
|
||||||
|
case ESpeedActionType.Tcping:
|
||||||
|
case ESpeedActionType.Realping:
|
||||||
|
UpdateFunc(it.indexId, ResUI.Speedtesting, "");
|
||||||
|
break;
|
||||||
|
case ESpeedActionType.Speedtest:
|
||||||
|
UpdateFunc(it.indexId, "", ResUI.Speedtesting);
|
||||||
|
break;
|
||||||
|
case ESpeedActionType.Mixedtest:
|
||||||
|
UpdateFunc(it.indexId, ResUI.Speedtesting, ResUI.Speedtesting);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (actionType)
|
switch (actionType)
|
||||||
{
|
{
|
||||||
case ESpeedActionType.Ping:
|
case ESpeedActionType.Ping:
|
||||||
|
@ -200,10 +223,10 @@ namespace v2rayN.Handler
|
||||||
}
|
}
|
||||||
if (it.delay < 0)
|
if (it.delay < 0)
|
||||||
{
|
{
|
||||||
|
UpdateFunc(it.indexId, "", ResUI.SpeedtestingSkip);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
_ = LazyConfig.Instance.SetTestResult(it.indexId, "", "-1");
|
_ = LazyConfig.Instance.SetTestResult(it.indexId, "", "-1");
|
||||||
UpdateFunc(it.indexId, "", ResUI.Speedtesting);
|
|
||||||
|
|
||||||
var item = LazyConfig.Instance.GetProfileItem(it.indexId);
|
var item = LazyConfig.Instance.GetProfileItem(it.indexId);
|
||||||
if (item is null) continue;
|
if (item is null) continue;
|
||||||
|
|
|
@ -1752,6 +1752,15 @@ namespace v2rayN.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Skip test 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string SpeedtestingSkip {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SpeedtestingSkip", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 PAC failed to start. Please run this program as Administrator. 的本地化字符串。
|
/// 查找类似 PAC failed to start. Please run this program as Administrator. 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -1072,4 +1072,7 @@
|
||||||
<data name="TbAutoRefresh" xml:space="preserve">
|
<data name="TbAutoRefresh" xml:space="preserve">
|
||||||
<value>AutoRefresh</value>
|
<value>AutoRefresh</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SpeedtestingSkip" xml:space="preserve">
|
||||||
|
<value>Skip test</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -1072,4 +1072,7 @@
|
||||||
<data name="TbAutoRefresh" xml:space="preserve">
|
<data name="TbAutoRefresh" xml:space="preserve">
|
||||||
<value>自动刷新</value>
|
<value>自动刷新</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SpeedtestingSkip" xml:space="preserve">
|
||||||
|
<value>跳过测试</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -105,9 +105,6 @@
|
||||||
<None Update="Resources\Fonts\SourceHanSansCN-Regular.ttf">
|
<None Update="Resources\Fonts\SourceHanSansCN-Regular.ttf">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="Resources\Fonts\微软雅黑-Regular.ttf">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in New Issue