初始化项目

This commit is contained in:
2025-12-11 14:22:51 +08:00
commit 4243e3e4d8
919 changed files with 840529 additions and 0 deletions

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>

View File

@@ -0,0 +1,29 @@
Imports System.ComponentModel
Imports System.Text
Imports System.Timers
Imports FlexCell
Imports System.IO.Ports
Namespace BLV_UartMdule
Public Class Blv_Uart
Inherits SerialPort
Public Property Title As String
''' <summary>
''' 提示信息
''' </summary>
''' <returns></returns>
Public Property TipString As String
Sub New(title As String, tip As String)
Me.Title = title
TipString = tip
End Sub
Private Sub InitializeComponent()
End Sub
End Class
End Namespace

View File

@@ -0,0 +1,3 @@
Public Class Class1
End Class

268
BLV_Studio/UART/Form1.Designer.vb generated Normal file
View File

@@ -0,0 +1,268 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class UartForm1
Inherits System.Windows.Forms.Form
'Form 重写 Dispose以清理组件列表。
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer
'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改它。
'不要使用代码编辑器修改它。
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.RefreshSerialPort_btn = New DevComponents.DotNetBar.ButtonX()
Me.OPenUart_btn = New DevComponents.DotNetBar.ButtonX()
Me.LabelX1 = New DevComponents.DotNetBar.LabelX()
Me.LabelX2 = New DevComponents.DotNetBar.LabelX()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.UartSenddata_txt = New DevComponents.DotNetBar.Controls.TextBoxX()
Me.UartSendData_btn = New DevComponents.DotNetBar.ButtonX()
Me.UartFlow_cob = New System.Windows.Forms.ComboBox()
Me.LabelX4 = New DevComponents.DotNetBar.LabelX()
Me.UartCheck_cob = New System.Windows.Forms.ComboBox()
Me.LabelX5 = New DevComponents.DotNetBar.LabelX()
Me.UartStop_cob = New System.Windows.Forms.ComboBox()
Me.LabelX3 = New DevComponents.DotNetBar.LabelX()
Me.UartData_cob = New System.Windows.Forms.ComboBox()
Me.UartBaud_cob = New System.Windows.Forms.ComboBox()
Me.UartPort_cob = New System.Windows.Forms.ComboBox()
Me.CommunicationData_txt = New System.Windows.Forms.TextBox()
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'RefreshSerialPort_btn
'
Me.RefreshSerialPort_btn.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
Me.RefreshSerialPort_btn.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground
Me.RefreshSerialPort_btn.Location = New System.Drawing.Point(14, 31)
Me.RefreshSerialPort_btn.Name = "RefreshSerialPort_btn"
Me.RefreshSerialPort_btn.Size = New System.Drawing.Size(75, 23)
Me.RefreshSerialPort_btn.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled
Me.RefreshSerialPort_btn.TabIndex = 1
Me.RefreshSerialPort_btn.Text = "刷新串口"
'
'OPenUart_btn
'
Me.OPenUart_btn.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
Me.OPenUart_btn.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground
Me.OPenUart_btn.Location = New System.Drawing.Point(14, 239)
Me.OPenUart_btn.Name = "OPenUart_btn"
Me.OPenUart_btn.Size = New System.Drawing.Size(75, 23)
Me.OPenUart_btn.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled
Me.OPenUart_btn.TabIndex = 3
Me.OPenUart_btn.Text = "打开串口"
'
'LabelX1
'
'
'
'
Me.LabelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square
Me.LabelX1.Location = New System.Drawing.Point(14, 70)
Me.LabelX1.Name = "LabelX1"
Me.LabelX1.Size = New System.Drawing.Size(75, 23)
Me.LabelX1.TabIndex = 5
Me.LabelX1.Text = "波特率:"
'
'LabelX2
'
'
'
'
Me.LabelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square
Me.LabelX2.Location = New System.Drawing.Point(14, 99)
Me.LabelX2.Name = "LabelX2"
Me.LabelX2.Size = New System.Drawing.Size(75, 23)
Me.LabelX2.TabIndex = 6
Me.LabelX2.Text = "数据位:"
'
'Panel1
'
Me.Panel1.Controls.Add(Me.UartSenddata_txt)
Me.Panel1.Controls.Add(Me.UartSendData_btn)
Me.Panel1.Controls.Add(Me.UartFlow_cob)
Me.Panel1.Controls.Add(Me.LabelX4)
Me.Panel1.Controls.Add(Me.UartCheck_cob)
Me.Panel1.Controls.Add(Me.LabelX5)
Me.Panel1.Controls.Add(Me.UartStop_cob)
Me.Panel1.Controls.Add(Me.LabelX3)
Me.Panel1.Controls.Add(Me.UartData_cob)
Me.Panel1.Controls.Add(Me.UartBaud_cob)
Me.Panel1.Controls.Add(Me.UartPort_cob)
Me.Panel1.Controls.Add(Me.LabelX1)
Me.Panel1.Controls.Add(Me.OPenUart_btn)
Me.Panel1.Controls.Add(Me.LabelX2)
Me.Panel1.Controls.Add(Me.RefreshSerialPort_btn)
Me.Panel1.Location = New System.Drawing.Point(62, 27)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(279, 366)
Me.Panel1.TabIndex = 7
'
'UartSenddata_txt
'
'
'
'
Me.UartSenddata_txt.Border.Class = "TextBoxBorder"
Me.UartSenddata_txt.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square
Me.UartSenddata_txt.Location = New System.Drawing.Point(95, 305)
Me.UartSenddata_txt.Name = "UartSenddata_txt"
Me.UartSenddata_txt.PreventEnterBeep = True
Me.UartSenddata_txt.Size = New System.Drawing.Size(167, 21)
Me.UartSenddata_txt.TabIndex = 17
'
'UartSendData_btn
'
Me.UartSendData_btn.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton
Me.UartSendData_btn.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground
Me.UartSendData_btn.Location = New System.Drawing.Point(14, 302)
Me.UartSendData_btn.Name = "UartSendData_btn"
Me.UartSendData_btn.Size = New System.Drawing.Size(75, 23)
Me.UartSendData_btn.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled
Me.UartSendData_btn.TabIndex = 16
Me.UartSendData_btn.Text = "发送数据"
'
'UartFlow_cob
'
Me.UartFlow_cob.AllowDrop = True
Me.UartFlow_cob.FormattingEnabled = True
Me.UartFlow_cob.Location = New System.Drawing.Point(95, 186)
Me.UartFlow_cob.Name = "UartFlow_cob"
Me.UartFlow_cob.Size = New System.Drawing.Size(100, 20)
Me.UartFlow_cob.TabIndex = 15
'
'LabelX4
'
'
'
'
Me.LabelX4.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square
Me.LabelX4.Location = New System.Drawing.Point(14, 186)
Me.LabelX4.Name = "LabelX4"
Me.LabelX4.Size = New System.Drawing.Size(75, 23)
Me.LabelX4.TabIndex = 14
Me.LabelX4.Text = "流控:"
'
'UartCheck_cob
'
Me.UartCheck_cob.AllowDrop = True
Me.UartCheck_cob.FormattingEnabled = True
Me.UartCheck_cob.Location = New System.Drawing.Point(95, 157)
Me.UartCheck_cob.Name = "UartCheck_cob"
Me.UartCheck_cob.Size = New System.Drawing.Size(100, 20)
Me.UartCheck_cob.TabIndex = 13
'
'LabelX5
'
'
'
'
Me.LabelX5.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square
Me.LabelX5.Location = New System.Drawing.Point(14, 157)
Me.LabelX5.Name = "LabelX5"
Me.LabelX5.Size = New System.Drawing.Size(75, 23)
Me.LabelX5.TabIndex = 12
Me.LabelX5.Text = "校验位:"
'
'UartStop_cob
'
Me.UartStop_cob.AllowDrop = True
Me.UartStop_cob.FormattingEnabled = True
Me.UartStop_cob.Location = New System.Drawing.Point(95, 128)
Me.UartStop_cob.Name = "UartStop_cob"
Me.UartStop_cob.Size = New System.Drawing.Size(100, 20)
Me.UartStop_cob.TabIndex = 11
'
'LabelX3
'
'
'
'
Me.LabelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square
Me.LabelX3.Location = New System.Drawing.Point(14, 128)
Me.LabelX3.Name = "LabelX3"
Me.LabelX3.Size = New System.Drawing.Size(75, 23)
Me.LabelX3.TabIndex = 10
Me.LabelX3.Text = "停止位:"
'
'UartData_cob
'
Me.UartData_cob.AllowDrop = True
Me.UartData_cob.FormattingEnabled = True
Me.UartData_cob.Location = New System.Drawing.Point(95, 99)
Me.UartData_cob.Name = "UartData_cob"
Me.UartData_cob.Size = New System.Drawing.Size(100, 20)
Me.UartData_cob.TabIndex = 9
'
'UartBaud_cob
'
Me.UartBaud_cob.AllowDrop = True
Me.UartBaud_cob.FormattingEnabled = True
Me.UartBaud_cob.Location = New System.Drawing.Point(95, 70)
Me.UartBaud_cob.Name = "UartBaud_cob"
Me.UartBaud_cob.Size = New System.Drawing.Size(100, 20)
Me.UartBaud_cob.TabIndex = 8
'
'UartPort_cob
'
Me.UartPort_cob.AllowDrop = True
Me.UartPort_cob.FormattingEnabled = True
Me.UartPort_cob.Location = New System.Drawing.Point(95, 34)
Me.UartPort_cob.Name = "UartPort_cob"
Me.UartPort_cob.Size = New System.Drawing.Size(100, 20)
Me.UartPort_cob.TabIndex = 7
'
'CommunicationData_txt
'
Me.CommunicationData_txt.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest
Me.CommunicationData_txt.Location = New System.Drawing.Point(347, 27)
Me.CommunicationData_txt.Multiline = True
Me.CommunicationData_txt.Name = "CommunicationData_txt"
Me.CommunicationData_txt.Size = New System.Drawing.Size(422, 366)
Me.CommunicationData_txt.TabIndex = 8
'
'UartForm1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.CommunicationData_txt)
Me.Name = "UartForm1"
Me.Text = "Uart"
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents RefreshSerialPort_btn As DevComponents.DotNetBar.ButtonX
Friend WithEvents OPenUart_btn As DevComponents.DotNetBar.ButtonX
Friend WithEvents LabelX1 As DevComponents.DotNetBar.LabelX
Friend WithEvents LabelX2 As DevComponents.DotNetBar.LabelX
Friend WithEvents Panel1 As Panel
Friend WithEvents UartPort_cob As ComboBox
Friend WithEvents UartSendData_btn As DevComponents.DotNetBar.ButtonX
Friend WithEvents UartFlow_cob As ComboBox
Friend WithEvents LabelX4 As DevComponents.DotNetBar.LabelX
Friend WithEvents UartCheck_cob As ComboBox
Friend WithEvents LabelX5 As DevComponents.DotNetBar.LabelX
Friend WithEvents UartStop_cob As ComboBox
Friend WithEvents LabelX3 As DevComponents.DotNetBar.LabelX
Friend WithEvents UartData_cob As ComboBox
Friend WithEvents UartBaud_cob As ComboBox
Friend WithEvents UartSenddata_txt As DevComponents.DotNetBar.Controls.TextBoxX
Friend WithEvents CommunicationData_txt As TextBox
End Class

120
BLV_Studio/UART/Form1.resx Normal file
View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

29
BLV_Studio/UART/Form1.vb Normal file
View File

@@ -0,0 +1,29 @@
Imports System.IO.Ports
Public Class UartForm1
''' <summary>
''' 调用窗口
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub UartForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
UartPort_cob.Items.AddRange(SerialPort.GetPortNames())
CommunicationData_txt.Select()
CommunicationData_txt.ScrollBars = ScrollBars.Vertical
CommunicationData_txt.AllowDrop = False
CommunicationData_txt.ScrollToCaret()
End Sub
''' <summary>
''' 串口刷新
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub RefreshSerialPort_btn_Click(sender As Object, e As EventArgs) Handles RefreshSerialPort_btn.Click
End Sub
' Private Function GetUartPort()
End Class

View File

@@ -0,0 +1,36 @@
Imports System.IO.Ports
Public Class UartServer
''' <summary>
''' 串口句柄
''' </summary>
Public Uart As SerialPort
Sub New(UartPort As String, UartBaud As Long, Uartdata As Long, UartParity As Parity, dataBits As Integer, UartStop As Integer)
Uart = New SerialPort(UartPort, UartBaud, UartParity, dataBits, UartStop)
End Sub
''' <summary>
''' 打开串口
''' </summary>
''' <returns></returns>
Public Function UartOPen() As Boolean
Try
Uart.Open()
Catch ex As Exception
End Try
Return Uart.IsOpen
End Function
Public Function UartSenddata(sendbuff() As Byte)
' Uart.s
End Function
End Class