初始化提交

仓库转移到Gitea,初始化提交,可能丢失以前的git版本日志
This commit is contained in:
2025-11-27 16:41:05 +08:00
commit 027d0f8024
663 changed files with 171319 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class ZQ_Mars_P2_FrmStationPlan
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.SuspendLayout()
'
'ZQ_Mars_P2_FrmStationPlan
'
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.Name = "ZQ_Mars_P2_FrmStationPlan"
Me.Text = "ZQ_Mars_P2_FrmStationPlan"
Me.ResumeLayout(False)
End Sub
End Class

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>

View File

@@ -0,0 +1,15 @@
Public Class ZQ_Mars_P2_FrmStationPlan
Private Sub ZQ_Mars_P2_FrmStationPlan_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
Public Sub ShowForm(parentControl As Control)
FormBorderStyle = FormBorderStyle.None
TopLevel = False
Dock = DockStyle.Fill
Parent = parentControl
Show()
End Sub
End Class

View File

@@ -0,0 +1,316 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class ZQ_Mars_P2_FrmStationTest
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.components = New System.ComponentModel.Container()
Me.SerialPort1 = New System.IO.Ports.SerialPort(Me.components)
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.lab_Pass = New System.Windows.Forms.Label()
Me.TextBox3 = New System.Windows.Forms.TextBox()
Me.TextBox2 = New System.Windows.Forms.TextBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.btn_OK = New System.Windows.Forms.Button()
Me.txt_UpNum = New System.Windows.Forms.TextBox()
Me.txt_testnum = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.txt_LooadNum = New System.Windows.Forms.TextBox()
Me.Btn_IsOpenSerialPort = New System.Windows.Forms.Button()
Me.Cbo_SerialPort = New System.Windows.Forms.ComboBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Txt_BaudRate = New System.Windows.Forms.TextBox()
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer2.Panel1.SuspendLayout()
Me.SplitContainer2.Panel2.SuspendLayout()
Me.SplitContainer2.SuspendLayout()
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer1.Panel1.SuspendLayout()
Me.SplitContainer1.SuspendLayout()
Me.SuspendLayout()
'
'SplitContainer2
'
Me.SplitContainer2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.SplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainer2.Location = New System.Drawing.Point(0, 0)
Me.SplitContainer2.Name = "SplitContainer2"
'
'SplitContainer2.Panel1
'
Me.SplitContainer2.Panel1.Controls.Add(Me.SplitContainer1)
'
'SplitContainer2.Panel2
'
Me.SplitContainer2.Panel2.Controls.Add(Me.TextBox3)
Me.SplitContainer2.Panel2.Controls.Add(Me.TextBox2)
Me.SplitContainer2.Panel2.Controls.Add(Me.Label5)
Me.SplitContainer2.Panel2.Controls.Add(Me.Label4)
Me.SplitContainer2.Panel2.Controls.Add(Me.Button1)
Me.SplitContainer2.Panel2.Controls.Add(Me.btn_OK)
Me.SplitContainer2.Panel2.Controls.Add(Me.txt_UpNum)
Me.SplitContainer2.Panel2.Controls.Add(Me.txt_testnum)
Me.SplitContainer2.Panel2.Controls.Add(Me.Label3)
Me.SplitContainer2.Panel2.Controls.Add(Me.Label2)
Me.SplitContainer2.Panel2.Controls.Add(Me.txt_LooadNum)
Me.SplitContainer2.Panel2.Controls.Add(Me.Btn_IsOpenSerialPort)
Me.SplitContainer2.Panel2.Controls.Add(Me.Cbo_SerialPort)
Me.SplitContainer2.Panel2.Controls.Add(Me.Label1)
Me.SplitContainer2.Panel2.Controls.Add(Me.Txt_BaudRate)
Me.SplitContainer2.Size = New System.Drawing.Size(984, 562)
Me.SplitContainer2.SplitterDistance = 353
Me.SplitContainer2.TabIndex = 1
'
'SplitContainer1
'
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
Me.SplitContainer1.Name = "SplitContainer1"
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
'
'SplitContainer1.Panel1
'
Me.SplitContainer1.Panel1.Controls.Add(Me.lab_Pass)
Me.SplitContainer1.Panel1.Font = New System.Drawing.Font("宋体", 28.0!)
Me.SplitContainer1.Size = New System.Drawing.Size(351, 560)
Me.SplitContainer1.SplitterDistance = 224
Me.SplitContainer1.TabIndex = 0
'
'lab_Pass
'
Me.lab_Pass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.lab_Pass.Dock = System.Windows.Forms.DockStyle.Fill
Me.lab_Pass.Location = New System.Drawing.Point(0, 0)
Me.lab_Pass.Name = "lab_Pass"
Me.lab_Pass.Size = New System.Drawing.Size(351, 224)
Me.lab_Pass.TabIndex = 0
Me.lab_Pass.Text = "Pass"
Me.lab_Pass.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'TextBox3
'
Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.TextBox3.Font = New System.Drawing.Font("宋体", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.TextBox3.Location = New System.Drawing.Point(19, 176)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.ReadOnly = True
Me.TextBox3.Size = New System.Drawing.Size(420, 44)
Me.TextBox3.TabIndex = 28
Me.TextBox3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox2
'
Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.TextBox2.Font = New System.Drawing.Font("宋体", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.TextBox2.Location = New System.Drawing.Point(16, 119)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.Size = New System.Drawing.Size(420, 44)
Me.TextBox2.TabIndex = 27
Me.TextBox2.Text = "CTHM08711382252033277"
Me.TextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Font = New System.Drawing.Font("宋体", 27.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label5.Location = New System.Drawing.Point(445, 176)
Me.Label5.Name = "Label5"
Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.Yes
Me.Label5.Size = New System.Drawing.Size(150, 37)
Me.Label5.TabIndex = 26
Me.Label5.Text = "DUT_SN:"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("宋体", 27.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label4.Location = New System.Drawing.Point(442, 119)
Me.Label4.Name = "Label4"
Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.Yes
Me.Label4.Size = New System.Drawing.Size(147, 37)
Me.Label4.TabIndex = 25
Me.Label4.Text = "彩盒码:"
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Button1
'
Me.Button1.Font = New System.Drawing.Font("宋体", 27.75!)
Me.Button1.Location = New System.Drawing.Point(430, 3)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(174, 45)
Me.Button1.TabIndex = 24
Me.Button1.Text = "刷新串口"
Me.Button1.UseVisualStyleBackColor = True
Me.Button1.Visible = False
'
'btn_OK
'
Me.btn_OK.Font = New System.Drawing.Font("宋体", 27.75!)
Me.btn_OK.Location = New System.Drawing.Point(374, 455)
Me.btn_OK.Name = "btn_OK"
Me.btn_OK.Size = New System.Drawing.Size(208, 65)
Me.btn_OK.TabIndex = 23
Me.btn_OK.Text = "确认写入"
Me.btn_OK.UseVisualStyleBackColor = True
Me.btn_OK.Visible = False
'
'txt_UpNum
'
Me.txt_UpNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_UpNum.Font = New System.Drawing.Font("宋体", 27.0!)
Me.txt_UpNum.Location = New System.Drawing.Point(359, 287)
Me.txt_UpNum.Name = "txt_UpNum"
Me.txt_UpNum.ReadOnly = True
Me.txt_UpNum.Size = New System.Drawing.Size(110, 49)
Me.txt_UpNum.TabIndex = 22
Me.txt_UpNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'txt_testnum
'
Me.txt_testnum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_testnum.Font = New System.Drawing.Font("宋体", 27.0!)
Me.txt_testnum.Location = New System.Drawing.Point(201, 287)
Me.txt_testnum.Name = "txt_testnum"
Me.txt_testnum.Size = New System.Drawing.Size(110, 49)
Me.txt_testnum.TabIndex = 21
Me.txt_testnum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("宋体", 27.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label3.Location = New System.Drawing.Point(317, 293)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(36, 37)
Me.Label3.TabIndex = 20
Me.Label3.Text = ">"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("宋体", 27.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label2.Location = New System.Drawing.Point(159, 293)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(36, 37)
Me.Label2.TabIndex = 19
Me.Label2.Text = "<"
'
'txt_LooadNum
'
Me.txt_LooadNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.txt_LooadNum.Font = New System.Drawing.Font("宋体", 27.0!)
Me.txt_LooadNum.Location = New System.Drawing.Point(43, 287)
Me.txt_LooadNum.Name = "txt_LooadNum"
Me.txt_LooadNum.ReadOnly = True
Me.txt_LooadNum.Size = New System.Drawing.Size(110, 49)
Me.txt_LooadNum.TabIndex = 18
Me.txt_LooadNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'Btn_IsOpenSerialPort
'
Me.Btn_IsOpenSerialPort.Font = New System.Drawing.Font("宋体", 27.75!)
Me.Btn_IsOpenSerialPort.Location = New System.Drawing.Point(442, 65)
Me.Btn_IsOpenSerialPort.Name = "Btn_IsOpenSerialPort"
Me.Btn_IsOpenSerialPort.Size = New System.Drawing.Size(173, 45)
Me.Btn_IsOpenSerialPort.TabIndex = 17
Me.Btn_IsOpenSerialPort.Text = "打开串口"
Me.Btn_IsOpenSerialPort.UseVisualStyleBackColor = True
'
'Cbo_SerialPort
'
Me.Cbo_SerialPort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.Cbo_SerialPort.Font = New System.Drawing.Font("宋体", 27.75!)
Me.Cbo_SerialPort.FormattingEnabled = True
Me.Cbo_SerialPort.Location = New System.Drawing.Point(201, 65)
Me.Cbo_SerialPort.Name = "Cbo_SerialPort"
Me.Cbo_SerialPort.Size = New System.Drawing.Size(235, 45)
Me.Cbo_SerialPort.TabIndex = 16
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("宋体", 27.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.Location = New System.Drawing.Point(277, 7)
Me.Label1.Name = "Label1"
Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.Yes
Me.Label1.Size = New System.Drawing.Size(147, 37)
Me.Label1.TabIndex = 15
Me.Label1.Text = "波特率:"
Me.Label1.Visible = False
'
'Txt_BaudRate
'
Me.Txt_BaudRate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.Txt_BaudRate.Font = New System.Drawing.Font("宋体", 27.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Txt_BaudRate.Location = New System.Drawing.Point(138, 7)
Me.Txt_BaudRate.Name = "Txt_BaudRate"
Me.Txt_BaudRate.ReadOnly = True
Me.Txt_BaudRate.Size = New System.Drawing.Size(133, 50)
Me.Txt_BaudRate.TabIndex = 14
Me.Txt_BaudRate.Text = "9600"
Me.Txt_BaudRate.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.Txt_BaudRate.Visible = False
'
'ZQ_Mars_P2_FrmStationTest
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(984, 562)
Me.Controls.Add(Me.SplitContainer2)
Me.Name = "ZQ_Mars_P2_FrmStationTest"
Me.Text = "ZQ_Mars_P2_FrmStationTest"
Me.SplitContainer2.Panel1.ResumeLayout(False)
Me.SplitContainer2.Panel2.ResumeLayout(False)
Me.SplitContainer2.Panel2.PerformLayout()
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer2.ResumeLayout(False)
Me.SplitContainer1.Panel1.ResumeLayout(False)
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
Friend WithEvents SerialPort1 As IO.Ports.SerialPort
Friend WithEvents SplitContainer2 As SplitContainer
Friend WithEvents txt_UpNum As TextBox
Friend WithEvents txt_testnum As TextBox
Friend WithEvents Label3 As Label
Friend WithEvents Label2 As Label
Friend WithEvents txt_LooadNum As TextBox
Friend WithEvents Btn_IsOpenSerialPort As Button
Friend WithEvents Cbo_SerialPort As ComboBox
Friend WithEvents Label1 As Label
Friend WithEvents Txt_BaudRate As TextBox
Friend WithEvents SplitContainer1 As SplitContainer
Friend WithEvents lab_Pass As Label
Friend WithEvents Button1 As Button
Friend WithEvents Label5 As Label
Friend WithEvents Label4 As Label
Friend WithEvents TextBox3 As TextBox
Friend WithEvents TextBox2 As TextBox
Friend WithEvents btn_OK As Button
End Class

View File

@@ -0,0 +1,126 @@
<?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="SerialPort1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
</root>

View File

@@ -0,0 +1,515 @@
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Threading
Imports Newtonsoft.Json
Imports UTS_Core.DebugLog
Imports UTS_Core.UTSModule
Imports UTS_Core.UTSModule.Station
Imports UTS_Core.UTSModule.Test
Imports UTS_Core.UTSModule.Test.StatusMonitor
Public Class ZQ_Mars_P2_FrmStationTest
Implements IProcessStation
Public Isopenflag As Boolean = False
Private _stationPlan As StationPackagePlan
Private Stnum As Integer = 0
Private Utnum As Integer = 0
Private Stnum_cnt As Integer = 0
Public _Uart1Tack As Thread
Private _utsApp As UtsAppForm
Public Sub ConfigSerialPort(Serial As IO.Ports.SerialPort, BaudRate As Integer, portName As String)
With Serial
.PortName = portName '串口名
.BaudRate = BaudRate ' _BaudRate '波特率
.DataBits = 8 '数据位
.StopBits = Ports.StopBits.One '停止位
.Parity = Ports.Parity.None '偶校验
.RtsEnable = True
.ReceivedBytesThreshold = 1
End With
End Sub
Private Sub ZQ_Mars_P2_FrmStationTest_Load(sender As Object, e As EventArgs) Handles MyBase.Load
ApplicationLog.WriteInfoLog($"测试页面加载中。")
If InitializeUtsApp() = False Then Return
'InitializeForm()
_Uart1Tack = New Thread(AddressOf ReadUart1DataThread)
_Uart1Tack.Start()
End Sub
Private Function InitializeUtsApp() As Boolean
_utsApp = UtsAppForm.CreateSingleton()
_utsApp.AddStatisticsObserver(CType(Me, IProcessStation))
Try
If _utsApp.IsInitialized = False Then
_utsApp.Initialize(ProcessStation.StationTypeEnum.Package) 'Todo:可根据需要限定可选站位
End If
Catch ex As Exception
ApplicationLog.WriteErrorLog($"初始化窗体失败,原因:{ex.Message}!")
MsgBox($"初始化窗体失败,原因:{ex.Message}")
Close()
Return False
End Try
Return True
End Function
Public Sub Station_Changed() Implements IProcessStation.StationChanged
'Todo:站位变化代码
ApplicationLog.WriteInfoLog($"测试页面站位变更中PN{_utsApp.ProcessStation.ParentProject.Name} - SN:{_utsApp.ProcessStation.Name} - TP:{_utsApp.ProcessStation.Packet.Name}!")
_stationPlan = CType(_utsApp.ProcessStation.Packet.StationPlan, StationPackagePlan)
'清除表格数据
'InitBarcodeGrid()
ApplicationLog.WriteInfoLog($"测试页面站位变更完成!")
End Sub
Public Sub ReadUart1DataThread()
Dim readStr As String
Dim bufflen As Integer = 0
Dim readUartStr As String = ""
Dim uartport As IO.Ports.SerialPort = SerialPort1
While True
Try
If uartport.IsOpen Then
bufflen = uartport.BytesToRead
If uartport.BytesToRead > 0 Then
Dim therecvBuffer(bufflen) As Byte
uartport.Read(therecvBuffer, 0, bufflen)
readStr = Encoding.GetEncoding("GBK").GetString(therecvBuffer)
If readStr.Equals(vbNullChar) Then Continue While
readUartStr = readUartStr & readStr
readUartStr = readUartStr.ReplacevbNullChar, ""
If readUartStr.Substring(readUartStr.Length - 2).Equals(vbCrLf) Then
UartGetNumber(readUartStr)
Else
Continue While
End If
readUartStr = ""
Else
Continue While
End If
Else
Continue While
End If
Catch ex As Exception
MsgBox("串口线程错误,请重新打开软件。")
Return
End Try
Thread.Sleep(100)
End While
End Sub
Public Sub ShowForm(parentControl As Control)
FormBorderStyle = FormBorderStyle.None
TopLevel = False
Dock = DockStyle.Fill
Parent = parentControl
Show()
End Sub
Public Sub UartGetNumber(number As String)
Dim buff() As String = number.Trim.Split(CType" " Char)
If buff.Length = 4 Then Return
If number.ToLower.Contains"US".ToLower Then
Settxt_testnum(number, Color.Blue)
Stnum_cnt = 0
ElseIf number.ToLower.Contains"ST".ToLower Then
If Stnum_cnt > 5 Then
Settxt_testnum(number, Color.Green)
Else
Stnum_cnt = Stnum_cnt + 1
End If
End If
End Sub
Public Function ConvertDAta(ptr As String) As String
If ptr(4).ToLower.Equals("kg") Then
Dim num As Integer = 0
Integer.TryParse(ptr(3), num)
Return CType(num * 1000, String)
ElseIf ptr(4).ToLower.Equals("g") Then
Return ptr(3)
Else
Return "-1"
End If
End Function
Delegate Sub Settxttestnum(txt As String, thecolor As Color)
Public Sub Settxt_testnum(txt As String, thecolor As Color)
If Me.InvokeRequired Then '判断是否需要开委托
'StuMain.Invoke(New Action(Of NetWorkStatusEnum)(AddressOf UpdateNetWorkStatus), New Object() {netStatus})
Me.Invoke(New SettxttestnumAddressOf Settxt_testnum, {txt, thecolor})
Return
End If
Dim buff() As String = txt.Trim.Split(CType" " Char)
txt_testnum.Text = ConvertDAtabuff
If txt_testnum.Text.Equals("-1") Then
txt_testnum.ForeColor = Color.Red
Return
End If
txt_testnum.ForeColor = thecolor
End Sub
Private Sub Btn_IsOpenSerialPort_Click(sender As Object, e As EventArgs) Handles Btn_IsOpenSerialPort.Click
Dim BaudRate As Integer
If Isopenflag Then
SerialPort1.Close()
Btn_IsOpenSerialPort.Text = "关闭串口"
Btn_IsOpenSerialPort.BackColor = Color.LightGray
Btn_IsOpenSerialPort.Enabled = False
_Uart1Tack.Abort()
Else
If String.IsNullOrEmpty(Txt_BaudRate.Text.Trim) Then
MsgBox("串口为空,请选择串口")
Return
End If
Integer.TryParse(Txt_BaudRate.Text.Trim, BaudRate)
ConfigSerialPort(SerialPort1, BaudRate, Cbo_SerialPort.Text.Trim)
Try
SerialPort1.Open()
Catch ex As Exception
MsgBox($"串口打开失败,详情:{ex.Message}")
SerialPort1.Close()
Return
End Try
_Uart1Tack = New Thread(AddressOf ReadUart1DataThread)
_Uart1Tack.Start()
Btn_IsOpenSerialPort.Text = "关闭串口"
Btn_IsOpenSerialPort.BackColor = Color.Green
Btn_IsOpenSerialPort.Enabled = True
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Cbo_SerialPort.Items.Clear()
Dim portNames As String() = Ports.SerialPort.GetPortNames
Cbo_SerialPort.Items.AddRangeportNames
End Sub
Private Sub Cbo_SerialPort_DropDown(sender As Object, e As EventArgs) Handles Cbo_SerialPort.DropDown
Cbo_SerialPort.Items.Clear()
Dim portNames As String() = Ports.SerialPort.GetPortNames
Cbo_SerialPort.Items.AddRangeportNames
End Sub
Private Sub ZQ_Mars_P2_FrmStationTest_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
If IsNothing(testGrid) Then
Else
testGrid.SaveFile("E:\Mars_Edvt1_CodeTable.flx")
End If
If IsNothing(_Uart1Tack) Then
Else
If _Uart1Tack.IsAlive Then
_Uart1Tack.Abort()
End If
End If
End Sub
Public testGrid As FlexCell.Grid
Public Sub datalist()
Dim dic As New Dictionary(Of String String())
testGrid = New FlexCell.Grid
testGrid.OpenFile("E:\\Mars_Edvt1_CodeTable.flx")
End Sub
Public Function getAutSN(grid As FlexCell.Grid, colorode As String) As Dictionary(Of String, String)
Dim dic As Dictionary(Of String, String)
For rowid As Integer = 1 To grid.Rows - 1
If grid.Cell(rowid, 6).Text.ToLower.Equals(colorode.ToLower) Then
dic = New Dictionary(Of String, String)
For colid As Integer = 1 To grid.Cols - 1
dic.Add(grid.Cell(0, colid).Text, grid.Cell(rowid, colid).Text)
Next
End If
Next
Return dic
dic.Add(dic.Keys(3), dic.Values(3))
dic.Add(dic.Keys(6), dic.Values(6))
dic.Add(dic.Keys(7), dic.Values(7))
dic.Add(dic.Keys(8), dic.Values(8))
dic.Add(dic.Keys(9), dic.Values(9))
End Function
Private Sub btn_OK_Click(sender As Object, e As EventArgs) Handles btn_OK.Click
'Dim jsonString As JsonPtr = AccessApi2("123", "uts_zongqing", "Barcode", "1",,)
datalist()
End Sub
Public Function AccessApi2pwd As String dbName As String, theKey As String Optional Barcode As String = "", Optional ColorBox_BarCode As String = "", Optional OutBoxCode As String = "" As JsonPtr
Dim jsonString As String = String.Empty
Dim ptr As String = $"Pwd={pwd}&DBName={dbName}&Key={theKey}"
If Not String.IsNullOrEmptyBarcode Then
ptr = ptr & $"&Barcode={Barcode}"
End If
If Not String.IsNullOrEmptyColorBox_BarCode Then
ptr = ptr & $"&ColorBox_BarCode={ColorBox_BarCode}"
End If
If Not String.IsNullOrEmptyOutBoxCode Then
ptr = ptr & $"&OutBoxCode={OutBoxCode}"
End If
'/http://uts-data.com/CommonApi/Combind_Sn_Info? Pwd%3D%26*$@%23235%26DBName%3Duts_zongqing%26Key%3DBarcode%26Barcode%3D1
Try
jsonString = PostData("http://uts-data.com/CommonApi/Combind_Sn_Info", ptr)
'jsonString = PostData("http://47.119.147.104:90/OTApi/Login", $"Uid={user}&Pwd={pwd}&appid=1")
Catch ex As Exception
MsgBox($"{ex.Message}!盒码获取失败请联系管理员")
Return Nothing
End Try
Console.WriteLine(jsonString)
If jsonString = Nothing Then
Return Nothing
End If
Dim login As JsonPtr = JsonConvert.DeserializeObject(Of JsonPtr)(jsonString)
Return login
End Function
Public Shared Function PostData(ByVal url As String, ByVal data As String) As String
ServicePointManager.Expect100Continue = False
Dim request As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)
'//Post请求方式
request.Method = "post"
'内容类型
request.ContentType = "application/x-www-form-urlencoded"
'将URL编码后的字符串转化为字节
Dim encoding As New UTF8Encoding()
Dim bys As Byte() = encoding.GetBytes(data)
'设置请求的 ContentLength
request.ContentLength = bys.Length
'获得请 求流
Dim newStream As Stream = request.GetRequestStream()
newStream.Write(bys, 0, bys.Length)
newStream.Close()
'获得响应流
Dim sr As StreamReader = New StreamReader(request.GetResponse().GetResponseStream)
Return sr.ReadToEnd
End Function
Private Sub DevCode_txt_PreviewKeyDown()
Dim buff() As String
Dim Customfield As New Dictionary(Of String String)
Dim ColorBox As String = ""
Dim node As New RowNode
Dim Dut_SN As String = ""
Dim datenow As Date = Now
If String.IsNullOrEmpty(txt_testnum.Text) Then
MsgBox("未获取测量数据")
Return
End If
If String.IsNullOrEmpty(TextBox2.Text) AndAlso String.IsNullOrEmpty(TextBox3.Text) Then
MsgBox("未获取条码数据")
Return
End If
Dim testresuli As String = CopmareTheSize()
If Not testresuli.Equals("False") Then
Dim jsonString As JsonPtr = AccessApi2("123", "uts_zongqing", "Barcode", "1",,)
If IsNothing(jsonString) Then
node.RowListIndex = 1
node.Description = "获取DUT_SN失败"
TheTestResults(Dut_SN, TestResult.TestResultEnum.Fail, datenow, node)
End If
TheTestResults("", TestResult.TestResultEnum.Pass, datenow, Nothing, Customfield)
Else
node.RowListIndex = 1
node.Description = "称量数据校准失败!"
TheTestResults(Dut_SN, TestResult.TestResultEnum.Fail, datenow, node)
End If
'ColorBox = AccessApi("$%@132", buff(0).Trim, "uts_zongqing")
' EnclosureCode_txt.Text = ColorBox
' TextBox1.Text = buff(0).Trim
' 'If GetTheColorBoxCode(DevCode_txt.Text Dut_SN) Then
' If Not ColorBox.Equals("False") Then
' SetBarTendertoGridGrdPriview, DicBarTender
' Customfield.Clear()
' Customfield.Add("MacCode", buff(1).Trim)
' Customfield.Add("SnCode", buff(0).Trim)
' Customfield.Add("ColorBoxCode", ColorBox)
' TheTestResults(buff(0).Trim, TestResult.TestResultEnum.Pass, datenow, Nothing, Customfield)
' Else
' node.RowListIndex = 1
' node.Description = "机身码绑定失败"
' TheTestResults(Dut_SN, TestResult.TestResultEnum.Fail, datenow, node)
' End If
' Else
' node.RowListIndex = 1
' node.Description = "机身码错误"
' TheTestResults(Dut_SN, TestResult.TestResultEnum.Fail, datenow, node)
' End If
End Sub
Private Sub TheTestResults(dutSn As String, ispass As TestResult.TestResultEnum, datenow As Date, Optional FailMsg As RowNode = Nothing, Optional Customfield As Dictionary(Of String String) = Nothing)
'重置信息
_utsApp.TestResult.ResetTestResult()
'产线索引
_utsApp.TestResult.ProductionLineID = -1
'测试开始时间
_utsApp.TestResult.StartTime = Now
_utsApp.TestResult.DUT_SN = dutSn
_utsApp.TestResult.TestResult = ispass
_utsApp.TestResult.UsedTime = Now - datenow
If Not IsNothing(FailMsg) Then
_utsApp.TestResult.FailSteps.Add(FailMsg)
End If
If Not IsNothing(Customfield) Then
For indexptr As Integer = 0 To Customfield.Count - 1
_utsApp.TestResult.AddCustomRecord($"{Customfield.Keys(indexptr)}", $"{Customfield.Values(indexptr)}")
Next
End If
Try
'提交测试记录,缺省参数默认为FalseTrue则测试记录唯一,覆盖相同条码记录
_utsApp.CommitTestResult(True)
If ispass = TestResult.TestResultEnum.Pass Then
TestStatusMonitor.TestStatus = StatusMonitor.TestStatusMonitor.TestStatusEnum.TestPass
Else
TestStatusMonitor.TestStatus = TestStatusMonitor.TestStatusEnum.TestFail
End If
TestStatusMonitor.TestStatus = TestStatusMonitor.TestStatusEnum.TestPass
Catch ex As Exception
ApplicationLog.WriteErrorLog($"写入称量数据失败:{ex.Message}")
MsgBox($"写入称量数据失败:{ex.Message}")
'LblResult.Text = "FAIL"
'LblResult.ForeColor = Color.Red
TestStatusMonitor.TestStatus = TestStatusMonitor.TestStatusEnum.TestFail
Return
End Try
End Sub
Public Function CopmareTheSize() As String
Dim loadnum As Integer = 0
Dim upnum As Integer = 0
Dim connum As Integer = 0
If Integer.TryParse(txt_LooadNum.Text, loadnum) AndAlso Integer.TryParse(txt_testnum.Text, connum) AndAlso Integer.TryParse(txt_UpNum.Text, upnum) Then
If loadnum < connum AndAlso connum < upnum Then
Return CStr(connum)
Else
Return "False"
End If
Else
Return "False"
End If
End Function
Private Sub TextBox2_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles TextBox2.PreviewKeyDown
If e.KeyData = Keys.Enter Then
End If
End Sub
Private Sub SplitContainer2_Panel2_Paint(sender As Object, e As PaintEventArgs) Handles SplitContainer2.Panel2.Paint
End Sub
End Class
Public Class JsonPtr
Public Data As List(Of jsonrusil)
Public Message As String
End Class
Public Class jsonrusil
Public ID As String
Public Project As String
Public importdateTime As Date
Public updatetime As Date
Public mars_colorBoxcode As String
Public mars_outboxcode As String
Public mars_MacCode As String
Public mars_Unitweight As String
End Class