mirror of
https://github.com/netchx/netch.git
synced 2026-03-28 18:59:46 +08:00
简化NTT控制器返回值
This commit is contained in:
@@ -205,15 +205,15 @@ namespace Netch.Controllers
|
||||
{
|
||||
Global.MainForm.NatTypeStatusText(i18N.Translate("Starting NatTester"));
|
||||
// Thread.Sleep(1000);
|
||||
var (nttResult, natType, localEnd, publicEnd) = NTTController.Start();
|
||||
var (result, localEnd, publicEnd) = NTTController.Start();
|
||||
|
||||
if (nttResult)
|
||||
if (!string.IsNullOrEmpty(publicEnd))
|
||||
{
|
||||
var country = Utils.Utils.GetCityCode(publicEnd);
|
||||
Global.MainForm.NatTypeStatusText(natType, country);
|
||||
Global.MainForm.NatTypeStatusText(result, country);
|
||||
}
|
||||
else
|
||||
Global.MainForm.NatTypeStatusText(natType);
|
||||
Global.MainForm.NatTypeStatusText(result ?? "Error");
|
||||
|
||||
NttTested = true;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user