From dc02eb7667deaa5214ed5fa65a50172f66e0611c Mon Sep 17 00:00:00 2001 From: SoulStar Date: Tue, 13 Aug 2024 15:27:19 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=BE=AA=E7=8E=AF=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E6=B7=BB=E5=8A=A0=E7=BA=BF=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NDSD-Screwdriver/ScrewdriverTest.cs | 36 +++++++++++++++++++---------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/NDSD-Screwdriver/ScrewdriverTest.cs b/NDSD-Screwdriver/ScrewdriverTest.cs index d278ff9..dc4f4c5 100644 --- a/NDSD-Screwdriver/ScrewdriverTest.cs +++ b/NDSD-Screwdriver/ScrewdriverTest.cs @@ -69,11 +69,15 @@ namespace NDSD_Screwdriver MessageBox.Show("属性值无效!"); return; } - for (int i = 0; i <= 16; i++) + Thread thread = new Thread(() => { - DOperate.DClose(i); - Thread.Sleep(span); - } + for (int i = 0; i <= 16; i++) + { + DOperate.DClose(i); + Thread.Sleep(span); + } + }); + thread.Start(); } private void DOpenAll_Click(object sender, EventArgs e) @@ -85,11 +89,15 @@ namespace NDSD_Screwdriver MessageBox.Show("属性值无效!"); return; } - for (int i = 0; i <= 16; i++) + Thread thread = new Thread(() => { - DOperate.DOpen(i); - Thread.Sleep(span); - } + for (int i = 0; i <= 16; i++) + { + DOperate.DOpen(i); + Thread.Sleep(span); + } + }); + thread.Start(); } private void ScrewdriverTest_FormClosed(object sender, FormClosedEventArgs e) @@ -118,11 +126,15 @@ namespace NDSD_Screwdriver MessageBox.Show("属性值无效!"); return; } - for (int i = 0; i <= 16; i++) + Thread thread = new Thread(() => { - DOperate.DTimeOpen(i, time); - Thread.Sleep(span); - } + for (int i = 0; i <= 16; i++) + { + DOperate.DTimeOpen(i, time); + Thread.Sleep(span); + } + }); + thread.Start(); } }