Adjust speed test

pull/3507/head
2dust 2023-03-17 10:32:56 +08:00
parent 9ba963fc45
commit 5a4966ba8d
5 changed files with 20 additions and 3 deletions

View File

@ -115,7 +115,7 @@ namespace v2rayN.Base
}
}
};
progress.Report("......");
//progress.Report("......");
using var stream = await downloader.DownloadFileTaskAsync(address: url, cancellationToken: cancellationToken.Token);

View File

@ -58,11 +58,11 @@ namespace v2rayN.Handler
ProfileExHandler.Instance.SetTestDelay(it.indexId, "0");
break;
case ESpeedActionType.Speedtest:
UpdateFunc(it.indexId, "", ResUI.Speedtesting);
UpdateFunc(it.indexId, "", ResUI.SpeedtestingWait);
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "0");
break;
case ESpeedActionType.Mixedtest:
UpdateFunc(it.indexId, ResUI.Speedtesting, ResUI.Speedtesting);
UpdateFunc(it.indexId, ResUI.Speedtesting, ResUI.SpeedtestingWait);
ProfileExHandler.Instance.SetTestDelay(it.indexId, "0");
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "0");
break;
@ -236,6 +236,7 @@ namespace v2rayN.Handler
// continue;
//}
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "-1");
UpdateFunc(it.indexId, "", ResUI.Speedtesting);
var item = LazyConfig.Instance.GetProfileItem(it.indexId);
if (item is null) continue;
@ -287,6 +288,7 @@ namespace v2rayN.Handler
continue;
}
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "-1");
UpdateFunc(it.indexId, "", ResUI.Speedtesting);
var item = LazyConfig.Instance.GetProfileItem(it.indexId);
if (item is null) continue;

View File

@ -1788,6 +1788,15 @@ namespace v2rayN.Resx {
}
}
/// <summary>
/// 查找类似 Waiting for testing 的本地化字符串。
/// </summary>
public static string SpeedtestingWait {
get {
return ResourceManager.GetString("SpeedtestingWait", resourceCulture);
}
}
/// <summary>
/// 查找类似 PAC failed to start. Please run this program as Administrator. 的本地化字符串。
/// </summary>

View File

@ -1144,4 +1144,7 @@
<data name="TbSettingsEnableHWA" xml:space="preserve">
<value>Enable hardware acceleration(Require restart)</value>
</data>
<data name="SpeedtestingWait" xml:space="preserve">
<value>Waiting for testing</value>
</data>
</root>

View File

@ -1144,4 +1144,7 @@
<data name="TbSettingsEnableHWA" xml:space="preserve">
<value>启用硬件加速(需重启)</value>
</data>
<data name="SpeedtestingWait" xml:space="preserve">
<value>等待测试中...</value>
</data>
</root>