1,451
社区成员
发帖
与我相关
我的任务
分享
Public Class 通讯
Friend m串口 As New System.IO.Ports.SerialPort
Public Property 连接() As Boolean
Get
Return m串口.IsOpen
Set(ByVal value As Boolean)
If value Then
If m串口.IsOpen = False Then
Try
m串口.Open()
Catch ex As Exception
End Try
End If
Else
m串口.Close()
End If
End Class