修复 端口被占用文本错误,

修复 停止并退出的逻辑错误
This commit is contained in:
ChsBuffer
2020-07-19 18:18:57 +08:00
parent e10c994e38
commit 7a15fa7375
2 changed files with 48 additions and 47 deletions

View File

@@ -68,19 +68,19 @@ namespace Netch.Controllers
// 检查端口是否被占用
if (PortHelper.PortInUse(Global.Settings.Socks5LocalPort))
{
MessageBoxX.Show(i18N.Translate("The {0} port is in use.", "Socks5"));
MessageBoxX.Show(i18N.TranslateFormat("The {0} port is in use.", "Socks5"));
return false;
}
if (PortHelper.PortInUse(Global.Settings.HTTPLocalPort))
{
MessageBoxX.Show(i18N.Translate("The {0} port is in use.", "HTTP"));
MessageBoxX.Show(i18N.TranslateFormat("The {0} port is in use.", "HTTP"));
return false;
}
if (PortHelper.PortInUse(Global.Settings.RedirectorTCPPort, PortType.TCP))
{
MessageBoxX.Show(i18N.Translate("The {0} port is in use.", "Redirector TCP"));
MessageBoxX.Show(i18N.TranslateFormat("The {0} port is in use.", "Redirector TCP"));
return false;
}