This repository was archived by the owner on Feb 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2101,6 +2101,7 @@ LocalErrorHandler:
2101
2101
FixBox.BackColor = IIf(_client.Report(), Color.Red, Color.Yellow)
2102
2102
End If
2103
2103
InitSerialInput()
2104
+ _pause.Set()
2104
2105
Exit Sub
2105
2106
2106
2107
LocalErrorHandler:
@@ -2315,9 +2316,9 @@ LocalErrorHandler:
2315
2316
cmdLoadTestplan.Focus()
2316
2317
End If
2317
2318
2318
- Dim thread As New Thread( AddressOf BackgroundThread)
2319
- thread.Start()
2319
+ _thread.Start()
2320
2320
End Sub
2321
+ ReadOnly _thread As New Thread( AddressOf BackgroundThread)
2321
2322
2322
2323
Private Sub InitSerialInput()
2323
2324
' Set focus to the input box and clear it
@@ -2326,6 +2327,7 @@ LocalErrorHandler:
2326
2327
End Sub
2327
2328
2328
2329
ReadOnly _client As New TcpClient()
2330
+ Dim _pause As New Threading.AutoResetEvent( False )
2329
2331
Private Sub BackgroundThread()
2330
2332
If Not _client.Connect() Then
2331
2333
Return
@@ -2338,6 +2340,7 @@ LocalErrorHandler:
2338
2340
Invoke( Sub ()
2339
2341
cmdRun_Click(cmdRun, New System.EventArgs)
2340
2342
End Sub )
2343
+ _pause.WaitOne()
2341
2344
End If
2342
2345
Thread.Sleep( 500 )
2343
2346
End While
You can’t perform that action at this time.
0 commit comments