初始化提交

仓库转移到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,428 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class ZQ_Mars_P1_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.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ZQ_Mars_P1_FrmStationPlan))
Me.ToolStripSeparator7 = New System.Windows.Forms.ToolStripSeparator()
Me.TsmiDebugEnd = New System.Windows.Forms.ToolStripMenuItem()
Me.TsmiDebugStep = New System.Windows.Forms.ToolStripMenuItem()
Me.TsmiDebugContinue = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator8 = New System.Windows.Forms.ToolStripSeparator()
Me.TsmiDebugSetup = New System.Windows.Forms.ToolStripMenuItem()
Me.TsmiDebugMain = New System.Windows.Forms.ToolStripMenuItem()
Me.TsmiDebugPass = New System.Windows.Forms.ToolStripMenuItem()
Me.TsmiDebugFail = New System.Windows.Forms.ToolStripMenuItem()
Me.TsmiDebugCleanup = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator9 = New System.Windows.Forms.ToolStripSeparator()
Me.TsmiDebugNode = New System.Windows.Forms.ToolStripMenuItem()
Me.TsmiDebugNodeBegin = New System.Windows.Forms.ToolStripMenuItem()
Me.DlgOpenFile = New System.Windows.Forms.OpenFileDialog()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
Me.LblDesc = New System.Windows.Forms.Label()
Me.GrdStationPlan = New FlexCell.Grid()
Me.CmsPlanGrid = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.MsiCopyNode = New System.Windows.Forms.ToolStripMenuItem()
Me.MsiCutNode = New System.Windows.Forms.ToolStripMenuItem()
Me.MsiNodePaste = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator5 = New System.Windows.Forms.ToolStripSeparator()
Me.MsiUndo = New System.Windows.Forms.ToolStripMenuItem()
Me.MsiRedo = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator()
Me.MsiSaveNodeFile = New System.Windows.Forms.ToolStripMenuItem()
Me.MsiLoadNodeFile = New System.Windows.Forms.ToolStripMenuItem()
Me.TsmiDebugStart = New System.Windows.Forms.ToolStripMenuItem()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.TsBtnOpen = New System.Windows.Forms.ToolStripButton()
Me.TsBtnSave = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator4 = New System.Windows.Forms.ToolStripSeparator()
Me.TsBtnLoad = New System.Windows.Forms.ToolStripButton()
Me.TsBtnSaveAs = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator3 = New System.Windows.Forms.ToolStripSeparator()
Me.StuMain = New System.Windows.Forms.StatusStrip()
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
CType(Me.SplitContainer1,System.ComponentModel.ISupportInitialize).BeginInit
Me.SplitContainer1.Panel1.SuspendLayout
Me.SplitContainer1.Panel2.SuspendLayout
Me.SplitContainer1.SuspendLayout
Me.GroupBox2.SuspendLayout
Me.CmsPlanGrid.SuspendLayout
Me.ToolStrip1.SuspendLayout
Me.SuspendLayout
'
'ToolStripSeparator7
'
Me.ToolStripSeparator7.Name = "ToolStripSeparator7"
Me.ToolStripSeparator7.Size = New System.Drawing.Size(189, 6)
'
'TsmiDebugEnd
'
Me.TsmiDebugEnd.Name = "TsmiDebugEnd"
Me.TsmiDebugEnd.ShortcutKeys = System.Windows.Forms.Keys.F2
Me.TsmiDebugEnd.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugEnd.Text = "退出执行"
'
'TsmiDebugStep
'
Me.TsmiDebugStep.Name = "TsmiDebugStep"
Me.TsmiDebugStep.ShortcutKeys = System.Windows.Forms.Keys.F3
Me.TsmiDebugStep.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugStep.Text = "单步执行"
'
'TsmiDebugContinue
'
Me.TsmiDebugContinue.Name = "TsmiDebugContinue"
Me.TsmiDebugContinue.ShortcutKeys = System.Windows.Forms.Keys.F4
Me.TsmiDebugContinue.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugContinue.Text = "继续执行"
'
'ToolStripSeparator8
'
Me.ToolStripSeparator8.Name = "ToolStripSeparator8"
Me.ToolStripSeparator8.Size = New System.Drawing.Size(189, 6)
'
'TsmiDebugSetup
'
Me.TsmiDebugSetup.Name = "TsmiDebugSetup"
Me.TsmiDebugSetup.ShortcutKeys = System.Windows.Forms.Keys.F5
Me.TsmiDebugSetup.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugSetup.Text = "Setup模块执行"
'
'TsmiDebugMain
'
Me.TsmiDebugMain.Name = "TsmiDebugMain"
Me.TsmiDebugMain.ShortcutKeys = System.Windows.Forms.Keys.F6
Me.TsmiDebugMain.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugMain.Text = "Main模块执行"
'
'TsmiDebugPass
'
Me.TsmiDebugPass.Name = "TsmiDebugPass"
Me.TsmiDebugPass.ShortcutKeys = System.Windows.Forms.Keys.F7
Me.TsmiDebugPass.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugPass.Text = "Pass模块执行"
'
'TsmiDebugFail
'
Me.TsmiDebugFail.Name = "TsmiDebugFail"
Me.TsmiDebugFail.ShortcutKeys = System.Windows.Forms.Keys.F8
Me.TsmiDebugFail.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugFail.Text = "Fail模块执行"
'
'TsmiDebugCleanup
'
Me.TsmiDebugCleanup.Name = "TsmiDebugCleanup"
Me.TsmiDebugCleanup.ShortcutKeys = System.Windows.Forms.Keys.F9
Me.TsmiDebugCleanup.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugCleanup.Text = "Cleanup模块执行"
'
'ToolStripSeparator9
'
Me.ToolStripSeparator9.Name = "ToolStripSeparator9"
Me.ToolStripSeparator9.Size = New System.Drawing.Size(189, 6)
'
'TsmiDebugNode
'
Me.TsmiDebugNode.Name = "TsmiDebugNode"
Me.TsmiDebugNode.ShortcutKeys = System.Windows.Forms.Keys.F10
Me.TsmiDebugNode.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugNode.Text = "节点测试"
'
'TsmiDebugNodeBegin
'
Me.TsmiDebugNodeBegin.Name = "TsmiDebugNodeBegin"
Me.TsmiDebugNodeBegin.ShortcutKeys = System.Windows.Forms.Keys.F11
Me.TsmiDebugNodeBegin.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugNodeBegin.Text = "节点开始测试"
'
'DlgOpenFile
'
Me.DlgOpenFile.FileName = "OpenFileDialog1"
'
'SplitContainer1
'
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainer1.Location = New System.Drawing.Point(0, 36)
Me.SplitContainer1.Name = "SplitContainer1"
'
'SplitContainer1.Panel1
'
Me.SplitContainer1.Panel1.Controls.Add(Me.GroupBox2)
'
'SplitContainer1.Panel2
'
Me.SplitContainer1.Panel2.Controls.Add(Me.GroupBox1)
Me.SplitContainer1.Size = New System.Drawing.Size(800, 392)
Me.SplitContainer1.SplitterDistance = 361
Me.SplitContainer1.TabIndex = 6
'
'GroupBox2
'
Me.GroupBox2.Controls.Add(Me.LblDesc)
Me.GroupBox2.Controls.Add(Me.GrdStationPlan)
Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Fill
Me.GroupBox2.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.GroupBox2.Location = New System.Drawing.Point(0, 0)
Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(361, 392)
Me.GroupBox2.TabIndex = 0
Me.GroupBox2.TabStop = false
Me.GroupBox2.Text = "流程参数"
'
'LblDesc
'
Me.LblDesc.Dock = System.Windows.Forms.DockStyle.Bottom
Me.LblDesc.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.LblDesc.Location = New System.Drawing.Point(3, 328)
Me.LblDesc.Name = "LblDesc"
Me.LblDesc.Size = New System.Drawing.Size(355, 61)
Me.LblDesc.TabIndex = 6
'
'GrdStationPlan
'
Me.GrdStationPlan.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
Me.GrdStationPlan.BorderStyle = FlexCell.BorderStyleEnum.None
Me.GrdStationPlan.CheckedImage = Nothing
Me.GrdStationPlan.ContextMenuStrip = Me.CmsPlanGrid
Me.GrdStationPlan.DefaultFont = New System.Drawing.Font("宋体", 9!)
Me.GrdStationPlan.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.GrdStationPlan.GridColor = System.Drawing.Color.FromArgb(CType(CType(192,Byte),Integer), CType(CType(192,Byte),Integer), CType(CType(192,Byte),Integer))
Me.GrdStationPlan.Location = New System.Drawing.Point(0, 24)
Me.GrdStationPlan.Name = "GrdStationPlan"
Me.GrdStationPlan.Size = New System.Drawing.Size(358, 301)
Me.GrdStationPlan.TabIndex = 4
Me.GrdStationPlan.UncheckedImage = Nothing
'
'CmsPlanGrid
'
Me.CmsPlanGrid.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MsiCopyNode, Me.MsiCutNode, Me.MsiNodePaste, Me.ToolStripSeparator5, Me.MsiUndo, Me.MsiRedo, Me.ToolStripSeparator6, Me.MsiSaveNodeFile, Me.MsiLoadNodeFile, Me.ToolStripSeparator7, Me.TsmiDebugStart, Me.TsmiDebugEnd, Me.TsmiDebugStep, Me.TsmiDebugContinue, Me.ToolStripSeparator8, Me.TsmiDebugSetup, Me.TsmiDebugMain, Me.TsmiDebugPass, Me.TsmiDebugFail, Me.TsmiDebugCleanup, Me.ToolStripSeparator9, Me.TsmiDebugNode, Me.TsmiDebugNodeBegin})
Me.CmsPlanGrid.Name = "CmsMain"
Me.CmsPlanGrid.Size = New System.Drawing.Size(193, 430)
'
'MsiCopyNode
'
Me.MsiCopyNode.Enabled = false
Me.MsiCopyNode.Name = "MsiCopyNode"
Me.MsiCopyNode.Size = New System.Drawing.Size(192, 22)
Me.MsiCopyNode.Text = "复制"
'
'MsiCutNode
'
Me.MsiCutNode.Enabled = false
Me.MsiCutNode.Name = "MsiCutNode"
Me.MsiCutNode.Size = New System.Drawing.Size(192, 22)
Me.MsiCutNode.Text = "剪切"
'
'MsiNodePaste
'
Me.MsiNodePaste.Enabled = false
Me.MsiNodePaste.Name = "MsiNodePaste"
Me.MsiNodePaste.Size = New System.Drawing.Size(192, 22)
Me.MsiNodePaste.Text = "粘贴"
'
'ToolStripSeparator5
'
Me.ToolStripSeparator5.Name = "ToolStripSeparator5"
Me.ToolStripSeparator5.Size = New System.Drawing.Size(189, 6)
'
'MsiUndo
'
Me.MsiUndo.Enabled = false
Me.MsiUndo.Name = "MsiUndo"
Me.MsiUndo.Size = New System.Drawing.Size(192, 22)
Me.MsiUndo.Text = "撤销"
'
'MsiRedo
'
Me.MsiRedo.Enabled = false
Me.MsiRedo.Name = "MsiRedo"
Me.MsiRedo.Size = New System.Drawing.Size(192, 22)
Me.MsiRedo.Text = "重做"
'
'ToolStripSeparator6
'
Me.ToolStripSeparator6.Name = "ToolStripSeparator6"
Me.ToolStripSeparator6.Size = New System.Drawing.Size(189, 6)
'
'MsiSaveNodeFile
'
Me.MsiSaveNodeFile.Name = "MsiSaveNodeFile"
Me.MsiSaveNodeFile.Size = New System.Drawing.Size(192, 22)
Me.MsiSaveNodeFile.Text = "另存为节点文件"
'
'MsiLoadNodeFile
'
Me.MsiLoadNodeFile.Name = "MsiLoadNodeFile"
Me.MsiLoadNodeFile.Size = New System.Drawing.Size(192, 22)
Me.MsiLoadNodeFile.Text = "加载节点文件"
'
'TsmiDebugStart
'
Me.TsmiDebugStart.Name = "TsmiDebugStart"
Me.TsmiDebugStart.ShortcutKeys = System.Windows.Forms.Keys.F1
Me.TsmiDebugStart.Size = New System.Drawing.Size(192, 22)
Me.TsmiDebugStart.Text = "开始执行"
'
'GroupBox1
'
Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Fill
Me.GroupBox1.Font = New System.Drawing.Font("微软雅黑", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(435, 392)
Me.GroupBox1.TabIndex = 0
Me.GroupBox1.TabStop = false
Me.GroupBox1.Text = "常规预览"
'
'TsBtnOpen
'
Me.TsBtnOpen.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.TsBtnOpen.Image = CType(resources.GetObject("TsBtnOpen.Image"),System.Drawing.Image)
Me.TsBtnOpen.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TsBtnOpen.Name = "TsBtnOpen"
Me.TsBtnOpen.Size = New System.Drawing.Size(35, 33)
Me.TsBtnOpen.Text = "打开"
Me.TsBtnOpen.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
'
'TsBtnSave
'
Me.TsBtnSave.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.TsBtnSave.Image = CType(resources.GetObject("TsBtnSave.Image"),System.Drawing.Image)
Me.TsBtnSave.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TsBtnSave.Name = "TsBtnSave"
Me.TsBtnSave.Size = New System.Drawing.Size(35, 33)
Me.TsBtnSave.Text = "保存"
Me.TsBtnSave.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
'
'ToolStripSeparator4
'
Me.ToolStripSeparator4.Name = "ToolStripSeparator4"
Me.ToolStripSeparator4.Size = New System.Drawing.Size(6, 36)
'
'TsBtnLoad
'
Me.TsBtnLoad.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.TsBtnLoad.Image = CType(resources.GetObject("TsBtnLoad.Image"),System.Drawing.Image)
Me.TsBtnLoad.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TsBtnLoad.Name = "TsBtnLoad"
Me.TsBtnLoad.Size = New System.Drawing.Size(35, 33)
Me.TsBtnLoad.Text = "重载"
Me.TsBtnLoad.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
'
'TsBtnSaveAs
'
Me.TsBtnSaveAs.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
Me.TsBtnSaveAs.Image = CType(resources.GetObject("TsBtnSaveAs.Image"),System.Drawing.Image)
Me.TsBtnSaveAs.ImageTransparentColor = System.Drawing.Color.Magenta
Me.TsBtnSaveAs.Name = "TsBtnSaveAs"
Me.TsBtnSaveAs.Size = New System.Drawing.Size(35, 33)
Me.TsBtnSaveAs.Text = "导出"
Me.TsBtnSaveAs.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
'
'ToolStripSeparator3
'
Me.ToolStripSeparator3.Name = "ToolStripSeparator3"
Me.ToolStripSeparator3.Size = New System.Drawing.Size(6, 36)
'
'StuMain
'
Me.StuMain.Location = New System.Drawing.Point(0, 428)
Me.StuMain.Name = "StuMain"
Me.StuMain.Size = New System.Drawing.Size(800, 22)
Me.StuMain.TabIndex = 5
Me.StuMain.Text = "StatusStrip1"
'
'ToolStrip1
'
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsBtnOpen, Me.TsBtnSave, Me.ToolStripSeparator4, Me.TsBtnLoad, Me.TsBtnSaveAs, Me.ToolStripSeparator3})
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip1.Name = "ToolStrip1"
Me.ToolStrip1.Size = New System.Drawing.Size(800, 36)
Me.ToolStrip1.TabIndex = 4
Me.ToolStrip1.Text = "ToolStrip1"
'
'ZQ_Mars_P1_FrmStationPlan
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 12!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(800, 450)
Me.Controls.Add(Me.SplitContainer1)
Me.Controls.Add(Me.StuMain)
Me.Controls.Add(Me.ToolStrip1)
Me.Name = "ZQ_Mars_P1_FrmStationPlan"
Me.Text = "ZQ_Mars_P1_FrmStationPlan"
Me.SplitContainer1.Panel1.ResumeLayout(false)
Me.SplitContainer1.Panel2.ResumeLayout(false)
CType(Me.SplitContainer1,System.ComponentModel.ISupportInitialize).EndInit
Me.SplitContainer1.ResumeLayout(false)
Me.GroupBox2.ResumeLayout(false)
Me.CmsPlanGrid.ResumeLayout(false)
Me.ToolStrip1.ResumeLayout(false)
Me.ToolStrip1.PerformLayout
Me.ResumeLayout(false)
Me.PerformLayout
End Sub
Friend WithEvents ToolStripSeparator7 As ToolStripSeparator
Friend WithEvents TsmiDebugEnd As ToolStripMenuItem
Friend WithEvents TsmiDebugStep As ToolStripMenuItem
Friend WithEvents TsmiDebugContinue As ToolStripMenuItem
Friend WithEvents ToolStripSeparator8 As ToolStripSeparator
Friend WithEvents TsmiDebugSetup As ToolStripMenuItem
Friend WithEvents TsmiDebugMain As ToolStripMenuItem
Friend WithEvents TsmiDebugPass As ToolStripMenuItem
Friend WithEvents TsmiDebugFail As ToolStripMenuItem
Friend WithEvents TsmiDebugCleanup As ToolStripMenuItem
Friend WithEvents ToolStripSeparator9 As ToolStripSeparator
Friend WithEvents TsmiDebugNode As ToolStripMenuItem
Friend WithEvents TsmiDebugNodeBegin As ToolStripMenuItem
Friend WithEvents DlgOpenFile As OpenFileDialog
Friend WithEvents SplitContainer1 As SplitContainer
Friend WithEvents GroupBox2 As GroupBox
Friend WithEvents LblDesc As Label
Friend WithEvents GrdStationPlan As FlexCell.Grid
Friend WithEvents CmsPlanGrid As ContextMenuStrip
Friend WithEvents MsiCopyNode As ToolStripMenuItem
Friend WithEvents MsiCutNode As ToolStripMenuItem
Friend WithEvents MsiNodePaste As ToolStripMenuItem
Friend WithEvents ToolStripSeparator5 As ToolStripSeparator
Friend WithEvents MsiUndo As ToolStripMenuItem
Friend WithEvents MsiRedo As ToolStripMenuItem
Friend WithEvents ToolStripSeparator6 As ToolStripSeparator
Friend WithEvents MsiSaveNodeFile As ToolStripMenuItem
Friend WithEvents MsiLoadNodeFile As ToolStripMenuItem
Friend WithEvents TsmiDebugStart As ToolStripMenuItem
Friend WithEvents GroupBox1 As GroupBox
Friend WithEvents TsBtnOpen As ToolStripButton
Friend WithEvents TsBtnSave As ToolStripButton
Friend WithEvents ToolStripSeparator4 As ToolStripSeparator
Friend WithEvents TsBtnLoad As ToolStripButton
Friend WithEvents TsBtnSaveAs As ToolStripButton
Friend WithEvents ToolStripSeparator3 As ToolStripSeparator
Friend WithEvents StuMain As StatusStrip
Friend WithEvents ToolStrip1 As ToolStrip
End Class

View File

@@ -0,0 +1,185 @@
<?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="DlgOpenFile.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>482, 17</value>
</metadata>
<metadata name="CmsPlanGrid.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>607, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="TsBtnOpen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVGhD1ZnLSgRBFEMbFN3rUv03H1v160T/wDfot+jo
VhNk4FqUk77dqRrnQGAgnZt+TS26hhnsQpfQPbSAvsziTM6+gNhl5QB6hWrFLfQCsdMC70bPk1+KF2F5
EnxtagU9dA7N5gGKQ68g2+MNHELXUOy6g2bzDsWhLGrFERS73qDZxIFUa+x99oGCyX1b0OnPz19MHjiR
SX370DNUC0waOIN03za0PPlaIA6r+W7SfWfQqkD0ar6bdN8TtCoQvZrvJt33Ca0KRK/mu0n3qYDy3aT7
VED5btJ9KqB8N+k+FVC+m3SfCijfTbpPBZTvJt2nAsp3k+5TAeW7SfepgPLdpPtUQPlu0n0qoHw36T4V
UL6bdJ8KKN9Nuk8FlO8m3acCyneT7lMB5btJ96mA8t2k+1RA+W7SfSqgfDfpPhVQvpt0nwr8+4+7MUCV
lJ/X+Qm8xUXw5G+g2DXq83oMUCXcsyqP6aVRGxxlqITbPNzuKY9rLXbuQJIyWIM7Mj0vIrXJV4b/gneD
j5TvZfnHdogzbyF2jLrzS8pBG8fGX0DPdb4Jvdb5ZqxznT+BZrOudf4R4saihd7rPE9+D7LSep3/gPh/
O4a4sTiBYfgGl13a4+npcwkAAAAASUVORK5CYII=
</value>
</data>
<data name="TsBtnSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHqSURBVGhD7Zm9Tt1AEEYvNDxCArwSXZDSpAwiFQ+HEA2Q
dPmpeAl4AaALEnxTXDSate/xeHcvkeIjnerzN97F9rWEVwsLC6PsyFP5Rz7Jl07ey0+yKQfyuxw6YQ//
ys+yCbvyhxw6UU+f5RdZzTc5dIJt2ORK2D3vh17ID3KNz8wabLG2aD+vehOP0g/8KD0+M2tpvgk/yIxQ
PodjGTcx+5nwQ8wI5XNptgk/wIxQXkOTTfiyGaG8lupN+KIZiflc7Q18JIcYe7AnvbF9yYzEvMY7OcbQ
JjYd/4YvmBEbEo+ZKy3INhE7CBXsstvlj8dl3XQLeWIPSRc6k15PutCZ9HrShc6k15MudCa9nnShM+n1
pAudSa+HCq1+RqNjP6vxOIQKLV9k0aEXWzwGoULMWxuhvIAKMW9thPICKlCeheZRXkAFyrPQPMoLqEB5
FppHeQEVKM9C8ygvoALlWWge5QVUoDwLzaO8gAqUZ6F5lBdQgfIsNI/yAipQnoXmUV5ABcqz0DzKCx6k
L/j/TBs+M2vZNM8+tPjM1ob8lr50LvflGp+ZtYzNs3NeSp/9ksiZ9KV/ya8S2ZO3cmjAe3ol7cPjJA7l
jRwa9B5eS38bT8J2eyJ/yvjVZhvaA2vntttm8l9+YeH/YrV6BfNWMy9RUhK1AAAAAElFTkSuQmCC
</value>
</data>
<data name="TsBtnLoad.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVGhD1ZnLSgRBFEMbFN3rUv03H1v160T/wDfot+jo
VhNk4FqUk77dqRrnQGAgnZt+TS26hhnsQpfQPbSAvsziTM6+gNhl5QB6hWrFLfQCsdMC70bPk1+KF2F5
EnxtagU9dA7N5gGKQ68g2+MNHELXUOy6g2bzDsWhLGrFERS73qDZxIFUa+x99oGCyX1b0OnPz19MHjiR
SX370DNUC0waOIN03za0PPlaIA6r+W7SfWfQqkD0ar6bdN8TtCoQvZrvJt33Ca0KRK/mu0n3qYDy3aT7
VED5btJ9KqB8N+k+FVC+m3SfCijfTbpPBZTvJt2nAsp3k+5TAeW7SfepgPLdpPtUQPlu0n0qoHw36T4V
UL6bdJ8KKN9Nuk8FlO8m3acCyneT7lMB5btJ96mA8t2k+1RA+W7SfSqgfDfpPhVQvpt0nwr8+4+7MUCV
lJ/X+Qm8xUXw5G+g2DXq83oMUCXcsyqP6aVRGxxlqITbPNzuKY9rLXbuQJIyWIM7Mj0vIrXJV4b/gneD
j5TvZfnHdogzbyF2jLrzS8pBG8fGX0DPdb4Jvdb5ZqxznT+BZrOudf4R4saihd7rPE9+D7LSep3/gPh/
O4a4sTiBYfgGl13a4+npcwkAAAAASUVORK5CYII=
</value>
</data>
<data name="TsBtnSaveAs.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADQSURBVEhL5ZYxDgFBGEbnCE4gjuAcCnEER3AER9BpVWqV
QqcTlSOIUkVFx/fWSMYsyfx/FCu+5CX7ZWfmTbKT3Q1J+mLnYCmKMhQ3sRKLQg5iL4ryFHSqVpaZ+H3B
UQwy2qIWr4A5OaxVi0fATrsJPfFVQR7m/pGA42eBmARc8yrgpMxj38aewhjuEbNg/LgMLUEfVe01jGmu
4CpO4hz7JfYUxrgFGzER09jXsacwxi34/WdggZgE7MwCMQk8aYbA8tHPYe5Hgfe35R2spYRwB61XwcSY
NxMjAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="StuMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 55</value>
</metadata>
<metadata name="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 55</value>
</metadata>
</root>

View File

@@ -0,0 +1,494 @@
Imports UTS_Core.DebugLog
Imports UTS_Core.UTSModule
Imports UTS_Core.UTSModule.Station
Imports UTS_Core.UTSModule.Station.StationPackagePlan
Imports UTS_Core.UTSModule.Test.StatusMonitor
Public Class ZQ_Mars_P1_FrmStationPlan
' Implements IProcessFileChanged
Implements IProcessStation
Implements IProductionLine
Private _utsApp As UtsAppForm
Private _stationPlan As StationPackagePlan
Public Sub ShowForm(parentControl As Control)
FormBorderStyle = FormBorderStyle.None
TopLevel = False
Dock = DockStyle.Fill
Parent = parentControl
Show()
End Sub
Public Sub utsbctfilechanged
'For Each observer As IProcessStation In _observerList
' observer.StationChanged()
' Next
End Sub
''' <summary>
''' 站位变更代码
''' </summary>
Public Sub Station_Changed() Implements IProcessStation.StationChanged
ApplicationLog.WriteInfoLog($"编辑页面站位变更中PN{_utsApp.ProcessStation.ParentProject.Name} - SN:{_utsApp.ProcessStation.Name} - TP:{_utsApp.ProcessStation.Packet.Name}!")
Try
_stationPlan = CType(_utsApp.ProcessStation.Packet.StationPlan, StationPackagePlan)
Catch ex As Exception
MsgBox($"加载项目流程失败,{ex.Message}")
End Try
InitGrid(_stationPlan)
ApplicationLog.WriteInfoLog($"编辑页面站位变更完成。")
End Sub
''' <summary>
''' 产线变化代码
''' </summary>
Public Sub ProductionLineChanged() Implements IProductionLine.ProductionLineChanged
ApplicationLog.WriteInfoLog($"编辑页面生产线变更中。")
ApplicationLog.WriteInfoLog($"编辑页面生产线变更完成。")
End Sub
Private Sub FrmStationPlan_Load(sender As Object, e As EventArgs) Handles Me.Load
ApplicationLog.WriteInfoLog($"编辑页面加载中。")
'初始化UTS窗体信息,失败则关闭窗体
If InitializeUtsApp() = False Then Return
'初始化窗体页面
InitializeForm()
ApplicationLog.WriteInfoLog($"编辑页面加载完成。")
End Sub
Private Function InitializeUtsApp() As Boolean
_utsApp = UtsAppForm.CreateSingleton()
_utsApp.AddStatisticsObserver(Me)
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
Private Sub InitializeForm()
InitGrid(_stationPlan)
End Sub
Private Sub TsBtnOpen_Click(sender As Object, e As EventArgs) Handles TsBtnOpen.Click
Using xml As New OpenFileDialog
xml.Filter = $"流程文件(*.xml)|*.xml"
If xml.ShowDialog() = DialogResult.OK Then
ApplicationLog.WriteInfoLog($"编辑页面执行流程正在加载{xml.FileName}")
LoadTreeViewFormXml(xml.FileName)
ApplicationLog.WriteInfoLog($"编辑页面执行流程加载完成。")
End If
End Using
End Sub
Private Sub TsBtnLoad_Click(sender As Object, e As EventArgs) Handles TsBtnLoad.Click
If MsgBox("重载会将流程返回为上一次保存的流程状态,是否继续", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
ApplicationLog.WriteInfoLog($"编辑页面执行流程重载中。")
LoadTreeViewFormXml()
ApplicationLog.WriteInfoLog($"编辑页面执行流程重载完成。")
End If
End Sub
Private Sub TsBtnSave_Click(sender As Object, e As EventArgs) Handles TsBtnSave.Click
ApplicationLog.WriteInfoLog($"编辑页面执行流程保存中。")
UpdateGrid(_stationPlan)
ExportTreeViewToXml()
ApplicationLog.WriteInfoLog($"编辑页面执行流程保存完成。")
End Sub
''' <summary>
''' 读取XML,加载树状视图
''' </summary>
Private Sub LoadTreeViewFormXml()
Dim revStationPlanPath As String = $"{UtsPath.GetStationPacketTestPlanDirPath(_stationPlan.ParentPacket.Name)}\Main.xml"
Try
_stationPlan.LoadFile(revStationPlanPath)
InitGrid(_stationPlan)
If StationEditStatusMonitor.StationEditStatus <> StationEditStatusMonitor.StationEditStatusEnum.Saved Then
StationEditStatusMonitor.StationEditStatus = StationEditStatusMonitor.StationEditStatusEnum.Saved
End If
Catch ex As Exception
ApplicationLog.WriteErrorLog($"加载测试站流程发生错误,原因:{ex.Message}")
MsgBox($"加载测试站流程发生错误,原因:{ex.Message}")
_stationPlan.CreateStationPlan()
End Try
End Sub
''' <summary>
''' 读取XML,加载树状视图
''' </summary>
Private Sub LoadTreeViewFormXml(revStationPlanPath As String)
Try
_stationPlan.LoadFile(revStationPlanPath)
InitGrid(_stationPlan)
If StationEditStatusMonitor.StationEditStatus <> StationEditStatusMonitor.StationEditStatusEnum.Saved Then
StationEditStatusMonitor.StationEditStatus = StationEditStatusMonitor.StationEditStatusEnum.Saved
End If
Catch ex As Exception
ApplicationLog.WriteErrorLog($"加载测试站流程发生错误,原因:{ex.Message}")
MsgBox($"加载测试站流程发生错误,原因:{ex.Message}")
_stationPlan.CreateStationPlan()
End Try
End Sub
''' <summary>
''' 将树状视图导出为Xml
''' </summary>
Private Sub ExportTreeViewToXml()
'保存至项目文件
Dim revStationPlanPath As String = $"{UtsPath.GetStationPacketTestPlanDirPath(_stationPlan.ParentPacket.Name)}\Main.xml"
_stationPlan.SaveFile(revStationPlanPath)
'备份至临时文件
Dim tempPath As String = $"{UtsPath.StationDesignDirPath()}\Main.xml"
_stationPlan.SaveFile(tempPath)
If StationEditStatusMonitor.StationEditStatus = StationEditStatusMonitor.StationEditStatusEnum.Changed Then
StationEditStatusMonitor.StationEditStatus = StationEditStatusMonitor.StationEditStatusEnum.Saved
End If
End Sub
Private Sub TsBtnSaveAs_Click(sender As Object, e As EventArgs) Handles TsBtnSaveAs.Click
Using dlg As New SaveFileDialog
dlg.Filter = "Excel 文件(*.xls)|*.xls|CSV 文件(*.csv)|*.csv|PDF 文件(*.pdf)|*.pdf"
dlg.AddExtension = True
If dlg.ShowDialog <> DialogResult.OK Then Return
Cursor = Cursors.WaitCursor
ApplicationLog.WriteInfoLog($"编辑页面执行流程导出中。")
Try
Select Case dlg.FilterIndex
Case 1
GrdStationPlan.ExportToExcel(dlg.FileName, True, True)
Case 2
GrdStationPlan.ExportToCSV(dlg.FileName, True, True)
Case 3
GrdStationPlan.ExportToPDF(dlg.FileName)
End Select
ApplicationLog.WriteInfoLog($"编辑页面执行流程导出完成。")
Catch ex As Exception
ApplicationLog.WriteErrorLog($"编辑页面执行流程导出失败,原因:{ex.Message}")
MsgBox($"编辑页面执行流程导出失败,原因:{ex.Message}")
End Try
Cursor = Cursors.Arrow
End Using
End Sub
#Region "Package表格"
Private Sub InitGrid(Optional stationplan As StationPackagePlan = Nothing)
With GrdStationPlan
.AutoRedraw = False
.NewFile()
.BorderStyle = FlexCell.BorderStyleEnum.None
.Cols = ColNames.Max
.Rows = RowItems.Max
.ExtendLastCol = True
.DisplayRowNumber = True
.Cell(0, ColNames.Item).Text = "Item"
.Cell(0, ColNames.Value).Text = "Value"
.Column(ColNames.Item).Width = 200
.Column(ColNames.Item).Locked = True
.DefaultRowHeight = 20
.DefaultFont = New Font("微软雅黑", 10)
For i As Integer = 1 To RowItems.Max - 1
.Cell(i, ColNames.Item).Text = [Enum].GetName(GetType(RowItems), i)
Next
'.Cell(RowItems.CheckSnTested, ColNames.Value).CellType = FlexCell.CellTypeEnum.ComboBox
'.Cell(RowItems.CheckSnPackaged, ColNames.Value).CellType = FlexCell.CellTypeEnum.ComboBox
'.Cell(RowItems.CheckSnMO, ColNames.Value).CellType = FlexCell.CellTypeEnum.ComboBox
'.Cell(RowItems.MissingQuantity, ColNames.Value).CellType = FlexCell.CellTypeEnum.ComboBox
'.Cell(RowItems.BarCodeType, ColNames.Value).CellType = FlexCell.CellTypeEnum.ComboBox
.Cell(RowItems.AutoPrint, ColNames.Value).CellType = FlexCell.CellTypeEnum.CheckBox
'.Cell(RowItems.ErrorSound, ColNames.Value).CellType = FlexCell.CellTypeEnum.Button
.Cell(RowItems.TemplateFile, ColNames.Value).CellType = FlexCell.CellTypeEnum.Button
.Cell(RowItems.CompanyLogo, ColNames.Value).CellType = FlexCell.CellTypeEnum.TextBox
.Cell(RowItems.CompanyLogo, ColNames.Item).Text = "ControlFile"
.Cell(RowItems.BoxMumEditKey, ColNames.Item).Text = "ColorBoxCodeLabel"
.Cell(RowItems.CompanyName, ColNames.Item).Text = "DevBodyCodeLabel"
FillGrid(stationplan)
.AutoRedraw = True
.Refresh()
End With
End Sub
Private Sub FillGrid(stationplan As StationPackagePlan)
If stationplan Is Nothing Then Return
With GrdStationPlan
'.Cell(RowItems.CheckSnTested, ColNames.Value).Text = stationplan.CheckSnTested.ToString
'.Cell(RowItems.CheckSnPackaged, ColNames.Value).Text = stationplan.CheckSnPackaged.ToString
'.Cell(RowItems.CheckSnMO, ColNames.Value).Text = stationplan.CheckSnMO.ToString
'.Cell(RowItems.PictureCount, ColNames.Value).Text = stationplan.PictureCount.ToString
'.Cell(RowItems.UnlockKey, ColNames.Value).Text = stationplan.UnlockKey
'.Cell(RowItems.BarCodeType, ColNames.Value).Text = stationplan.BarCodeType.ToString
'.Cell(RowItems.MissingQuantity, ColNames.Value).Text = stationplan.MissingQuantity.ToString
'.Cell(RowItems.MissingQuantityKey, ColNames.Value).Text = stationplan.MissingQuantityKey
.Cell(RowItems.AutoPrint, ColNames.Value).Text = stationplan.AutoPrint.ToString
'.Cell(RowItems.ErrorSound, ColNames.Value).Text = stationplan.ErrorSound
.Cell(RowItems.TemplateFile, ColNames.Value).Text = stationplan.TemplateFile
.Cell(RowItems.BoxMumEditKey, ColNames.Value).Text = stationplan.BoxMumEditKey
.Cell(RowItems.CompanyLogo, ColNames.Value).Text = stationplan.CompanyLogo
.Cell(RowItems.CompanyName, ColNames.Value).Text = stationplan.CompanyName
'.Cell(RowItems.BoxNumText, ColNames.Value).Text = stationplan.BoxNumText
'.Cell(RowItems.BoxBarCode, ColNames.Value).Text = stationplan.BoxBarCode
End With
If StationEditStatusMonitor.StationEditStatus = StationEditStatusMonitor.StationEditStatusEnum.Changed Then
StationEditStatusMonitor.StationEditStatus = StationEditStatusMonitor.StationEditStatusEnum.Saved
End If
End Sub
Private Sub UpdateGrid(stationplan As StationPackagePlan)
If _stationPlan Is Nothing Then Return
With GrdStationPlan
'If [Enum].TryParse(.Cell(RowItems.CheckSnTested, ColNames.Value).Text, stationplan.CheckSnTested) = False Then
' MsgBox("更新CheckSnTested失败!")
' Return
'End If
'If [Enum].TryParse(.Cell(RowItems.CheckSnPackaged, ColNames.Value).Text, stationplan.CheckSnPackaged) = False Then
' MsgBox("更新CheckSnPackaged失败!")
' Return
'End If
'If [Enum].TryParse(.Cell(RowItems.CheckSnMO, ColNames.Value).Text, stationplan.CheckSnMO) = False Then
' MsgBox("更新CheckSnMO失败!")
' Return
'End If
'If [Enum].TryParse(.Cell(RowItems.BarCodeType, ColNames.Value).Text, stationplan.BarCodeType) = False Then
' MsgBox("更新BarCodeType失败!")
' Return
'End If
'If [Enum].TryParse(.Cell(RowItems.MissingQuantity, ColNames.Value).Text, stationplan.MissingQuantity) = False Then
' MsgBox("更新MissingQuantity失败!")
' Return
'End If
'stationplan.PictureCount = .Cell(RowItems.PictureCount, ColNames.Value).IntegerValue
'stationplan.UnlockKey = .Cell(RowItems.UnlockKey, ColNames.Value).Text
'stationplan.MissingQuantityKey = .Cell(RowItems.MissingQuantityKey, ColNames.Value).Text
stationplan.AutoPrint = .Cell(RowItems.AutoPrint, ColNames.Value).BooleanValue
'stationplan.ErrorSound = .Cell(RowItems.ErrorSound, ColNames.Value).Text
stationplan.TemplateFile = .Cell(RowItems.TemplateFile, ColNames.Value).Text
stationplan.BoxMumEditKey = .Cell(RowItems.BoxMumEditKey, ColNames.Value).Text
stationplan.CompanyLogo = .Cell(RowItems.CompanyLogo, ColNames.Value).Text
stationplan.CompanyName = .Cell(RowItems.CompanyName, ColNames.Value).Text
'stationplan.BoxNumText = .Cell(RowItems.BoxNumText, ColNames.Value).Text
'stationplan.BoxBarCode = .Cell(RowItems.BoxBarCode, ColNames.Value).Text
End With
End Sub
Private Sub GrdStationPlan_ButtonClick(Sender As Object, e As FlexCell.Grid.ButtonClickEventArgs) Handles GrdStationPlan.ButtonClick
Select Case e.Row
'Case RowItems.ErrorSound
' DlgOpenFile.Filter = "图像资源 (*.jpg;*.png;*.gif;*.ico)|*.jpg;*.png;*.gif;*.ico"
Case RowItems.TemplateFile
DlgOpenFile.Filter = "模板资源 (*.btw)|*.btw"
Case RowItems.CompanyLogo
DlgOpenFile.Filter = "控制台程序 (*.exe)|*.exe"
End Select
DlgOpenFile.CheckFileExists = True
DlgOpenFile.CheckPathExists = True
If DlgOpenFile.ShowDialog() <> DialogResult.OK Then Return
Dim fileName As String = $"{DlgOpenFile.SafeFileName}"
Dim fileDir As String = UtsPath.GetStationPacketResourceDirPath(_stationPlan.ParentPacket.Name)
Dim fliePath As String = $"{fileDir}\{fileName}"
GrdStationPlan.Cell(e.Row, ColNames.Value).Text = fileName
'导入文件
Try
IO.File.Copy(DlgOpenFile.FileName, fliePath, True)
Catch ex As Exception
MsgBox($"导入资源文件失败,{ex.Message}")
End Try
End Sub
Private Sub GrdStationPlan_ComboDropDown(Sender As Object, e As FlexCell.Grid.ComboDropDownEventArgs) Handles GrdStationPlan.ComboDropDown
GrdStationPlan.ComboBox(0).Items.Clear()
Select Case e.Row
'Case RowItems.CheckSnTested
' GrdStationPlan.ComboBox(0).Items.AddRange([Enum].GetNames(GetType(CheckStatus)))
'Case RowItems.CheckSnPackaged
' GrdStationPlan.ComboBox(0).Items.AddRange([Enum].GetNames(GetType(CheckStatus)))
'Case RowItems.CheckSnMO
' GrdStationPlan.ComboBox(0).Items.AddRange([Enum].GetNames(GetType(CheckStatus)))
'Case RowItems.MissingQuantity
' GrdStationPlan.ComboBox(0).Items.AddRange([Enum].GetNames(GetType(MissCountStatus)))
'Case RowItems.BarCodeType
' GrdStationPlan.ComboBox(0).Items.AddRange([Enum].GetNames(GetType(BarcodeTypes)))
End Select
End Sub
Private Sub GrdStationPlan_CellChange(Sender As Object, e As FlexCell.Grid.CellChangeEventArgs) Handles GrdStationPlan.CellChange
StationEditStatusMonitor.StationEditStatus = StationEditStatusMonitor.StationEditStatusEnum.Changed
End Sub
Enum ColNames
SN
Item
Value
Max
End Enum
Enum RowItems
''' <summary>固定行</summary>
<System.ComponentModel.Description("固定行")>
SN
'''' <summary>校验条码未测试后处理方式</summary>
'<System.ComponentModel.Description("校验条码未测试后处理方式")>
'CheckSnTested
'''' <summary>校验条码已参与包装后处理方式</summary>
'<System.ComponentModel.Description("校验条码已参与包装后处理方式")>
'CheckSnPackaged
'''' <summary>校验条码不属于指定MO后处理方式</summary>
'<System.ComponentModel.Description("校验条码不属于指定MO后处理方式")>
'CheckSnMO
'''' <summary>拍摄保存图像的数量</summary>
'<System.ComponentModel.Description("拍摄保存图像的数量")>
'PictureCount
'''' <summary>解锁密码</summary>
'<System.ComponentModel.Description("解锁密码")>
'UnlockKey
'''' <summary>条码类型</summary>
'<System.ComponentModel.Description("条码类型")>
'BarCodeType
'''' <summary>缺失条码数量后的处理方式</summary>
'<System.ComponentModel.Description("缺失条码数量后的处理方式")>
'MissingQuantity
'''' <summary>缺失条码数量后的解锁密码</summary>
'<System.ComponentModel.Description("缺失条码数量后的解锁密码")>
'MissingQuantityKey
''' <summary>是否自动打印</summary>
<System.ComponentModel.Description("是否自动打印")>
AutoPrint
'''' <summary>发生错误后报警文件</summary>
'<System.ComponentModel.Description("发生错误后报警文件")>
'ErrorSound
''' <summary>模板文件名</summary>
<System.ComponentModel.Description("模板文件名,需要把文件添加到 C:\AUTS\Barcode\Mars\")>
TemplateFile
''' <summary>箱号编辑密码</summary>
<System.ComponentModel.Description("机身码打印模板标签名")>
BoxMumEditKey
''' <summary>公司名称</summary>
<System.ComponentModel.Description("彩盒码打印模板标签名")>
CompanyName
'''' <summary>公司Logo文件</summary>
<System.ComponentModel.Description("控制台程序文件")>
CompanyLogo
'''' <summary>箱号规则</summary>
'<System.ComponentModel.Description("箱号规则")>
'BoxNumText
'''' <summary>箱号条码</summary>
'<System.ComponentModel.Description("箱号条码")>
'BoxBarCode
Max
End Enum
Private Sub GrdStationPlan_SelChange(Sender As Object, e As FlexCell.Grid.SelChangeEventArgs) Handles GrdStationPlan.SelChange
If e.FirstRow <= RowItems.SN OrElse e.FirstRow > GrdStationPlan.Rows - 1 Then Return
Dim row As Integer = e.FirstRow
Dim a As RowItems
If [Enum].TryParse(row.ToString, a) Then
LblDesc.Text = $"Row:{row}{vbCrLf}Desc:{GetEnumDescription(a)}"
Else
LblDesc.Text = $"Row:{row}{vbCrLf}Desc:无说明"
End If
End Sub
Public Function GetEnumDescription(enumValue As RowItems) As String
Dim str As String = enumValue.ToString()
Dim field As System.Reflection.FieldInfo = enumValue.GetType().GetField(str)
Dim objs() As Object = field.GetCustomAttributes(GetType(System.ComponentModel.DescriptionAttribute), False)
If objs Is Nothing OrElse objs.Length = 0 Then Return str
Dim da As System.ComponentModel.DescriptionAttribute = CType(objs(0), ComponentModel.DescriptionAttribute)
Return da.Description
End Function
#End Region
End Class

View File

@@ -0,0 +1,435 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class ZQ_Mars_P1_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()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ZQ_Mars_P1_FrmStationTest))
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox()
Me.SplitContainer3 = New System.Windows.Forms.SplitContainer()
Me.Label4 = New System.Windows.Forms.Label()
Me.txt_template = New System.Windows.Forms.TextBox()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label1 = New System.Windows.Forms.Label()
Me.EnclosureCode_txt = New System.Windows.Forms.TextBox()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.DevCode_txt = New System.Windows.Forms.TextBox()
Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.btn_Print = New System.Windows.Forms.Button()
Me.Label6 = New System.Windows.Forms.Label()
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.btn_FindDutPort = New System.Windows.Forms.Button()
Me.tb_MAC_sent_to_ezCAD = New System.Windows.Forms.TextBox()
Me.tb_DUT_Msg = New System.Windows.Forms.TextBox()
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
Me.tsl_DUT_PortSataus = New System.Windows.Forms.ToolStripStatusLabel()
Me.tsl_dut_msg_cnt = New System.Windows.Forms.ToolStripStatusLabel()
Me.TIM_DUT_TASK = New System.Windows.Forms.Timer(Me.components)
Me.TIM_Find_DUT_Port = New System.Windows.Forms.Timer(Me.components)
Me.tips = New System.Windows.Forms.ToolTip(Me.components)
Me.Commport_DUT = New System.IO.Ports.SerialPort(Me.components)
Me.TIM_CNT_CLEAR = New System.Windows.Forms.Timer(Me.components)
Me.TIM_PRINT_LABEL_TASK = New System.Windows.Forms.Timer(Me.components)
Me.lab_Processed_Unit_Cnt = New System.Windows.Forms.Label()
Me.lab_Processed_Unit_Cnt_ThisCycle = New System.Windows.Forms.Label()
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer1.Panel1.SuspendLayout()
Me.SplitContainer1.Panel2.SuspendLayout()
Me.SplitContainer1.SuspendLayout()
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer2.Panel1.SuspendLayout()
Me.SplitContainer2.Panel2.SuspendLayout()
Me.SplitContainer2.SuspendLayout()
CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer3.Panel1.SuspendLayout()
Me.SplitContainer3.Panel2.SuspendLayout()
Me.SplitContainer3.SuspendLayout()
Me.StatusStrip1.SuspendLayout()
Me.SuspendLayout()
'
'SplitContainer1
'
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
Me.SplitContainer1.Name = "SplitContainer1"
'
'SplitContainer1.Panel1
'
Me.SplitContainer1.Panel1.Controls.Add(Me.SplitContainer2)
'
'SplitContainer1.Panel2
'
Me.SplitContainer1.Panel2.Controls.Add(Me.SplitContainer3)
Me.SplitContainer1.Size = New System.Drawing.Size(906, 535)
Me.SplitContainer1.SplitterDistance = 311
Me.SplitContainer1.TabIndex = 2
'
'SplitContainer2
'
Me.SplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainer2.Location = New System.Drawing.Point(0, 0)
Me.SplitContainer2.Name = "SplitContainer2"
Me.SplitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal
'
'SplitContainer2.Panel1
'
Me.SplitContainer2.Panel1.Controls.Add(Me.lab_Processed_Unit_Cnt_ThisCycle)
Me.SplitContainer2.Panel1.Controls.Add(Me.lab_Processed_Unit_Cnt)
Me.SplitContainer2.Panel1.Controls.Add(Me.Label6)
'
'SplitContainer2.Panel2
'
Me.SplitContainer2.Panel2.Controls.Add(Me.ListBox1)
Me.SplitContainer2.Panel2.Controls.Add(Me.RichTextBox1)
Me.SplitContainer2.Size = New System.Drawing.Size(311, 535)
Me.SplitContainer2.SplitterDistance = 261
Me.SplitContainer2.TabIndex = 0
'
'RichTextBox1
'
Me.RichTextBox1.Dock = System.Windows.Forms.DockStyle.Fill
Me.RichTextBox1.Location = New System.Drawing.Point(0, 0)
Me.RichTextBox1.Name = "RichTextBox1"
Me.RichTextBox1.Size = New System.Drawing.Size(311, 270)
Me.RichTextBox1.TabIndex = 0
Me.RichTextBox1.Text = ""
Me.RichTextBox1.Visible = False
'
'SplitContainer3
'
Me.SplitContainer3.Dock = System.Windows.Forms.DockStyle.Fill
Me.SplitContainer3.Location = New System.Drawing.Point(0, 0)
Me.SplitContainer3.Name = "SplitContainer3"
Me.SplitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal
'
'SplitContainer3.Panel1
'
Me.SplitContainer3.Panel1.Controls.Add(Me.Label4)
Me.SplitContainer3.Panel1.Controls.Add(Me.txt_template)
Me.SplitContainer3.Panel1.Controls.Add(Me.Label3)
Me.SplitContainer3.Panel1.Controls.Add(Me.Label2)
Me.SplitContainer3.Panel1.Controls.Add(Me.Label1)
Me.SplitContainer3.Panel1.Controls.Add(Me.EnclosureCode_txt)
Me.SplitContainer3.Panel1.Controls.Add(Me.TextBox1)
Me.SplitContainer3.Panel1.Controls.Add(Me.DevCode_txt)
'
'SplitContainer3.Panel2
'
Me.SplitContainer3.Panel2.Controls.Add(Me.tb_DUT_Msg)
Me.SplitContainer3.Panel2.Controls.Add(Me.StatusStrip1)
Me.SplitContainer3.Panel2.Controls.Add(Me.btn_FindDutPort)
Me.SplitContainer3.Panel2.Controls.Add(Me.tb_MAC_sent_to_ezCAD)
Me.SplitContainer3.Panel2.Controls.Add(Me.Button2)
Me.SplitContainer3.Panel2.Controls.Add(Me.Button1)
Me.SplitContainer3.Panel2.Controls.Add(Me.btn_Print)
Me.SplitContainer3.Size = New System.Drawing.Size(591, 535)
Me.SplitContainer3.SplitterDistance = 261
Me.SplitContainer3.TabIndex = 0
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label4.Location = New System.Drawing.Point(7, 206)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(79, 20)
Me.Label4.TabIndex = 9
Me.Label4.Text = "DUT_SN:"
'
'txt_template
'
Me.txt_template.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.txt_template.Location = New System.Drawing.Point(89, 53)
Me.txt_template.Name = "txt_template"
Me.txt_template.ReadOnly = True
Me.txt_template.Size = New System.Drawing.Size(499, 23)
Me.txt_template.TabIndex = 7
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label3.Location = New System.Drawing.Point(8, 57)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(70, 14)
Me.Label3.TabIndex = 6
Me.Label3.Text = "打印模板:"
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label2.Location = New System.Drawing.Point(6, 163)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(79, 20)
Me.Label2.TabIndex = 3
Me.Label2.Text = "彩盒码:"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.Location = New System.Drawing.Point(7, 113)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(79, 20)
Me.Label1.TabIndex = 2
Me.Label1.Text = "机身码:"
'
'EnclosureCode_txt
'
Me.EnclosureCode_txt.Font = New System.Drawing.Font("宋体", 24.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.EnclosureCode_txt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
Me.EnclosureCode_txt.Location = New System.Drawing.Point(89, 149)
Me.EnclosureCode_txt.Name = "EnclosureCode_txt"
Me.EnclosureCode_txt.ReadOnly = True
Me.EnclosureCode_txt.Size = New System.Drawing.Size(499, 44)
Me.EnclosureCode_txt.TabIndex = 1
Me.EnclosureCode_txt.Text = "CTHM08711382252484637"
Me.EnclosureCode_txt.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox1
'
Me.TextBox1.Font = New System.Drawing.Font("宋体", 18.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.TextBox1.ForeColor = System.Drawing.Color.BlanchedAlmond
Me.TextBox1.Location = New System.Drawing.Point(89, 199)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.ReadOnly = True
Me.TextBox1.Size = New System.Drawing.Size(499, 35)
Me.TextBox1.TabIndex = 0
Me.TextBox1.Text = "10007857400271"
Me.TextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'DevCode_txt
'
Me.DevCode_txt.Font = New System.Drawing.Font("宋体", 24.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.DevCode_txt.ForeColor = System.Drawing.Color.Blue
Me.DevCode_txt.Location = New System.Drawing.Point(89, 99)
Me.DevCode_txt.Name = "DevCode_txt"
Me.DevCode_txt.Size = New System.Drawing.Size(499, 44)
Me.DevCode_txt.TabIndex = 0
Me.DevCode_txt.Text = "10007857400271/A092087BE5AF"
Me.DevCode_txt.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'Button2
'
Me.Button2.Location = New System.Drawing.Point(444, 119)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(140, 53)
Me.Button2.TabIndex = 6
Me.Button2.Text = "Button2"
Me.Button2.UseVisualStyleBackColor = True
Me.Button2.Visible = False
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(295, 191)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(142, 64)
Me.Button1.TabIndex = 4
Me.Button1.Text = "打印预览"
Me.Button1.UseVisualStyleBackColor = True
Me.Button1.Visible = False
'
'btn_Print
'
Me.btn_Print.Location = New System.Drawing.Point(443, 191)
Me.btn_Print.Name = "btn_Print"
Me.btn_Print.Size = New System.Drawing.Size(142, 64)
Me.btn_Print.TabIndex = 5
Me.btn_Print.Text = "打印"
Me.btn_Print.UseVisualStyleBackColor = True
Me.btn_Print.Visible = False
'
'Label6
'
Me.Label6.BackColor = System.Drawing.SystemColors.ActiveCaption
Me.Label6.Dock = System.Windows.Forms.DockStyle.Top
Me.Label6.Font = New System.Drawing.Font("宋体", 29.0!)
Me.Label6.ForeColor = System.Drawing.Color.Cornsilk
Me.Label6.Location = New System.Drawing.Point(0, 0)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(311, 160)
Me.Label6.TabIndex = 14
Me.Label6.Text = "图片"
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'ListBox1
'
Me.ListBox1.Dock = System.Windows.Forms.DockStyle.Fill
Me.ListBox1.FormattingEnabled = True
Me.ListBox1.ItemHeight = 12
Me.ListBox1.Location = New System.Drawing.Point(0, 0)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(311, 270)
Me.ListBox1.TabIndex = 11
'
'btn_FindDutPort
'
Me.btn_FindDutPort.Location = New System.Drawing.Point(492, 5)
Me.btn_FindDutPort.Name = "btn_FindDutPort"
Me.btn_FindDutPort.Size = New System.Drawing.Size(93, 34)
Me.btn_FindDutPort.TabIndex = 13
Me.btn_FindDutPort.Text = "连接DUT"
Me.btn_FindDutPort.UseVisualStyleBackColor = True
'
'tb_MAC_sent_to_ezCAD
'
Me.tb_MAC_sent_to_ezCAD.Font = New System.Drawing.Font("Consolas", 18.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.tb_MAC_sent_to_ezCAD.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer))
Me.tb_MAC_sent_to_ezCAD.Location = New System.Drawing.Point(11, 3)
Me.tb_MAC_sent_to_ezCAD.Name = "tb_MAC_sent_to_ezCAD"
Me.tb_MAC_sent_to_ezCAD.Size = New System.Drawing.Size(475, 36)
Me.tb_MAC_sent_to_ezCAD.TabIndex = 12
Me.tb_MAC_sent_to_ezCAD.Text = "1AEDD8CD"
Me.tb_MAC_sent_to_ezCAD.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'tb_DUT_Msg
'
Me.tb_DUT_Msg.Dock = System.Windows.Forms.DockStyle.Bottom
Me.tb_DUT_Msg.Font = New System.Drawing.Font("Consolas", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.tb_DUT_Msg.Location = New System.Drawing.Point(0, 53)
Me.tb_DUT_Msg.Multiline = True
Me.tb_DUT_Msg.Name = "tb_DUT_Msg"
Me.tb_DUT_Msg.Size = New System.Drawing.Size(591, 195)
Me.tb_DUT_Msg.TabIndex = 15
Me.tb_DUT_Msg.Text = resources.GetString("tb_DUT_Msg.Text")
'
'StatusStrip1
'
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsl_DUT_PortSataus, Me.tsl_dut_msg_cnt})
Me.StatusStrip1.Location = New System.Drawing.Point(0, 248)
Me.StatusStrip1.Name = "StatusStrip1"
Me.StatusStrip1.Size = New System.Drawing.Size(591, 22)
Me.StatusStrip1.TabIndex = 14
Me.StatusStrip1.Text = "StatusStrip1"
'
'tsl_DUT_PortSataus
'
Me.tsl_DUT_PortSataus.AutoSize = False
Me.tsl_DUT_PortSataus.Name = "tsl_DUT_PortSataus"
Me.tsl_DUT_PortSataus.Size = New System.Drawing.Size(134, 17)
Me.tsl_DUT_PortSataus.Text = "COM1"
Me.tsl_DUT_PortSataus.ToolTipText = "DUT 串口确认设备与PC连接后双击进行自动寻找"
'
'tsl_dut_msg_cnt
'
Me.tsl_dut_msg_cnt.AutoSize = False
Me.tsl_dut_msg_cnt.ForeColor = System.Drawing.Color.Green
Me.tsl_dut_msg_cnt.Name = "tsl_dut_msg_cnt"
Me.tsl_dut_msg_cnt.Size = New System.Drawing.Size(134, 17)
Me.tsl_dut_msg_cnt.Text = "0"
'
'Commport_DUT
'
Me.Commport_DUT.BaudRate = 115200
'
'lab_Processed_Unit_Cnt
'
Me.lab_Processed_Unit_Cnt.BackColor = System.Drawing.SystemColors.ActiveCaptionText
Me.lab_Processed_Unit_Cnt.Dock = System.Windows.Forms.DockStyle.Left
Me.lab_Processed_Unit_Cnt.Font = New System.Drawing.Font("Calibri", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lab_Processed_Unit_Cnt.ForeColor = System.Drawing.Color.White
Me.lab_Processed_Unit_Cnt.Location = New System.Drawing.Point(0, 160)
Me.lab_Processed_Unit_Cnt.Name = "lab_Processed_Unit_Cnt"
Me.lab_Processed_Unit_Cnt.Size = New System.Drawing.Size(149, 101)
Me.lab_Processed_Unit_Cnt.TabIndex = 15
Me.lab_Processed_Unit_Cnt.Tag = "本次生产总统计数量连击5次清零"
Me.lab_Processed_Unit_Cnt.Text = "0"
Me.lab_Processed_Unit_Cnt.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'lab_Processed_Unit_Cnt_ThisCycle
'
Me.lab_Processed_Unit_Cnt_ThisCycle.BackColor = System.Drawing.SystemColors.ActiveCaptionText
Me.lab_Processed_Unit_Cnt_ThisCycle.Dock = System.Windows.Forms.DockStyle.Right
Me.lab_Processed_Unit_Cnt_ThisCycle.Font = New System.Drawing.Font("Calibri", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lab_Processed_Unit_Cnt_ThisCycle.ForeColor = System.Drawing.Color.White
Me.lab_Processed_Unit_Cnt_ThisCycle.Location = New System.Drawing.Point(148, 160)
Me.lab_Processed_Unit_Cnt_ThisCycle.Name = "lab_Processed_Unit_Cnt_ThisCycle"
Me.lab_Processed_Unit_Cnt_ThisCycle.Size = New System.Drawing.Size(163, 101)
Me.lab_Processed_Unit_Cnt_ThisCycle.TabIndex = 16
Me.lab_Processed_Unit_Cnt_ThisCycle.Text = "0"
Me.lab_Processed_Unit_Cnt_ThisCycle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'ZQ_Mars_P1_FrmStationTest
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(906, 535)
Me.Controls.Add(Me.SplitContainer1)
Me.Name = "ZQ_Mars_P1_FrmStationTest"
Me.Text = "Form1"
Me.SplitContainer1.Panel1.ResumeLayout(False)
Me.SplitContainer1.Panel2.ResumeLayout(False)
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer1.ResumeLayout(False)
Me.SplitContainer2.Panel1.ResumeLayout(False)
Me.SplitContainer2.Panel2.ResumeLayout(False)
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer2.ResumeLayout(False)
Me.SplitContainer3.Panel1.ResumeLayout(False)
Me.SplitContainer3.Panel1.PerformLayout()
Me.SplitContainer3.Panel2.ResumeLayout(False)
Me.SplitContainer3.Panel2.PerformLayout()
CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer3.ResumeLayout(False)
Me.StatusStrip1.ResumeLayout(False)
Me.StatusStrip1.PerformLayout()
Me.ResumeLayout(False)
End Sub
Friend WithEvents SplitContainer1 As SplitContainer
Friend WithEvents SplitContainer2 As SplitContainer
Friend WithEvents RichTextBox1 As RichTextBox
Friend WithEvents SplitContainer3 As SplitContainer
Friend WithEvents Label4 As Label
Friend WithEvents txt_template As TextBox
Friend WithEvents Label3 As Label
Friend WithEvents Label2 As Label
Friend WithEvents Label1 As Label
Friend WithEvents EnclosureCode_txt As TextBox
Friend WithEvents TextBox1 As TextBox
Friend WithEvents DevCode_txt As TextBox
Friend WithEvents Button1 As Button
Friend WithEvents btn_Print As Button
Friend WithEvents Button2 As Button
Friend WithEvents Label6 As Label
Friend WithEvents ListBox1 As ListBox
Friend WithEvents tb_DUT_Msg As TextBox
Public WithEvents StatusStrip1 As StatusStrip
Friend WithEvents tsl_DUT_PortSataus As ToolStripStatusLabel
Friend WithEvents tsl_dut_msg_cnt As ToolStripStatusLabel
Friend WithEvents btn_FindDutPort As Button
Friend WithEvents tb_MAC_sent_to_ezCAD As TextBox
Friend WithEvents TIM_DUT_TASK As Timer
Friend WithEvents TIM_Find_DUT_Port As Timer
Friend WithEvents tips As ToolTip
Public WithEvents Commport_DUT As IO.Ports.SerialPort
Friend WithEvents TIM_CNT_CLEAR As Timer
Friend WithEvents TIM_PRINT_LABEL_TASK As Timer
Friend WithEvents lab_Processed_Unit_Cnt_ThisCycle As Label
Friend WithEvents lab_Processed_Unit_Cnt As Label
End Class

View File

@@ -0,0 +1,153 @@
<?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>
<data name="tb_DUT_Msg.Text" xml:space="preserve">
<value>******************************* START *******************************
[MAC] -&gt; [PHO10961AEDD8CD]
[Version] -&gt; [0.2.18]
[Voltage] -&gt; [1071] mV
[Humiture] -&gt; Temperature:[80.23]F, Humidity:[68.7]%RH
[PIR] -&gt; [0]
[KeyLeft] -&gt; [0]
[KeyRight] -&gt; [0]
******************************** END ********************************</value>
</data>
<metadata name="StatusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="TIM_DUT_TASK.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>818, 17</value>
</metadata>
<metadata name="TIM_Find_DUT_Port.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>960, 17</value>
</metadata>
<metadata name="tips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1127, 17</value>
</metadata>
<metadata name="Commport_DUT.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1200, 17</value>
</metadata>
<metadata name="TIM_CNT_CLEAR.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>211, 56</value>
</metadata>
<metadata name="TIM_PRINT_LABEL_TASK.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>360, 56</value>
</metadata>
</root>

View File

@@ -0,0 +1,949 @@

Imports System.Drawing.Printing
Imports System.Globalization
Imports System.IO.Ports
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Threading
Imports Newtonsoft.Json
Imports OpenCvSharp
Imports OpenCvSharp.Extensions
Imports UTS_Core.DebugLog
Imports UTS_Core.UTSModule
Imports UTS_Core.UTSModule.DbConnect
Imports UTS_Core.UTSModule.DbTableModel.Customer
Imports UTS_Core.UTSModule.Station
Imports UTS_Core.UTSModule.Test
Imports UTS_Core.UTSModule.Test.Command
Imports UTS_Core.UTSModule.Test.Command.ProcessCommand
Imports UTS_Core.UTSModule.Test.Controls
Imports UTS_Core.UTSModule.Test.StatusMonitor
Public Class ZQ_Mars_P1_FrmStationTest
' Implements IProcessfilechanged
Implements IProcessStation
Private _utsApp As UtsAppForm
Private _stationPlan As StationPackagePlan
Private PrintfNum As Integer = 0
Private Printfcnt As Integer = 0
Private _DummyVardic As Dictionary(Of String, Integer
Dim g_TotolCnt As UInt64 = 0
Dim g_ThisTimeCnt As UInt64 = 0
Dim g_DUT_PortName As String = ""
' Private g_FileNameWsFullPatch As String = Application.StartupPath & "\Template\"
'Private g_FileName As String
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
CheckForIllegalCrossThreadCalls = False '禁用跨线程检查,简化跨线程操作’
g_ThisTimeCnt = 0
My.Settings.Reload()
g_TotolCnt = CType(My.Settings.Total_Cnt UInt64)
g_DUT_PortName = My.Settings.DUT_PortName
lab_Processed_Unit_Cnt.Text = g_TotolCnt.ToString
tsl_DUT_PortSataus.Text = g_DUT_PortName
tb_DUT_Msg.Text = ""
tb_MAC_sent_to_ezCAD.Text = ""
lab_Processed_Unit_Cnt_ThisCycle.Text = g_ThisTimeCnt.ToString
ListBox1.Items.Clear()
If String.IsNullOrEmpty(g_DUT_PortName) = False Then
Open_Comport(Commport_DUT, g_DUT_PortName)
End If
UpdateDutPortStatus()
TIM_DUT_TASK.Enabled = True
TIM_Find_DUT_Port.Enabled = True
TIM_CNT_CLEAR.Enabled = True
TIM_PRINT_LABEL_TASK.Enabled = True
TIM_DUT_TASK.Start()
TIM_Find_DUT_Port.Stop()
TIM_CNT_CLEAR.Start()
TIM_PRINT_LABEL_TASK.Start()
tips.SetToolTip(lab_Processed_Unit_Cnt, "本次生产累计打标数量,连续点击 5 次清零!")
tips.SetToolTip(lab_Processed_Unit_Cnt_ThisCycle, "本次启动程序累计打标数量,连续点击 5 次清零!")
ApplicationLog.WriteInfoLog($"测试页面加载中。")
'创建资源文件夹
If Not IO.Directory.Exists("C:\AUTS\Barcode\Mars\") Then
IO.Directory.CreateDirectory("C:\AUTS\Barcode\Mars\")
End If
'If Not IO.Directory.Exists(g_FileNameWsFullPatch) Then
' IO.Directory.CreateDirectory(g_FileNameWsFullPatch)
'End If
'初始化UTS窗体信息,失败则关闭窗体
If InitializeUtsApp() = False Then Return
InitializeForm()
End Sub
Private Sub RichTextBox1_TextChanged(sender As Object, e As EventArgs) Handles RichTextBox1.TextChanged
RichTextBox1.SelectionStart = RichTextBox1.TextLength
RichTextBox1.ScrollToCaret()
End Sub
Delegate Sub IPSetRichTextBox1Text(TextBox1 As RichTextBox, text As String txtcolor As Color)
Private Sub SetRichTextBox1Text(TextBox1 As RichTextBox, text As String txtcolor As Color)
If InvokeRequired = True Then
Dim dev As New IPSetRichTextBox1Text(AddressOf SetRichTextBox1Text)
Me.Invoke(dev, New Object() {TextBox1, text, txtcolor})
Else
With TextBox1
.SuspendLayout()
.SelectionColor = txtcolor
.AppendText(text & vbCrLf)
.ResumeLayout(False)
End With
End If
End Sub
Public Function AccessApipwd As String code As String, dbName As String, ProjectID As String As String
Dim jsonString As String = String.Empty
Try
jsonString = PostData("http://uts-data.com/CommonApi/AllocationBarcode", $"Pwd={pwd}&Barcode={code}&DBName={dbName}&ProjectID={ProjectID}")
Catch ex As Exception
MsgBox($"{ex.Message}!请联系管理员")
End Try
Console.WriteLine(jsonString)
If jsonString = Nothing Then
Return "False"
End If
Dim login As JsonAccessApi = JsonConvert.DeserializeObject(Of JsonAccessApi)(jsonString)
Return login.Mars_ColorBox_BarCode
End Function
''' <summary>
''' Post请求
''' </summary>
''' <param name="url"></param>
''' <param name="data"></param>
''' <returns></returns>
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 InitializeForm()
'Todo:初始化窗体代码
InitBarcodeGrid()
End Sub
Public Sub ShowForm(parentControl As Control)
FormBorderStyle = FormBorderStyle.None
TopLevel = False
Dock = DockStyle.Fill
Parent = parentControl
Show()
End Sub
''' <summary>
''' 站位变化
''' </summary>
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)
' lab_imger.Image = Nothing
Dim revStationPlanPath As String = UtsPath.GetStationPacketResourceDirPath(_stationPlan.ParentPacket.Name)
Select Case _utsApp.ProcessStation.ParentProject.Index
Case 1
'lab_imger.Image = Image.FromFile(revStationPlanPath & "\Mars.png")
If File.Exists(revStationPlanPath & "\Mars.png") Then
'lab_imger.Image = Image.FromFile(revStationPlanPath & "\Mars.png")
End If
Case 2
If File.Exists(revStationPlanPath & "\Phobos.png") Then
'lab_imger.Image = Image.FromFile(revStationPlanPath & "\Phobos.png")
End If
End Select
'清除表格数据
InitBarcodeGrid()
ApplicationLog.WriteInfoLog($"测试页面站位变更完成!")
End Sub
Public DicBarTender As Dictionary(Of String, Integer())
Private Sub InitBarcodeGrid()
'GrdPriview = New FlexCell.Grid
If IsNothing(_stationPlan) Then
Return
End If
'Dim tmpPath As String = Application.StartupPath & "\Template\" & _stationPlan.TemplateFile
Dim tmpPath As String = $"C:\AUTS\Barcode\Phobos\{_stationPlan.TemplateFile}"
If IO.File.Exists(tmpPath) Then
txt_template.Text = tmpPath
'If GrdPriview.OpenFile(tmpPath) Then
' DicBarTender = ReplaceCelltext(GrdPriview)
'Else
' MsgBox("文件打开失败")
'End If
End If
End Sub
Private Function InitializeUtsApp() As Boolean
'_utsApp.ProcessStation.Packet.StationPlan
_utsApp = UtsAppForm.CreateSingleton()
_utsApp.AddStatisticsObserver(Me)
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 Function ReplaceCelltext(ByRef gird As FlexCell.Grid) As Dictionary(Of String, Integer())
Dim BarTender As New Dictionary(Of String, Integer())
For rowid As Integer = 1 To gird.Rows - 1
For colid As Integer = 1 To gird.Cols - 1
If gird.Cell(rowid, colid).MergeCell Then
If String.IsNullOrEmpty(gird.Cell(rowid, colid).Text.Trim) Then Continue For
If BarTender.ContainsKey(gird.Cell(rowid, colid).Text.Trim) Then
MsgBox("警告:模板伪变量重复命名,设置将忽视靠后变量。")
Continue For
End If
BarTender.Add(gird.Cell(rowid, colid).Text.Trim.ToLower, {rowid, colid})
End If
Next
Next
Return BarTender
End Function
Public Sub SetBarTendertoGridByRef gird As FlexCell.Grid, BarTender As Dictionary(Of String, Integer()
'Dim cellxy() As Integer
'If BarTender.ContainsKey("{QRCode1}".ToLower ) Then
' cellxy = BarTender.Item("{QRCode1}".ToLower)
' gird.Cell(cellxy(0), cellxy(0)).Text = DevCode_txt.Text
' 'gird.Selection.CellType = FlexCell.CellTypeEnum.QRCode
'End If
'If BarTender.ContainsKey("{BarCode1}".ToLower) Then
' cellxy = BarTender.Item("{BarCode1}".ToLower)
' 'cellxy = BarTender.Item("{BarCode1}".ToLower)
' gird.Cell(cellxy(0), cellxy(0)).Text = EnclosureCode_txt.Text
' 'gird.Selection.CellType = FlexCell.CellTypeEnum.BarCode
'End If
'GrdPriview.Print
End Sub
Public Function TestPrintf(filepath As String dic As Dictionary(Of String String), devname As String) As String
'Try
' Dim btEngine As Engine = New Engine(True)
' btEngine.Start()
' Dim btFormat As LabelFormatDocument = btEngine.Documents.Open(filepath)
' ' btFormat.SubStrings("QRcode".Value = "98654613" '对模版相应字段进行赋值e
' For Each keyval As KeyValuePairOf String String In dic
' Try
' btFormat.SubStrings(keyval.Key.Value = keyval.Key '对模版相应字段进行赋值e
' Catch ex As Exception
' MsgBox$"False:未找到 {keyval.Key} 的打印索引位置,打印失败。请检查参数与打印模板标签是否一致。"
' Return $"False:未找到 {keyval.Key} 的打印索引位置,打印失败。请检查参数与打印模板标签是否一致。"
' End Try
' Next
' btFormat.PrintSetup.PrinterName = devname ' //寻找打印机
' Dim snames As PrinterSettings.StringCollection = PrinterSettings.InstalledPrinters
' Dim PrintIsExist As Boolean = False
' Dim logPringter As String = ""
' For Each Name As String In snames
' logPringter = logPringter & Name & ";"
' If Name.ToLower.Trim = devname.ToLower().Trim() Then
' PrintIsExist = True
' Exit For
' End If
' Next
' 'Console.WriteLine("搜索的打印机有" + logPringter)
' If Not PrintIsExist Then
' MsgBox("False:未找到打印机打印失败!")
' Return "False:未找到打印机打印失败!"
' Else
' ' Console.WriteLine("开始打印")
' If btFormat.Print() <> 0 Then
' MsgBox("False:打印失败!")
' Return "False:打印失败!"
' End If
' ' Console.WriteLine("打印成功,开始关闭引擎")
' btEngine.Stop()
' 'Console.WriteLine("开始关闭引擎")
' End If
'Catch ex As Exception
' MsgBox("打印异常退出," & ex.Message)
' Return "False:打印异常退出," & ex.Message
' 'Console.WriteLine("打印异常退出," & ex.Message)
'End Try
End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'GrdPriview.PrintPreview()
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btn_Print.Click
If _utsApp.ProcessStation Is Nothing Then
MsgBox($"请选择项目与测试站后再尝试录入!")
Return
End If
If String.IsNullOrEmpty(txt_template.Text) Then
MsgBox($"未选择打印模板,请先选择打印模板在测试")
Return
End If
If String.IsNullOrEmpty(DevCode_txt.Text) Then
MsgBox($"无效的机身码[{DevCode_txt.Text}],请重新录入")
Return
End If
ApplicationLog.WriteInfoLog($"打印条码完成,机身码:{DevCode_txt.Text }")
'设置焦点
DevCode_txt.Focus()
DevCode_txt.SelectAll()
Dim theE As New PreviewKeyDownEventArgsKeys.Enter
DevCode_txt_PreviewKeyDown(Nothing, theE)
'btn_Print.Enabled = True
''打印
'If _stationPlan.AutoPrint Then
' GrdPriview.Print()
'End If
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs)
'Try
' Dim dlg As New OpenFileDialog
' dlg.InitialDirectory = Application.StartupPath
' dlg.Filter = "uts BarCode Template File (*.utsbct)|*.utsbct| All Files|*.*||"
' If System.IO.File.Exists(g_FileNameWsFullPatch) Then
' dlg.InitialDirectory = System.IO.Path.GetDirectoryName(g_FileNameWsFullPatch)
' dlg.FileName = g_FileNameWsFullPatch
' Else
' dlg.InitialDirectory = Application.StartupPath
' End If
' If dlg.ShowDialog() = Windows.Forms.DialogResult.OK Then
' 'g_FileNameWsFullPatch = dlg.FileName '& ".utsbct"
' txt_template.Text = dlg.FileName
' Grid1.OpenFile(dlg.FileName)
' g_FileName = dlg.FileName
' End If
'Catch ex As Exception
' MsgBox("打开文件失败!")
'End Try
'' updateWindowTitle()
'_DummyVardic = ReplaceCelltext(Grid1)
End Sub
Private Sub DevCode_txt_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles DevCode_txt.PreviewKeyDown, TextBox1.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
Dim exepath As String = $"{UtsPath.GetStationPacketResourceDirPath(_stationPlan.ParentPacket.Name)}\{_stationPlan.CompanyLogo}"
Dim codelab As String = ""
If e.KeyData = Keys.Enter Then
' buff = DevCode_txt.Text.Trim.Split(CType("/", Char))
If DevCode_txt.Text.Length = 12 Then
ColorBox = AccessApi("actop00803", DevCode_txt.Text.Trim, "uts_zongqing", _utsApp.ProcessStation.ParentProject.Index.ToString)
EnclosureCode_txt.Text = ColorBox
TextBox1.Text = DevCode_txt.Text.Trim
'If GetTheColorBoxCode(DevCode_txt.Text Dut_SN) Then
If Not String.IsNullOrEmpty(_stationPlan.CompanyName) Then
codelab = codelab & $"{_stationPlan.CompanyName}={EnclosureCode_txt.Text },"
End If
If Not String.IsNullOrEmpty(_stationPlan.BoxMumEditKey) Then
codelab = codelab & $"{_stationPlan.BoxMumEditKey}={DevCode_txt.Text },"
End If
codelab = codelab.Substring(0, codelab.Length - 1)
If String.IsNullOrEmpty(codelab) Then
node.RowListIndex = 1
node.Description = "模板标签未找到,请查看配置标签与模板标签是否一致!"
SetRichTextBox1Text(RichTextBox1, "模板标签未找到,请查看配置标签与模板标签是否一致!" & vbCrLf, Color.Red)
TheTestResults(Dut_SN, TestResult.TestResultEnum.Fail, datenow, node)
Return
End If
Dim exeArgs As String = $"0 {txt_template.Text} {codelab} 1 0 10000"
If Not ColorBox.Equals("False") Then
'TestPrintf(,,)
SetRichTextBox1Text(RichTextBox1, "正在打印中" & vbCrLf, Color.ForestGreen)
SetRichTextBox1Text(RichTextBox1, codelab & vbCrLf, Color.ForestGreen)
If CallConsoleexepath exeArgs "20000" "0", "Pass" Then
Customfield.Clear()
Customfield.Add("MacCode", buff(1).Trim)
Customfield.Add("SnCode", buff(0).Trim)
Customfield.Add("ColorBoxCode", ColorBox)
Customfield.Add("label_string", DevCode_txt.Text.Trim)
PrintfNum = PrintfNum + 1
'lab_test_num.Text = PrintfNum.ToString & "个"
Printfcnt = My.Settings.P1_cnt + PrintfNum
'lab_Test_cnt.Text = Printfcnt.ToString & "个"
My.Settings.Save()
SetRichTextBox1Text(RichTextBox1, "调用打印机打印成功!" & vbCrLf, Color.Blue)
TheTestResults(buff(0).Trim, TestResult.TestResultEnum.Pass, datenow, Nothing, Customfield)
Else
node.RowListIndex = 1
node.Description = "打印失败!"
SetRichTextBox1Text(RichTextBox1, "打印失败" & vbCrLf, Color.Red)
TheTestResults(Dut_SN, TestResult.TestResultEnum.Fail, datenow, node)
End If
Else
node.RowListIndex = 1
node.Description = "机身码绑定失败"
SetRichTextBox1Text(RichTextBox1, "机身码绑定失败" & vbCrLf, Color.Red)
TheTestResults(Dut_SN, TestResult.TestResultEnum.Fail, datenow, node)
End If
Else
node.RowListIndex = 1
node.Description = "机身码错误"
SetRichTextBox1Text(RichTextBox1, "机身码错误" & vbCrLf, Color.Red)
TheTestResults(Dut_SN, TestResult.TestResultEnum.Fail, datenow, node)
End If
End If
If _stationPlan.AutoPrint Then
DevCode_txt.Focus()
DevCode_txt.SelectAll()
End If
End Sub
Private Function GetTheColorBoxCode(devcode As String, ByRef DutSN As String) As String
End Function
Public Function CallConsole(exePath As String, exeArgs As String, timeout As String stream As String destSrc As String) As Boolean
Dim Command As New TestCommand()
Command.Parameter.Add(exePath
Command.Parameter.Add(exeArgs
Command.Parameter.Add(timeout)
Command.Parameter.Add(stream)
Command.Parameter.Add(destSrc)
Dim executor As New ProcessExecuteExecutor(Command)
Dim result As TestCommandReturn = executor.Execute()
Return result.ExecuteResult
End Function
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 = 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
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs)
'If CheckBox1.Checked Then
' btn_Print.Enabled = False
'Else
' btn_Print.Enabled = True
'End If
End Sub
#Region "串口基础操作"
Private Sub UpdateDutPortStatus()
tsl_DUT_PortSataus.Text = Commport_DUT.PortName
If Commport_DUT.IsOpen Then
tsl_DUT_PortSataus.ForeColor = Color.Green
Else
tsl_DUT_PortSataus.ForeColor = Color.Red
End If
End Sub
''' <summary>
''' 关闭串口
''' </summary>
Private Sub Close_Comport(objComPort As SerialPort)
Try
If objComPort.IsOpen Then
objComPort.Close() '关闭commport
objComPort.DiscardInBuffer()
End If
Catch ex As Exception
objComPort.Close()
End Try
End Sub
''' <summary>
''' 打开串口,如果端口当前状态是打开状态,则先关闭串口,然后重新打开串口
''' </summary>
''' <param name="objComPort">打开目标串口的串口对象</param>
''' <returns>返回串口状态</returns>
Private Function Open_Comport(objComPort As SerialPort, strPortName As String) As Boolean
Try
If objComPort.IsOpen Then
objComPort.Close() '关闭commport
End If
objComPort.PortName = strPortName '串口编号赋值’
objComPort.BaudRate = 115200
objComPort.Open() '打开串口’
Return objComPort.IsOpen '返回打开状态true=打开成功’
Catch ex As Exception
objComPort.Close()
Return False
End Try
End Function
''' <summary>
''' 获取可用串口列表
''' </summary>
''' <returns></returns>
Private Function Get_Comport_list() As List(Of String
Dim lstComportName As List(Of String) = New List(Of String)
lstComportName.Clear()
Dim portNames() As String = SerialPort.GetPortNames()
Array.Sort(portNames)
lstComportName.AddRange(portNames)
Return lstComportName
End Function
#End Region
#Region "DUT 任务操作"
Dim g_DutData As Dut_Data_Struct
Dim g_tmpStrRcvd As String = "" '临时保持接收到的串口数据
Dim g_RcvdData_Fm_DUT As String = "" '串口接收完成后,将临时数据复制一份出来,确保不耽误下一包接收
Dim g_Str_tobe_Sent_To_ezCAD As String = ""
Dim g_Find_Dut_Status As enum_Find_Dut_Status = enum_Find_Dut_Status.enum_DUT_ComPort_Status_UnKnow
Dim g_Find_Dut_Status_Last As enum_Find_Dut_Status = enum_Find_Dut_Status.enum_DUT_ComPort_Status_UnKnow
Structure Dut_Data_Struct
Dim dev_Mac_Str As String
Dim Dev_Mac As String
Dim Dev_Version As String
Dim Dev_Voltage As UInt16
Dim Dev_Humiture As Double
Dim Dev_Temprature_F As Double
Dim Dev_Temprature_C As Double
Dim Dev_PIR As Boolean
Dim Dev_KeyLeft As Boolean
Dim Dev_KeyRight As Boolean
Dim Dev_Info_Count As ULong
Dim Dev_DataReady As Boolean
Dim Dev_IsPrinted As Boolean
Dim Dev_LastUpate As DateTime
Dim Dev_Info_Count_Last As ULong
Dim Dev_Info_NoUpdate_Cnt As ULong
Dim Dev_PortReady As Boolean
Dim KeyVal_Left_Last As Boolean
Dim KeyVal_Right_Last As Boolean
Dim PirVal_Last As Boolean
Dim KeyPressCnt_Left As Integer
Dim KeyPressCnt_Right As Integer
Dim PirTrigCnt As Integer
End Structure
''' <summary>
''' DUT串口任务状态机标记位
''' </summary>
Public Enum enum_Find_Dut_Status
enum_DUT_ComPort_Status_UnKnow
enum_DUT_ComPort_Status_GetPortList
enum_DUT_ComPort_Status_ChangePort
enum_DUT_ComPort_Status_Connected
enum_DUT_ComPort_Status_WaitData
End Enum
''' <summary>
''' 双击DUT串口标签启动串口自动匹配
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub tsl_DUT_PortSataus_DoubleClick(sender As Object, e As EventArgs) Handles tsl_DUT_PortSataus.DoubleClick
'TIM_DUT_TASK.Stop()
End Sub
''' <summary>
''' DUT 串口接收事件
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub Commport_DUT_DataReceived(sender As Object, e As SerialDataReceivedEventArgs) Handles Commport_DUT.DataReceived
End Sub
Private Function paser_RcvData(strRcvData As String) As Boolean
'**************************** START ********************************
'[MAC] -> [PHOD03E7DA4ADE8]
'[Version] -> [0.2.17]
'[Voltate] -> [2023] mV
'[Humiture] -> Temperature: [80.11]F, Humidity:[56.1]%H
'[PIR] -> [0]
'[KeyLeft] -> [1]
'[KeyRight] -> [0]
'**************************** END ********************************
Dim tmpPossition As Integer = 0
Clear_Dut_Data()
If InStr(strRcvData, "START") > 0 AndAlso InStr(strRcvData, "END") > 0 Then
'>>>>>>> MAC
tmpPossition = InStr(strRcvData, "MAC")
If tmpPossition > 0 Then
g_DutData.dev_Mac_Str = Microsoft.VisualBasic.Mid(strRcvData, tmpPossition + 9, 15)
g_DutData.Dev_Mac = Microsoft.VisualBasic.Mid(strRcvData, tmpPossition + 12, 12)
If InStr(g_DutData.Dev_Mac, ":") <= 0 Then
g_Str_tobe_Sent_To_ezCAD = g_DutData.Dev_Mac
tb_MAC_sent_to_ezCAD.Text = g_Str_tobe_Sent_To_ezCAD
g_DutData.Dev_Info_Count = CULng(g_DutData.Dev_Info_Count + 1)
g_DutData.Dev_DataReady = True
'g_DutData.Dev_PortReady = True
'g_DutData.Dev_LastUpate = Date.Now
tsl_dut_msg_cnt.Text = g_DutData.Dev_Info_Count.ToString
tb_DUT_Msg.Text = strRcvData
End If
'MsgBox(g_DutData.dev_Mac_Str & "," & g_DutData.Dev_Mac)
End If
' '>>>>>>> Version
' tmpPossition = InStr(strRcvData, "Version")
'If tmpPossition > 0 Then
' g_DutData.Dev_Version = Microsoft.VisualBasic.Mid(strRcvData, tmpPossition + 13, 6)
' 'MsgBox(g_DutData.Dev_Version)
'End If
''>>>>>>> Voltage
'tmpPossition = InStr(strRcvData, "Voltage")
'If tmpPossition > 0 Then
' g_DutData.Dev_Voltage = CTypeMicrosoft.VisualBasic.Mid(strRcvData, tmpPossition + 13, 4) UInt16)
' 'MsgBox(g_DutData.Dev_Voltage)
'End If
''>>>>>>> Humiture
'tmpPossition = InStr(strRcvData, "Humidity:")
'If tmpPossition > 0 Then
' g_DutData.Dev_Humiture = CDbl(Microsoft.VisualBasic.Mid(strRcvData, tmpPossition + 10, 4))
' 'MsgBox(g_DutData.Dev_Humiture)
'End If
''>>>>>>> Temperature
'tmpPossition = InStr(strRcvData, "Temperature:")
'If tmpPossition > 0 Then
' g_DutData.Dev_Temprature_F = CDbl(Microsoft.VisualBasic.Mid(strRcvData, tmpPossition + 13, 5))
' g_DutData.Dev_Temprature_C = (g_DutData.Dev_Temprature_F - 32) / 1.8
' 'MsgBox(g_DutData.Dev_Temprature_F & " , " & g_DutData.Dev_Temprature_C)
'End If
''>>>>>>> PIR
'tmpPossition = InStr(strRcvData, "PIR")
'If tmpPossition > 0 Then
' g_DutData.Dev_PIR = CType(Microsoft.VisualBasic.Mid(strRcvData, tmpPossition + 9, 1), Boolean)
' 'MsgBox(g_DutData.Dev_PIR)
' If g_DutData.Dev_PIR <> g_DutData.PirVal_Last Then
' If g_DutData.Dev_PIR = True Then
' g_DutData.PirTrigCnt += 1
' End If
' g_DutData.PirVal_Last = g_DutData.Dev_PIR
' End If
'End If
''>>>>>>> KeyLeft
'tmpPossition = InStr(strRcvData, "KeyLeft")
'If tmpPossition > 0 Then
' g_DutData.Dev_KeyLeft = CType(Microsoft.VisualBasic.Mid(strRcvData, tmpPossition + 13, 1), Boolean)
' 'lab_KeyLeft.Visible = g_DutData.Dev_KeyLeft
' 'MsgBox(g_DutData.Dev_KeyLeft)
' If g_DutData.Dev_KeyLeft <> g_DutData.KeyVal_Left_Last Then
' If g_DutData.Dev_KeyLeft = True Then
' g_DutData.KeyPressCnt_Left += 1
' End If
' g_DutData.KeyVal_Left_Last = g_DutData.Dev_KeyLeft
' End If
'End If
''>>>>>>> KeyRight
'tmpPossition = InStr(strRcvData, "KeyRight")
'If tmpPossition > 0 Then
' g_DutData.Dev_KeyRight = CType(Microsoft.VisualBasic.Mid(strRcvData, tmpPossition + 14, 1), Boolean)
' 'MsgBox(g_DutData.Dev_KeyRight)
' If g_DutData.Dev_KeyRight <> g_DutData.KeyVal_Right_Last Then
' If g_DutData.Dev_KeyRight = True Then
' g_DutData.KeyPressCnt_Right += 1
' End If
' g_DutData.KeyVal_Right_Last = g_DutData.Dev_KeyRight
' End If
'End If
'g_DutData.Dev_Info_Count = CULng(g_DutData.Dev_Info_Count + 1)
'g_DutData.Dev_DataReady = True
''g_DutData.Dev_PortReady = True
''g_DutData.Dev_LastUpate = Date.Now
'tsl_dut_msg_cnt.Text = g_DutData.Dev_Info_Count
'tb_DUT_Msg.Text = strRcvData
Else
Return False
End If
Return True
End Function
''' <summary>
''' 清空DUT数据通常在发生新数据时调用
''' </summary>
Private Sub Clear_Dut_Data(Optional ByVal isClearAll As Boolean = False)
g_DutData.dev_Mac_Str = ""
g_DutData.Dev_Mac = ""
g_DutData.Dev_Version = ""
g_DutData.Dev_Voltage = 0
g_DutData.Dev_Humiture = 0
g_DutData.Dev_Temprature_F = 0
g_DutData.Dev_Temprature_C = 0
g_DutData.Dev_PIR = False
g_DutData.Dev_KeyLeft = False
g_DutData.Dev_KeyRight = False
'g_Auts_RunData.Ble_Mac = ""
'g_Auts_RunData.Ble_Rssi = -127
If isClearAll Then
g_DutData.KeyVal_Left_Last = False
g_DutData.KeyVal_Right_Last = False
g_DutData.PirVal_Last = False
g_DutData.KeyPressCnt_Left = 0
g_DutData.KeyPressCnt_Right = 0
g_DutData.PirTrigCnt = 0
g_DutData.Dev_DataReady = False
End If
End Sub
Dim g_dut_find_portList As List(Of String) = New List(Of String) '保存搜索到的串口列表
Dim g_dut_find_portidx As Integer = 0 '当前列表指针
Dim g_dut_find_port_WaitCnt_100mS As Integer = 0 '串口打开后,等待一段时间看有没有数据上来
Dim g_dut_task_data_nochange_cnt_100mS As Integer = 0 '串口任务中对数据未更新进行计时超过2.5秒钟无更新则清楚数据
''' <summary>
''' 自动匹配串口
''' </summary>
''' <param name="sender"></param>
''' <param name="e"></param>
Private Sub TIM_Find_DUT_Port_Tick(sender As Object, e As EventArgs) Handles TIM_Find_DUT_Port.Tick
End Sub
Private Sub btn_FindDutPort_Click(sender As Object, e As EventArgs) Handles btn_FindDutPort.Click
TIM_Find_DUT_Port.Start()
End Sub
Private Sub TIM_DUT_TASK_Tick(sender As Object, e As EventArgs) Handles TIM_DUT_TASK.Tick
End Sub
#End Region
#Region "计数值管理"
Dim g_totalcnt_Press_Cnt As Integer = 0
Dim g_thistimecnt_Press_Cnt As Integer = 0
Dim g_lastTimePoint As DateTime
Private Sub TIM_CNT_CLEAR_Tick(sender As Object, e As EventArgs) Handles TIM_CNT_CLEAR.Tick
End Sub
Private Sub lab_Processed_Unit_Cnt_MouseDown(sender As Object, e As MouseEventArgs) Handles lab_Processed_Unit_Cnt.MouseDown
End Sub
Private Sub lab_Processed_Unit_Cnt_ThisCycle_MouseDown(sender As Object, e As MouseEventArgs) Handles lab_Processed_Unit_Cnt_ThisCycle.MouseDown
End Sub
Dim g_isLabelPrinted As Boolean = False
Private Sub TIM_PRINT_LABEL_TASK_Tick(sender As Object, e As EventArgs) Handles TIM_PRINT_LABEL_TASK.Tick
End Sub
#End Region
End Class
Public Class JsonAccessApi
''' <summary>
''' 初始化
''' </summary>
Sub New()
End Sub
Public Mars_ColorBox_BarCode As String
Public Message As String
Public Barcodeas As String
End Class