From d443c6d31173da41ca31f302c64c144f4b6e84e4 Mon Sep 17 00:00:00 2001 From: Amazing_DM Date: Fri, 6 Mar 2020 13:03:37 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=E5=90=AF=E5=8A=A8=E6=97=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Netch/Controllers/DNSController.cs | 4 +++- Netch/Controllers/NTTController.cs | 1 + Netch/Controllers/SSController.cs | 4 +++- Netch/Controllers/SSRController.cs | 4 +++- Netch/Controllers/TUNTAPController.cs | 4 +++- Netch/Controllers/VMessController.cs | 4 +++- Netch/Forms/MainForm.cs | 9 +++++++++ Netch/Resources/zh-CN | 7 +++++++ 8 files changed, 32 insertions(+), 5 deletions(-) diff --git a/Netch/Controllers/DNSController.cs b/Netch/Controllers/DNSController.cs index 8f9cbb3c..67643a3d 100644 --- a/Netch/Controllers/DNSController.cs +++ b/Netch/Controllers/DNSController.cs @@ -1,4 +1,5 @@ -using System; +using Netch.Forms; +using System; using System.Net; namespace Netch.Controllers @@ -9,6 +10,7 @@ namespace Netch.Controllers public bool Start() { + MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("Starting LocalDns service")}"); try { _ = Server.Listen(new IPEndPoint(IPAddress.IPv6Any, 53)); diff --git a/Netch/Controllers/NTTController.cs b/Netch/Controllers/NTTController.cs index 07214ec4..9ddc5ba8 100644 --- a/Netch/Controllers/NTTController.cs +++ b/Netch/Controllers/NTTController.cs @@ -24,6 +24,7 @@ namespace Netch.Controllers /// public (bool, string, string, string) Start() { + MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("Starting NatTester")}"); try { if (!File.Exists("bin\\NTT.exe")) diff --git a/Netch/Controllers/SSController.cs b/Netch/Controllers/SSController.cs index 8ec5fc0a..665ec450 100644 --- a/Netch/Controllers/SSController.cs +++ b/Netch/Controllers/SSController.cs @@ -1,4 +1,5 @@ -using System; +using Netch.Forms; +using System; using System.Diagnostics; using System.IO; using System.Threading; @@ -25,6 +26,7 @@ namespace Netch.Controllers /// 是否启动成功 public bool Start(Models.Server server, Models.Mode mode) { + MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("Starting Shadowsocks")}"); if (!File.Exists("bin\\Shadowsocks.exe")) { return false; diff --git a/Netch/Controllers/SSRController.cs b/Netch/Controllers/SSRController.cs index f8dc4178..b5b270a1 100644 --- a/Netch/Controllers/SSRController.cs +++ b/Netch/Controllers/SSRController.cs @@ -1,4 +1,5 @@ -using System; +using Netch.Forms; +using System; using System.Diagnostics; using System.IO; using System.Threading; @@ -25,6 +26,7 @@ namespace Netch.Controllers /// 是否启动成功 public bool Start(Models.Server server, Models.Mode mode) { + MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("Starting Shadowsocks")}"); if (!File.Exists("bin\\ShadowsocksR.exe")) { return false; diff --git a/Netch/Controllers/TUNTAPController.cs b/Netch/Controllers/TUNTAPController.cs index 82565c52..4ca092ba 100644 --- a/Netch/Controllers/TUNTAPController.cs +++ b/Netch/Controllers/TUNTAPController.cs @@ -4,7 +4,7 @@ using System.IO; using System.Net; using System.Text; using System.Threading; - +using Netch.Forms; using Netch.Utils; namespace Netch.Controllers @@ -63,6 +63,7 @@ namespace Netch.Controllers /// public bool SetupBypass() { + MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("SetupBypass")}"); // 让服务器 IP 走直连 foreach (var address in ServerAddresses) { @@ -242,6 +243,7 @@ namespace Netch.Controllers /// 是否成功 public bool Start(Models.Server server, Models.Mode mode) { + MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("Starting Tap")}"); foreach (var proc in Process.GetProcessesByName("tun2socks")) { try diff --git a/Netch/Controllers/VMessController.cs b/Netch/Controllers/VMessController.cs index 0da2d177..82e11607 100644 --- a/Netch/Controllers/VMessController.cs +++ b/Netch/Controllers/VMessController.cs @@ -1,4 +1,5 @@ -using System; +using Netch.Forms; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -26,6 +27,7 @@ namespace Netch.Controllers /// 是否启动成功 public bool Start(Models.Server server, Models.Mode mode) { + MainForm.Instance.StatusText($"{Utils.i18N.Translate("Status")}{Utils.i18N.Translate(": ")}{Utils.i18N.Translate("Starting V2ray")}"); if (!File.Exists("bin\\v2ray.exe") || !File.Exists("bin\\v2ctl.exe")) { return false; diff --git a/Netch/Forms/MainForm.cs b/Netch/Forms/MainForm.cs index 1f0bcf3c..5320a73e 100644 --- a/Netch/Forms/MainForm.cs +++ b/Netch/Forms/MainForm.cs @@ -41,6 +41,11 @@ namespace Netch.Forms public List