From 3429a3761ba3fa064089d446860fc3ee99f452ee Mon Sep 17 00:00:00 2001 From: wisdomwei201804 Date: Tue, 17 Jul 2018 21:28:20 +0800 Subject: [PATCH] =?UTF-8?q?v3.8.6.0=20=201=E3=80=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C.net=E6=A1=86=E6=9E=B6=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E7=94=B14.5=E9=99=8D=E4=BD=8E=E5=88=B04.0=EF=BC=8C?= =?UTF-8?q?=E5=8F=AF=E5=9C=A8WinXP=E7=B3=BB=E7=BB=9F=E8=BF=90=E8=A1=8C?= =?UTF-8?q?=EF=BC=8CWinXP=E7=B3=BB=E7=BB=9F=E6=9C=80=E9=AB=98=E6=94=AF?= =?UTF-8?q?=E6=8C=81.net=204.0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net.nutcore.aliddns/Form_main.cs | 2 +- .../net.nutcore.aliddns/NgrokHelper.cs | 30 ++++++++++++------- .../net.nutcore.aliddns/updateinfo.txt | 3 ++ 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.cs b/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.cs index 1186753..821eb3e 100644 --- a/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.cs +++ b/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.cs @@ -219,7 +219,7 @@ namespace net.nutcore.aliddns textBox_log.AppendText(System.DateTime.Now.ToString() + " " + "请检查配置文件查询网址设置!" + "\r\n"); return "0.0.0.0"; } - return "0.0.0.0"; + //return "0.0.0.0"; } catch (Exception error) { diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs b/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs index b8891af..cd89611 100644 --- a/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs +++ b/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs @@ -210,12 +210,13 @@ namespace net.nutcore.aliddns try { - Thread thread = new Thread(() => + Task task = Task.Factory.StartNew(() => { var proc = Process.Start(exec); proc.WaitForExit(); proc.Dispose(); }); + task.Start(); } catch (Exception ex) { @@ -225,17 +226,26 @@ namespace net.nutcore.aliddns public void Stop() { - Thread thread = new Thread(() => + try { - Process[] pList = Process.GetProcessesByName("Ngrok"); - foreach (Process p in pList) + Task task = Task.Factory.StartNew(() => { - Console.WriteLine($"Kill: {p.Id}"); - p.Kill(); - p.WaitForExit(); - p.Dispose(); - } - }); + Process[] pList = Process.GetProcessesByName("Ngrok"); + foreach (Process p in pList) + { + Console.WriteLine($"Kill: {p.Id}"); + p.Kill(); + p.WaitForExit(); + p.Dispose(); + } + }); + task.Start(); + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); + } + } } } diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt b/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt index 8293705..b2ee3b6 100644 --- a/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt +++ b/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt @@ -1,3 +1,6 @@ +v3.8.6.0 +1޸Ĵ룬.netܰ汾4.5͵4.0WinXPϵͳУWinXPϵͳ֧.net 4.0 + v3.8.5.0 1޸ʵʱ档2ӶIPַԶѯзֵʱֹͣ3򻯴롣