1,453
社区成员




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