vv3.8.6.0 1、修改代码,将软件.net框架版本由4.5降低到4.0,可在WinXP系统运行,WinXP系统最高支持.net 4.0。

This commit is contained in:
wisdomwei201804 2018-07-25 23:46:13 +08:00
parent 78a5a33797
commit 75ee0a7e57

View File

@ -210,15 +210,18 @@ namespace net.nutcore.aliddns
try try
{ {
new Thread(() => Task task = new Task(() =>
{ {
var proc = Process.Start(exec); var proc = Process.Start(exec);
proc.WaitForExit(); proc.WaitForExit();
proc.Dispose(); proc.Dispose();
}).Start(); });
task.Start();
task.Wait(); //Wait for new Thread Exception throw
} }
catch (Exception ex) catch (AggregateException ex)
{ {
MessageBox.Show("Ngrok start running error" + ex.ToString());
Console.WriteLine(ex.Message); Console.WriteLine(ex.Message);
} }
} }
@ -227,7 +230,7 @@ namespace net.nutcore.aliddns
{ {
try try
{ {
new Thread(() => Task task = new Task(() =>
{ {
Process[] pList = Process.GetProcessesByName("Ngrok"); Process[] pList = Process.GetProcessesByName("Ngrok");
foreach (Process p in pList) foreach (Process p in pList)
@ -237,10 +240,13 @@ namespace net.nutcore.aliddns
p.WaitForExit(); p.WaitForExit();
p.Dispose(); p.Dispose();
} }
}).Start(); });
task.Start();
task.Wait(); //Wait for new Thread Exception throw
} }
catch (Exception ex) catch (AggregateException ex)
{ {
MessageBox.Show("Ngrok stop running error" + ex.ToString());
Console.WriteLine(ex.Message); Console.WriteLine(ex.Message);
} }