mirror of
https://github.com/2dust/v2rayN.git
synced 2025-05-01 20:58:50 +00:00
Adjust speed test
This commit is contained in:
parent
9ba963fc45
commit
5a4966ba8d
5 changed files with 20 additions and 3 deletions
|
@ -115,7 +115,7 @@ namespace v2rayN.Base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
progress.Report("......");
|
//progress.Report("......");
|
||||||
|
|
||||||
using var stream = await downloader.DownloadFileTaskAsync(address: url, cancellationToken: cancellationToken.Token);
|
using var stream = await downloader.DownloadFileTaskAsync(address: url, cancellationToken: cancellationToken.Token);
|
||||||
|
|
||||||
|
|
|
@ -58,11 +58,11 @@ namespace v2rayN.Handler
|
||||||
ProfileExHandler.Instance.SetTestDelay(it.indexId, "0");
|
ProfileExHandler.Instance.SetTestDelay(it.indexId, "0");
|
||||||
break;
|
break;
|
||||||
case ESpeedActionType.Speedtest:
|
case ESpeedActionType.Speedtest:
|
||||||
UpdateFunc(it.indexId, "", ResUI.Speedtesting);
|
UpdateFunc(it.indexId, "", ResUI.SpeedtestingWait);
|
||||||
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "0");
|
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "0");
|
||||||
break;
|
break;
|
||||||
case ESpeedActionType.Mixedtest:
|
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.SetTestDelay(it.indexId, "0");
|
||||||
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "0");
|
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "0");
|
||||||
break;
|
break;
|
||||||
|
@ -236,6 +236,7 @@ namespace v2rayN.Handler
|
||||||
// continue;
|
// continue;
|
||||||
//}
|
//}
|
||||||
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "-1");
|
ProfileExHandler.Instance.SetTestSpeed(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;
|
||||||
|
@ -287,6 +288,7 @@ namespace v2rayN.Handler
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ProfileExHandler.Instance.SetTestSpeed(it.indexId, "-1");
|
ProfileExHandler.Instance.SetTestSpeed(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;
|
||||||
|
|
9
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
9
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
|
@ -1788,6 +1788,15 @@ namespace v2rayN.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Waiting for testing 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string SpeedtestingWait {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("SpeedtestingWait", 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>
|
||||||
|
|
|
@ -1144,4 +1144,7 @@
|
||||||
<data name="TbSettingsEnableHWA" xml:space="preserve">
|
<data name="TbSettingsEnableHWA" xml:space="preserve">
|
||||||
<value>Enable hardware acceleration(Require restart)</value>
|
<value>Enable hardware acceleration(Require restart)</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SpeedtestingWait" xml:space="preserve">
|
||||||
|
<value>Waiting for testing</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
|
@ -1144,4 +1144,7 @@
|
||||||
<data name="TbSettingsEnableHWA" xml:space="preserve">
|
<data name="TbSettingsEnableHWA" xml:space="preserve">
|
||||||
<value>启用硬件加速(需重启)</value>
|
<value>启用硬件加速(需重启)</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="SpeedtestingWait" xml:space="preserve">
|
||||||
|
<value>等待测试中...</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
Loading…
Reference in a new issue