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>();
|
||||
foreach (var it in selecteds)
|
||||
{
|
||||
if (it.configType == EConfigType.Custom)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
_selecteds.Add(new ServerTestItem()
|
||||
{
|
||||
indexId = it.indexId,
|
||||
|
@ -38,6 +42,25 @@ namespace v2rayN.Handler
|
|||
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)
|
||||
{
|
||||
case ESpeedActionType.Ping:
|
||||
|
@ -199,11 +222,11 @@ namespace v2rayN.Handler
|
|||
continue;
|
||||
}
|
||||
if (it.delay < 0)
|
||||
{
|
||||
{
|
||||
UpdateFunc(it.indexId, "", ResUI.SpeedtestingSkip);
|
||||
continue;
|
||||
}
|
||||
_ = LazyConfig.Instance.SetTestResult(it.indexId, "", "-1");
|
||||
UpdateFunc(it.indexId, "", ResUI.Speedtesting);
|
||||
|
||||
var item = LazyConfig.Instance.GetProfileItem(it.indexId);
|
||||
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>
|
||||
/// 查找类似 PAC failed to start. Please run this program as Administrator. 的本地化字符串。
|
||||
/// </summary>
|
||||
|
|
|
@ -1072,4 +1072,7 @@
|
|||
<data name="TbAutoRefresh" xml:space="preserve">
|
||||
<value>AutoRefresh</value>
|
||||
</data>
|
||||
<data name="SpeedtestingSkip" xml:space="preserve">
|
||||
<value>Skip test</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1072,4 +1072,7 @@
|
|||
<data name="TbAutoRefresh" xml:space="preserve">
|
||||
<value>自动刷新</value>
|
||||
</data>
|
||||
<data name="SpeedtestingSkip" xml:space="preserve">
|
||||
<value>跳过测试</value>
|
||||
</data>
|
||||
</root>
|
|
@ -105,9 +105,6 @@
|
|||
<None Update="Resources\Fonts\SourceHanSansCN-Regular.ttf">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Resources\Fonts\微软雅黑-Regular.ttf">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
Loading…
Reference in New Issue