Dim cob1 As WinForm.ComboBox = e.Form.Controls("ComboBox1")'串口
Dim cob2 As WinForm.ComboBox = e.Form.Controls("ComboBox2")'波特率
Dim cob3 As WinForm.ComboBox = e.Form.Controls("ComboBox3")'数据位
Dim cob4 As WinForm.ComboBox = e.Form.Controls("ComboBox4")'停止位
Dim cob5 As WinForm.ComboBox = e.Form.Controls("ComboBox5")'效验位
Dim cob6 As WinForm.ComboBox = e.Form.Controls("ComboBox6") '地址
Dim dr As DataRow = DataTables("INT").DataRows(0)
Ports.Add(cob1.Text)
If Ports(cob1.Text).IsOpen=False Then
With Ports(cob1.Text)
.Close()
.Encoding=Encoding.ASCII
.BaudRate = cob2.Text
.DataBits = cob3.Text
.Parity =
"Parity." & cob5.Text '奇效验 值是 odd
.StopBits =
"StopBits." & cob4.Text '停止位 1 值是 one
.Handshake = Handshake.None
'.ReadBufferSize() = 8192
'.WriteBufferSize() = 4096
.Open
End With
end if
上述两个红字要怎么写?