From 5e8a6f9765b36143f6d536d48362a22baa88a147 Mon Sep 17 00:00:00 2001 From: wisdomwei201804 <wisdom_wei@139.com> Date: Wed, 1 Aug 2018 15:09:51 +0800 Subject: [PATCH] =?UTF-8?q?v3.8.6.1=20=201=E3=80=81=E7=BB=86=E5=8C=96xp?= =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=97=B6=E5=A4=9A=E7=BA=BF=E7=A8=8B=E5=87=BA?= =?UTF-8?q?=E9=94=99=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E7=A8=8B=E5=BA=8F=E5=B4=A9=E6=BA=83?= =?UTF-8?q?=E3=80=822=E3=80=81=E9=94=81=E5=AE=9ArecordId=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E6=96=B0=E6=89=8B=E9=9A=8F=E6=84=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=80=A0=E6=88=90=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net.nutcore.aliddns/Form_main.Designer.cs | 1 + .../net.nutcore.aliddns/NgrokHelper.cs | 46 ++++++++++++------- .../net.nutcore.aliddns/updateinfo.txt | 3 ++ 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.Designer.cs b/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.Designer.cs index f02e0c5..e3b4c6f 100644 --- a/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.Designer.cs +++ b/net.nutcore.aliddns/net.nutcore.aliddns/Form_main.Designer.cs @@ -250,6 +250,7 @@ // this.textBox_recordId.Location = new System.Drawing.Point(68, 18); this.textBox_recordId.Name = "textBox_recordId"; + this.textBox_recordId.ReadOnly = true; this.textBox_recordId.Size = new System.Drawing.Size(116, 21); this.textBox_recordId.TabIndex = 8; this.textBox_recordId.Text = "<null>"; diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs b/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs index d38f0d0..d0c7ddd 100644 --- a/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs +++ b/net.nutcore.aliddns/net.nutcore.aliddns/NgrokHelper.cs @@ -210,14 +210,20 @@ namespace net.nutcore.aliddns try { - Task task = new Task(() => + new Thread(()=> { - var proc = Process.Start(exec); - proc.WaitForExit(); - proc.Dispose(); - }); - task.Start(); - task.Wait(); //Wait for new Thread Exception throw + try + { + var proc = Process.Start(exec); + proc.WaitForExit(); + proc.Dispose(); + } + catch (Exception ex) + { + MessageBox.Show("Ngrok start running error:" + ex.ToString()); + Console.WriteLine(ex.Message); + } + }).Start(); } catch (AggregateException ex) { @@ -230,19 +236,25 @@ namespace net.nutcore.aliddns { try { - Task task = new Task(() => + new Thread(() => { - Process[] pList = Process.GetProcessesByName("Ngrok"); - foreach (Process p in pList) + try { - 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(); - task.Wait(); //Wait for new Thread Exception throw + catch (Exception ex) + { + MessageBox.Show("Ngrok start running error:" + ex.ToString()); + Console.WriteLine(ex.Message); + } + }).Start(); } catch (AggregateException ex) { diff --git a/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt b/net.nutcore.aliddns/net.nutcore.aliddns/updateinfo.txt index b2ee3b6..0df9bfa 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.1 +1��ϸ��xp����ʱ���̳߳����쳣�������룬������������2������recordId�ؼ�������������������ɵĴ��� + v3.8.6.0 1���Ĵ��룬.net��ܰ汾��4.5���͵�4.0������WinXPϵͳ���У�WinXPϵͳ���֧��.net 4.0��