Compare commits

...

4 Commits

Author SHA1 Message Date
Amazing_DM
5d96127b5a Merge pull request #252 from henning724/master
添加配置(profile)相关提示框
2020-03-20 10:53:01 +08:00
henning
f2912a334a 添加配置(profile)相关提示框 2020-03-20 10:46:48 +08:00
Amazing_DM
09bddd9ad4 :sparkles:启动后将自动以 1秒/次 的速度测试节点延迟(Tcping) 2020-03-19 23:15:12 +08:00
Amazing_DM
8fc4e3151f Create GetSHA256.ps1 2020-03-19 22:28:47 +08:00
3 changed files with 35 additions and 0 deletions

5
GetSHA256.ps1 Normal file
View File

@@ -0,0 +1,5 @@
param([string]$file)
$hash = [Security.Cryptography.HashAlgorithm]::Create( "SHA256" )
$stream = ([IO.StreamReader]$file).BaseStream
-join ($hash.ComputeHash($stream) | ForEach { "{0:X2}" -f $_ })
$stream.Close()

View File

@@ -875,6 +875,25 @@ namespace Netch.Forms
}
State = Models.State.Started;
// 自动检测延迟
Task.Run(() =>
{
while (true)
{
if (State == Models.State.Started)
{
server.Test();
// 重载服务器列表
InitServer();
Thread.Sleep(1000);
}
else
{
break;
}
}
});
}
else
{
@@ -1018,6 +1037,10 @@ namespace Netch.Forms
{
MessageBox.Show(Utils.i18N.Translate("Please select an mode first"), Utils.i18N.Translate("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else if (ProfileNameText.Text == "")
{
MessageBox.Show(Utils.i18N.Translate("Please enter a profile name first"), Utils.i18N.Translate("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
SaveProfile(index);
@@ -1026,6 +1049,11 @@ namespace Netch.Forms
}
else
{
if (ProfileButtons[index].Text == Utils.i18N.Translate("Error") || ProfileButtons[index].Text == Utils.i18N.Translate("None"))
{
MessageBox.Show(Utils.i18N.Translate("No saved profile here. Save a profile first by Ctrl+Click on the button"), Utils.i18N.Translate("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
}
try
{
ProfileNameText.Text = LoadProfile(index);

View File

@@ -96,6 +96,8 @@
"Please press Stop button first": "请先点击停止按钮",
"Please select a server first": "请先选择一个服务器",
"Please select an mode first": "请先选择一个模式",
"Please enter a profile name first": "请先为该配置设置一个名称",
"No saved profile here. Save a profile first by Ctrl+Click on the button": "当前按钮下没有保存配置请先使用ctrl+左键点击该按钮保存一个配置",
"Used": "已使用",
"Status": "状态",