初始化提交
仓库转移到Gitea,初始化提交,可能丢失以前的git版本日志
This commit is contained in:
116
UTS_Core/UTSModule/Project/DlgCreateProject.Designer.vb
generated
Normal file
116
UTS_Core/UTSModule/Project/DlgCreateProject.Designer.vb
generated
Normal file
@@ -0,0 +1,116 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace UTSModule.Project
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class DlgCreateProject
|
||||
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.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.OK_Button = New System.Windows.Forms.Button()
|
||||
Me.Cancel_Button = New System.Windows.Forms.Button()
|
||||
Me.CboProjectName = New System.Windows.Forms.ComboBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.TableLayoutPanel1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'TableLayoutPanel1
|
||||
'
|
||||
Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.TableLayoutPanel1.ColumnCount = 2
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0)
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0)
|
||||
Me.TableLayoutPanel1.Location = New System.Drawing.Point(237, 107)
|
||||
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
|
||||
Me.TableLayoutPanel1.RowCount = 1
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
|
||||
Me.TableLayoutPanel1.Size = New System.Drawing.Size(146, 27)
|
||||
Me.TableLayoutPanel1.TabIndex = 0
|
||||
'
|
||||
'OK_Button
|
||||
'
|
||||
Me.OK_Button.Anchor = System.Windows.Forms.AnchorStyles.None
|
||||
Me.OK_Button.Location = New System.Drawing.Point(3, 3)
|
||||
Me.OK_Button.Name = "OK_Button"
|
||||
Me.OK_Button.Size = New System.Drawing.Size(67, 21)
|
||||
Me.OK_Button.TabIndex = 0
|
||||
Me.OK_Button.Text = "确定"
|
||||
'
|
||||
'Cancel_Button
|
||||
'
|
||||
Me.Cancel_Button.Anchor = System.Windows.Forms.AnchorStyles.None
|
||||
Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.Cancel_Button.Location = New System.Drawing.Point(76, 3)
|
||||
Me.Cancel_Button.Name = "Cancel_Button"
|
||||
Me.Cancel_Button.Size = New System.Drawing.Size(67, 21)
|
||||
Me.Cancel_Button.TabIndex = 1
|
||||
Me.Cancel_Button.Text = "取消"
|
||||
'
|
||||
'CboProjectName
|
||||
'
|
||||
Me.CboProjectName.FormattingEnabled = True
|
||||
Me.CboProjectName.Location = New System.Drawing.Point(83, 54)
|
||||
Me.CboProjectName.Name = "CboProjectName"
|
||||
Me.CboProjectName.Size = New System.Drawing.Size(300, 20)
|
||||
Me.CboProjectName.TabIndex = 1
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(12, 57)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(65, 12)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "项目名称:"
|
||||
'
|
||||
'DlgCreateProject
|
||||
'
|
||||
Me.AcceptButton = Me.OK_Button
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.CancelButton = Me.Cancel_Button
|
||||
Me.ClientSize = New System.Drawing.Size(395, 145)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.CboProjectName)
|
||||
Me.Controls.Add(Me.TableLayoutPanel1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||
Me.MaximizeBox = False
|
||||
Me.MinimizeBox = False
|
||||
Me.Name = "DlgCreateProject"
|
||||
Me.ShowInTaskbar = False
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "创建项目"
|
||||
Me.TableLayoutPanel1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
|
||||
Friend WithEvents OK_Button As System.Windows.Forms.Button
|
||||
Friend WithEvents Cancel_Button As System.Windows.Forms.Button
|
||||
Friend WithEvents CboProjectName As ComboBox
|
||||
Friend WithEvents Label1 As Label
|
||||
End Class
|
||||
End Namespace
|
||||
120
UTS_Core/UTSModule/Project/DlgCreateProject.resx
Normal file
120
UTS_Core/UTSModule/Project/DlgCreateProject.resx
Normal 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>
|
||||
24
UTS_Core/UTSModule/Project/DlgCreateProject.vb
Normal file
24
UTS_Core/UTSModule/Project/DlgCreateProject.vb
Normal file
@@ -0,0 +1,24 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class DlgCreateProject
|
||||
Public Property ProjectName() As String
|
||||
|
||||
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles OK_Button.Click
|
||||
If String.IsNullOrWhiteSpace(CboProjectName.Text) Then
|
||||
MsgBox($"请输入合法测试项目名称!")
|
||||
Return
|
||||
End If
|
||||
|
||||
ProjectName = CboProjectName.Text
|
||||
DialogResult = DialogResult.OK
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles Cancel_Button.Click
|
||||
DialogResult = DialogResult.Cancel
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
144
UTS_Core/UTSModule/Project/DlgLoadProject.Designer.vb
generated
Normal file
144
UTS_Core/UTSModule/Project/DlgLoadProject.Designer.vb
generated
Normal file
@@ -0,0 +1,144 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace UTSModule.Project
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class DlgLoadProject
|
||||
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.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.OK_Button = New System.Windows.Forms.Button()
|
||||
Me.Cancel_Button = New System.Windows.Forms.Button()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.CboProjectName = New System.Windows.Forms.ComboBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.CboLoadProjectMode = New System.Windows.Forms.ComboBox()
|
||||
Me.TableLayoutPanel1.SuspendLayout
|
||||
Me.SuspendLayout
|
||||
'
|
||||
'TableLayoutPanel1
|
||||
'
|
||||
Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||
Me.TableLayoutPanel1.ColumnCount = 2
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0)
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0)
|
||||
Me.TableLayoutPanel1.Location = New System.Drawing.Point(277, 89)
|
||||
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
|
||||
Me.TableLayoutPanel1.RowCount = 1
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||
Me.TableLayoutPanel1.Size = New System.Drawing.Size(146, 27)
|
||||
Me.TableLayoutPanel1.TabIndex = 0
|
||||
'
|
||||
'OK_Button
|
||||
'
|
||||
Me.OK_Button.Anchor = System.Windows.Forms.AnchorStyles.None
|
||||
Me.OK_Button.Location = New System.Drawing.Point(3, 3)
|
||||
Me.OK_Button.Name = "OK_Button"
|
||||
Me.OK_Button.Size = New System.Drawing.Size(67, 21)
|
||||
Me.OK_Button.TabIndex = 0
|
||||
Me.OK_Button.Text = "确定"
|
||||
'
|
||||
'Cancel_Button
|
||||
'
|
||||
Me.Cancel_Button.Anchor = System.Windows.Forms.AnchorStyles.None
|
||||
Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.Cancel_Button.Location = New System.Drawing.Point(76, 3)
|
||||
Me.Cancel_Button.Name = "Cancel_Button"
|
||||
Me.Cancel_Button.Size = New System.Drawing.Size(67, 21)
|
||||
Me.Cancel_Button.TabIndex = 1
|
||||
Me.Cancel_Button.Text = "取消"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = true
|
||||
Me.Label1.Location = New System.Drawing.Point(32, 56)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(65, 12)
|
||||
Me.Label1.TabIndex = 4
|
||||
Me.Label1.Text = "项目名称:"
|
||||
'
|
||||
'CboProjectName
|
||||
'
|
||||
Me.CboProjectName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboProjectName.FormattingEnabled = true
|
||||
Me.CboProjectName.IntegralHeight = false
|
||||
Me.CboProjectName.Location = New System.Drawing.Point(103, 53)
|
||||
Me.CboProjectName.MaxDropDownItems = 16
|
||||
Me.CboProjectName.Name = "CboProjectName"
|
||||
Me.CboProjectName.Size = New System.Drawing.Size(300, 20)
|
||||
Me.CboProjectName.TabIndex = 3
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = true
|
||||
Me.Label2.Location = New System.Drawing.Point(32, 30)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(65, 12)
|
||||
Me.Label2.TabIndex = 6
|
||||
Me.Label2.Text = "加载模式:"
|
||||
'
|
||||
'CboLoadProjectMode
|
||||
'
|
||||
Me.CboLoadProjectMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboLoadProjectMode.FormattingEnabled = true
|
||||
Me.CboLoadProjectMode.Location = New System.Drawing.Point(103, 27)
|
||||
Me.CboLoadProjectMode.Name = "CboLoadProjectMode"
|
||||
Me.CboLoadProjectMode.Size = New System.Drawing.Size(300, 20)
|
||||
Me.CboLoadProjectMode.TabIndex = 5
|
||||
'
|
||||
'DlgLoadProject
|
||||
'
|
||||
Me.AcceptButton = Me.OK_Button
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 12!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.CancelButton = Me.Cancel_Button
|
||||
Me.ClientSize = New System.Drawing.Size(435, 127)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.CboLoadProjectMode)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.CboProjectName)
|
||||
Me.Controls.Add(Me.TableLayoutPanel1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||
Me.MaximizeBox = false
|
||||
Me.MinimizeBox = false
|
||||
Me.Name = "DlgLoadProject"
|
||||
Me.ShowInTaskbar = false
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "DlgLoadProject"
|
||||
Me.TableLayoutPanel1.ResumeLayout(false)
|
||||
Me.ResumeLayout(false)
|
||||
Me.PerformLayout
|
||||
|
||||
End Sub
|
||||
Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
|
||||
Friend WithEvents OK_Button As System.Windows.Forms.Button
|
||||
Friend WithEvents Cancel_Button As System.Windows.Forms.Button
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents CboProjectName As ComboBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents CboLoadProjectMode As ComboBox
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
120
UTS_Core/UTSModule/Project/DlgLoadProject.resx
Normal file
120
UTS_Core/UTSModule/Project/DlgLoadProject.resx
Normal 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>
|
||||
47
UTS_Core/UTSModule/Project/DlgLoadProject.vb
Normal file
47
UTS_Core/UTSModule/Project/DlgLoadProject.vb
Normal file
@@ -0,0 +1,47 @@
|
||||
Imports System.Windows.Forms
|
||||
Imports UTS_Core.EnumExtend
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class DlgLoadProject
|
||||
Public Property LoadMode As ProjectInfo.InitializeModeEnum = ProjectInfo.InitializeModeEnum.RemoteDatabaseLoad
|
||||
|
||||
Public Property ProjectName() As String
|
||||
|
||||
Private Sub UpdateProjectCombobox()
|
||||
CboProjectName.Items.Clear()
|
||||
CboProjectName.Items.AddRange(ProjectInfo.LoadProjectList(LoadMode))
|
||||
If CboProjectName.Items.Count > 0 Then CboProjectName.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub DlgLoadProject_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
Text = $"加载项目"
|
||||
|
||||
CboLoadProjectMode.Items.Clear()
|
||||
CboLoadProjectMode.Items.AddRange(EnumExtender.GetEnumAllDesc(GetType(ProjectInfo.InitializeModeEnum)))
|
||||
CboLoadProjectMode.SelectedIndex = LoadMode
|
||||
|
||||
UpdateProjectCombobox()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles OK_Button.Click
|
||||
ProjectName = CboProjectName.Text
|
||||
|
||||
DialogResult = DialogResult.OK
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles Cancel_Button.Click
|
||||
DialogResult = DialogResult.Cancel
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub CboLoadProjectMode_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboLoadProjectMode.SelectedIndexChanged
|
||||
If LoadMode <> CboLoadProjectMode.SelectedIndex Then
|
||||
LoadMode = CType([Enum].Parse(GetType(ProjectInfo.InitializeModeEnum), CboLoadProjectMode.SelectedIndex.ToString()), ProjectInfo.InitializeModeEnum)
|
||||
|
||||
UpdateProjectCombobox()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
249
UTS_Core/UTSModule/Project/DlgLoadStation.Designer.vb
generated
Normal file
249
UTS_Core/UTSModule/Project/DlgLoadStation.Designer.vb
generated
Normal file
@@ -0,0 +1,249 @@
|
||||
|
||||
Namespace UTSModule.Project
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class DlgLoadStation
|
||||
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.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
|
||||
Me.OK_Button = New System.Windows.Forms.Button()
|
||||
Me.Cancel_Button = New System.Windows.Forms.Button()
|
||||
Me.PicStationPreview = New System.Windows.Forms.PictureBox()
|
||||
Me.CboStation = New System.Windows.Forms.ComboBox()
|
||||
Me.LblStation = New System.Windows.Forms.Label()
|
||||
Me.CboProject = New System.Windows.Forms.ComboBox()
|
||||
Me.LblProject = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.GrpStationDesc = New System.Windows.Forms.GroupBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.RtxStationDesc = New System.Windows.Forms.RichTextBox()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.RtxProjectDesc = New System.Windows.Forms.RichTextBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.TableLayoutPanel1.SuspendLayout
|
||||
CType(Me.PicStationPreview,System.ComponentModel.ISupportInitialize).BeginInit
|
||||
Me.GrpStationDesc.SuspendLayout
|
||||
Me.GroupBox1.SuspendLayout
|
||||
Me.SuspendLayout
|
||||
'
|
||||
'TableLayoutPanel1
|
||||
'
|
||||
Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||
Me.TableLayoutPanel1.ColumnCount = 2
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0)
|
||||
Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0)
|
||||
Me.TableLayoutPanel1.Location = New System.Drawing.Point(534, 430)
|
||||
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
|
||||
Me.TableLayoutPanel1.RowCount = 1
|
||||
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50!))
|
||||
Me.TableLayoutPanel1.Size = New System.Drawing.Size(240, 39)
|
||||
Me.TableLayoutPanel1.TabIndex = 0
|
||||
'
|
||||
'OK_Button
|
||||
'
|
||||
Me.OK_Button.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.OK_Button.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.OK_Button.Location = New System.Drawing.Point(3, 3)
|
||||
Me.OK_Button.Name = "OK_Button"
|
||||
Me.OK_Button.Size = New System.Drawing.Size(114, 33)
|
||||
Me.OK_Button.TabIndex = 0
|
||||
Me.OK_Button.Text = "确定"
|
||||
'
|
||||
'Cancel_Button
|
||||
'
|
||||
Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.Cancel_Button.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Cancel_Button.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.Cancel_Button.Location = New System.Drawing.Point(123, 3)
|
||||
Me.Cancel_Button.Name = "Cancel_Button"
|
||||
Me.Cancel_Button.Size = New System.Drawing.Size(114, 33)
|
||||
Me.Cancel_Button.TabIndex = 1
|
||||
Me.Cancel_Button.Text = "取消"
|
||||
'
|
||||
'PicStationPreview
|
||||
'
|
||||
Me.PicStationPreview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.PicStationPreview.Location = New System.Drawing.Point(24, 181)
|
||||
Me.PicStationPreview.Name = "PicStationPreview"
|
||||
Me.PicStationPreview.Size = New System.Drawing.Size(200, 200)
|
||||
Me.PicStationPreview.TabIndex = 5
|
||||
Me.PicStationPreview.TabStop = false
|
||||
'
|
||||
'CboStation
|
||||
'
|
||||
Me.CboStation.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.CboStation.FormattingEnabled = true
|
||||
Me.CboStation.Location = New System.Drawing.Point(24, 49)
|
||||
Me.CboStation.Name = "CboStation"
|
||||
Me.CboStation.Size = New System.Drawing.Size(200, 24)
|
||||
Me.CboStation.TabIndex = 9
|
||||
'
|
||||
'LblStation
|
||||
'
|
||||
Me.LblStation.AutoSize = true
|
||||
Me.LblStation.Location = New System.Drawing.Point(6, 27)
|
||||
Me.LblStation.Name = "LblStation"
|
||||
Me.LblStation.Size = New System.Drawing.Size(41, 12)
|
||||
Me.LblStation.TabIndex = 8
|
||||
Me.LblStation.Text = "站位:"
|
||||
'
|
||||
'CboProject
|
||||
'
|
||||
Me.CboProject.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.CboProject.FormattingEnabled = true
|
||||
Me.CboProject.Location = New System.Drawing.Point(24, 49)
|
||||
Me.CboProject.Name = "CboProject"
|
||||
Me.CboProject.Size = New System.Drawing.Size(200, 24)
|
||||
Me.CboProject.TabIndex = 7
|
||||
'
|
||||
'LblProject
|
||||
'
|
||||
Me.LblProject.AutoSize = true
|
||||
Me.LblProject.Location = New System.Drawing.Point(6, 27)
|
||||
Me.LblProject.Name = "LblProject"
|
||||
Me.LblProject.Size = New System.Drawing.Size(41, 12)
|
||||
Me.LblProject.TabIndex = 6
|
||||
Me.LblProject.Text = "项目:"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = true
|
||||
Me.Label1.Location = New System.Drawing.Point(6, 166)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(41, 12)
|
||||
Me.Label1.TabIndex = 10
|
||||
Me.Label1.Text = "预览:"
|
||||
'
|
||||
'GrpStationDesc
|
||||
'
|
||||
Me.GrpStationDesc.Controls.Add(Me.Label3)
|
||||
Me.GrpStationDesc.Controls.Add(Me.RtxStationDesc)
|
||||
Me.GrpStationDesc.Controls.Add(Me.CboStation)
|
||||
Me.GrpStationDesc.Controls.Add(Me.LblStation)
|
||||
Me.GrpStationDesc.Location = New System.Drawing.Point(291, 15)
|
||||
Me.GrpStationDesc.Name = "GrpStationDesc"
|
||||
Me.GrpStationDesc.Size = New System.Drawing.Size(483, 400)
|
||||
Me.GrpStationDesc.TabIndex = 11
|
||||
Me.GrpStationDesc.TabStop = false
|
||||
Me.GrpStationDesc.Text = "站位描述"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = true
|
||||
Me.Label3.Location = New System.Drawing.Point(6, 82)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(41, 12)
|
||||
Me.Label3.TabIndex = 11
|
||||
Me.Label3.Text = "简介:"
|
||||
'
|
||||
'RtxStationDesc
|
||||
'
|
||||
Me.RtxStationDesc.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxStationDesc.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.RtxStationDesc.ForeColor = System.Drawing.Color.Gray
|
||||
Me.RtxStationDesc.Location = New System.Drawing.Point(24, 97)
|
||||
Me.RtxStationDesc.Name = "RtxStationDesc"
|
||||
Me.RtxStationDesc.ReadOnly = true
|
||||
Me.RtxStationDesc.Size = New System.Drawing.Size(434, 284)
|
||||
Me.RtxStationDesc.TabIndex = 10
|
||||
Me.RtxStationDesc.Text = ""
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.Add(Me.RtxProjectDesc)
|
||||
Me.GroupBox1.Controls.Add(Me.Label2)
|
||||
Me.GroupBox1.Controls.Add(Me.CboProject)
|
||||
Me.GroupBox1.Controls.Add(Me.Label1)
|
||||
Me.GroupBox1.Controls.Add(Me.LblProject)
|
||||
Me.GroupBox1.Controls.Add(Me.PicStationPreview)
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(23, 15)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(240, 400)
|
||||
Me.GroupBox1.TabIndex = 12
|
||||
Me.GroupBox1.TabStop = false
|
||||
Me.GroupBox1.Text = "项目描述"
|
||||
'
|
||||
'RtxProjectDesc
|
||||
'
|
||||
Me.RtxProjectDesc.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxProjectDesc.Font = New System.Drawing.Font("宋体", 12!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134,Byte))
|
||||
Me.RtxProjectDesc.Location = New System.Drawing.Point(24, 97)
|
||||
Me.RtxProjectDesc.Name = "RtxProjectDesc"
|
||||
Me.RtxProjectDesc.ReadOnly = true
|
||||
Me.RtxProjectDesc.Size = New System.Drawing.Size(200, 57)
|
||||
Me.RtxProjectDesc.TabIndex = 12
|
||||
Me.RtxProjectDesc.Text = ""
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = true
|
||||
Me.Label2.Location = New System.Drawing.Point(6, 82)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(41, 12)
|
||||
Me.Label2.TabIndex = 8
|
||||
Me.Label2.Text = "简介:"
|
||||
'
|
||||
'DlgLoadStation
|
||||
'
|
||||
Me.AcceptButton = Me.OK_Button
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6!, 12!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.CancelButton = Me.Cancel_Button
|
||||
Me.ClientSize = New System.Drawing.Size(794, 470)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
Me.Controls.Add(Me.GrpStationDesc)
|
||||
Me.Controls.Add(Me.TableLayoutPanel1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
|
||||
Me.MaximizeBox = false
|
||||
Me.MinimizeBox = false
|
||||
Me.Name = "DlgLoadStation"
|
||||
Me.ShowInTaskbar = false
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
|
||||
Me.Text = "DlgLoadStation"
|
||||
Me.TableLayoutPanel1.ResumeLayout(false)
|
||||
CType(Me.PicStationPreview,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.GrpStationDesc.ResumeLayout(false)
|
||||
Me.GrpStationDesc.PerformLayout
|
||||
Me.GroupBox1.ResumeLayout(false)
|
||||
Me.GroupBox1.PerformLayout
|
||||
Me.ResumeLayout(false)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
|
||||
Friend WithEvents OK_Button As System.Windows.Forms.Button
|
||||
Friend WithEvents Cancel_Button As System.Windows.Forms.Button
|
||||
Friend WithEvents PicStationPreview As Windows.Forms.PictureBox
|
||||
Friend WithEvents CboStation As Windows.Forms.ComboBox
|
||||
Friend WithEvents LblStation As Windows.Forms.Label
|
||||
Friend WithEvents CboProject As Windows.Forms.ComboBox
|
||||
Friend WithEvents LblProject As Windows.Forms.Label
|
||||
Friend WithEvents Label1 As Windows.Forms.Label
|
||||
Friend WithEvents GrpStationDesc As Windows.Forms.GroupBox
|
||||
Friend WithEvents GroupBox1 As Windows.Forms.GroupBox
|
||||
Friend WithEvents Label2 As Windows.Forms.Label
|
||||
Friend WithEvents Label3 As Windows.Forms.Label
|
||||
Friend WithEvents RtxStationDesc As Windows.Forms.RichTextBox
|
||||
Friend WithEvents RtxProjectDesc As Windows.Forms.RichTextBox
|
||||
End Class
|
||||
End Namespace
|
||||
120
UTS_Core/UTSModule/Project/DlgLoadStation.resx
Normal file
120
UTS_Core/UTSModule/Project/DlgLoadStation.resx
Normal 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>
|
||||
134
UTS_Core/UTSModule/Project/DlgLoadStation.vb
Normal file
134
UTS_Core/UTSModule/Project/DlgLoadStation.vb
Normal file
@@ -0,0 +1,134 @@
|
||||
Imports System.Drawing
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class DlgLoadStation
|
||||
Public Property StationInfo() As StationInfo
|
||||
Public Property UserInfo() As Login.UserInfo
|
||||
|
||||
Private _projectInfo As ProjectInfo
|
||||
|
||||
Private _projectName As String
|
||||
|
||||
Private _stationName As String
|
||||
|
||||
Public Function InitProjectStationInfoWithoutShow(projectName As String, stationName As String) As Boolean
|
||||
Dim projectList As String() = ProjectInfo.LoadProjectList(ProjectInfo.InitializeModeEnum.LocalDatabaseLoad)
|
||||
If projectList.Contains(projectName) = False Then Return False
|
||||
|
||||
_projectInfo = New ProjectInfo(UserInfo.UserId, projectName, ProjectInfo.InitializeModeEnum.LocalDatabaseLoad)
|
||||
For Each projectStationInfo As StationInfo In _projectInfo.Station
|
||||
If projectStationInfo.Name = stationName Then
|
||||
StationInfo = projectStationInfo
|
||||
StationInfo.UserId = UserInfo.UserId
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Return StationInfo IsNot Nothing
|
||||
End Function
|
||||
|
||||
Public Overloads Function ShowDialog(projectName As String, stationName As String) As DialogResult
|
||||
_projectName = projectName
|
||||
_stationName = stationName
|
||||
Return Me.ShowDialog
|
||||
End Function
|
||||
|
||||
Private Sub OK_Button_Click(ByVal sender As Object, ByVal e As EventArgs) Handles OK_Button.Click
|
||||
DialogResult = DialogResult.OK
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub Cancel_Button_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Cancel_Button.Click
|
||||
DialogResult = DialogResult.Cancel
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub InitPreviewImage()
|
||||
PicStationPreview.SizeMode = PictureBoxSizeMode.StretchImage
|
||||
End Sub
|
||||
|
||||
Private Sub InitializeForm()
|
||||
Text = $"请选择需要加载的项目"
|
||||
End Sub
|
||||
|
||||
Private Sub DlgLoadStation_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
InitializeForm()
|
||||
InitPreviewImage()
|
||||
UpdateProjectList()
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateProjectList()
|
||||
CboProject.Items.Clear()
|
||||
CboProject.Items.AddRange(ProjectInfo.LoadProjectList(ProjectInfo.InitializeModeEnum.LocalDatabaseLoad))
|
||||
|
||||
If String.IsNullOrEmpty(_projectName) = False Then
|
||||
For i As Integer = 0 To CboProject.Items.Count - 1
|
||||
If CboProject.Items(i).ToString() = _projectName Then
|
||||
CboProject.SelectedIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If CboProject.Items.Count > 0 Then CboProject.SelectedIndex = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateProjectStation(stations As List(Of StationInfo))
|
||||
CboStation.Items.Clear()
|
||||
|
||||
For Each station As StationInfo In stations
|
||||
CboStation.Items.Add(station.Name)
|
||||
Next
|
||||
|
||||
|
||||
'添加所有站位描述
|
||||
RtxStationDesc.SuspendLayout()
|
||||
RtxStationDesc.Clear()
|
||||
For Each station As StationInfo In stations
|
||||
RtxStationDesc.AppendText($"{station.Name}:{station.Description}{vbNewLine}")
|
||||
Next
|
||||
RtxStationDesc.ResumeLayout(False)
|
||||
RtxStationDesc.PerformLayout()
|
||||
|
||||
If String.IsNullOrEmpty(_stationName) = False Then
|
||||
For i As Integer = 0 To CboStation.Items.Count - 1
|
||||
If CboStation.Items(i).ToString() = _stationName Then
|
||||
CboStation.SelectedIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
If CboStation.Items.Count > 0 Then CboStation.SelectedIndex = 0
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CboProject_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboProject.SelectedIndexChanged
|
||||
_projectInfo = New ProjectInfo(UserInfo.UserId, CboProject.Text, ProjectInfo.InitializeModeEnum.LocalDatabaseLoad)
|
||||
|
||||
RtxProjectDesc.Text = _projectInfo.Description
|
||||
|
||||
If _projectInfo.PreviewImage IsNot Nothing Then
|
||||
PicStationPreview.Image = _projectInfo.PreviewImage
|
||||
End If
|
||||
|
||||
UpdateProjectStation(_projectInfo.Station)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CboStation_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CboStation.SelectedIndexChanged
|
||||
Dim selectIndex As Integer = CboStation.SelectedIndex
|
||||
StationInfo = _projectInfo.Station.Item(selectIndex)
|
||||
StationInfo.UserId = UserInfo.UserId
|
||||
|
||||
Static lastSelectIndex As Integer = 0
|
||||
RtxStationDesc.Select(RtxStationDesc.GetFirstCharIndexFromLine(lastSelectIndex), RtxStationDesc.Lines(lastSelectIndex).Length)
|
||||
RtxStationDesc.SelectionColor = Color.Gray
|
||||
lastSelectIndex = selectIndex
|
||||
|
||||
|
||||
RtxStationDesc.Select(RtxStationDesc.GetFirstCharIndexFromLine(selectIndex), RtxStationDesc.Lines(selectIndex).Length)
|
||||
RtxStationDesc.SelectionColor = Color.Blue
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
479
UTS_Core/UTSModule/Project/FrmProject.Designer.vb
generated
Normal file
479
UTS_Core/UTSModule/Project/FrmProject.Designer.vb
generated
Normal file
@@ -0,0 +1,479 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace UTSModule.Project
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class FrmProject
|
||||
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(FrmProject))
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.TsBtnNewProject = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnLoadProject = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnCloneProject = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnSaveProject = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnReleaseProject = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnDeleteProject = New System.Windows.Forms.ToolStripButton()
|
||||
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.Panel1 = New System.Windows.Forms.Panel()
|
||||
Me.RadTestCreate = New System.Windows.Forms.RadioButton()
|
||||
Me.RadOrderCreate = New System.Windows.Forms.RadioButton()
|
||||
Me.CboProjectType = New System.Windows.Forms.ComboBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.DtpValidDate = New System.Windows.Forms.DateTimePicker()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.NudPrice = New System.Windows.Forms.NumericUpDown()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.TxtRemark = New System.Windows.Forms.TextBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
|
||||
Me.PicProject = New System.Windows.Forms.PictureBox()
|
||||
Me.TxtDescription = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.TxtProjectName = New System.Windows.Forms.TextBox()
|
||||
Me.LblProjectNameTip = New System.Windows.Forms.Label()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.GrdStations = New FlexCell.Grid()
|
||||
Me.CtmStation = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.TsmAddStation = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TsmRemoveStation = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TsmMoveUpStation = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.TsmMoveDownStation = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MsiStationPreview = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.SplProject = New System.Windows.Forms.SplitContainer()
|
||||
Me.ToolStrip1.SuspendLayout()
|
||||
Me.GroupBox2.SuspendLayout()
|
||||
Me.Panel1.SuspendLayout()
|
||||
CType(Me.NudPrice, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.GroupBox3.SuspendLayout()
|
||||
CType(Me.PicProject, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.CtmStation.SuspendLayout()
|
||||
CType(Me.SplProject, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplProject.Panel1.SuspendLayout()
|
||||
Me.SplProject.Panel2.SuspendLayout()
|
||||
Me.SplProject.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsBtnNewProject, Me.TsBtnLoadProject, Me.TsBtnCloneProject, Me.TsBtnSaveProject, Me.TsBtnReleaseProject, Me.TsBtnDeleteProject})
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(670, 40)
|
||||
Me.ToolStrip1.TabIndex = 3
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'TsBtnNewProject
|
||||
'
|
||||
Me.TsBtnNewProject.Image = CType(resources.GetObject("TsBtnNewProject.Image"), System.Drawing.Image)
|
||||
Me.TsBtnNewProject.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnNewProject.Name = "TsBtnNewProject"
|
||||
Me.TsBtnNewProject.Size = New System.Drawing.Size(60, 37)
|
||||
Me.TsBtnNewProject.Text = "新建项目"
|
||||
Me.TsBtnNewProject.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
|
||||
'
|
||||
'TsBtnLoadProject
|
||||
'
|
||||
Me.TsBtnLoadProject.Image = CType(resources.GetObject("TsBtnLoadProject.Image"), System.Drawing.Image)
|
||||
Me.TsBtnLoadProject.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnLoadProject.Name = "TsBtnLoadProject"
|
||||
Me.TsBtnLoadProject.Size = New System.Drawing.Size(60, 37)
|
||||
Me.TsBtnLoadProject.Text = "加载项目"
|
||||
Me.TsBtnLoadProject.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
|
||||
'
|
||||
'TsBtnCloneProject
|
||||
'
|
||||
Me.TsBtnCloneProject.Image = CType(resources.GetObject("TsBtnCloneProject.Image"), System.Drawing.Image)
|
||||
Me.TsBtnCloneProject.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnCloneProject.Name = "TsBtnCloneProject"
|
||||
Me.TsBtnCloneProject.Size = New System.Drawing.Size(60, 37)
|
||||
Me.TsBtnCloneProject.Text = "克隆项目"
|
||||
Me.TsBtnCloneProject.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
|
||||
'
|
||||
'TsBtnSaveProject
|
||||
'
|
||||
Me.TsBtnSaveProject.Image = CType(resources.GetObject("TsBtnSaveProject.Image"), System.Drawing.Image)
|
||||
Me.TsBtnSaveProject.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnSaveProject.Name = "TsBtnSaveProject"
|
||||
Me.TsBtnSaveProject.Size = New System.Drawing.Size(60, 37)
|
||||
Me.TsBtnSaveProject.Text = "保存项目"
|
||||
Me.TsBtnSaveProject.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
|
||||
'
|
||||
'TsBtnReleaseProject
|
||||
'
|
||||
Me.TsBtnReleaseProject.Image = CType(resources.GetObject("TsBtnReleaseProject.Image"), System.Drawing.Image)
|
||||
Me.TsBtnReleaseProject.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnReleaseProject.Name = "TsBtnReleaseProject"
|
||||
Me.TsBtnReleaseProject.Size = New System.Drawing.Size(60, 37)
|
||||
Me.TsBtnReleaseProject.Text = "发布项目"
|
||||
Me.TsBtnReleaseProject.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
|
||||
'
|
||||
'TsBtnDeleteProject
|
||||
'
|
||||
Me.TsBtnDeleteProject.ForeColor = System.Drawing.Color.Black
|
||||
Me.TsBtnDeleteProject.Image = CType(resources.GetObject("TsBtnDeleteProject.Image"), System.Drawing.Image)
|
||||
Me.TsBtnDeleteProject.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnDeleteProject.Name = "TsBtnDeleteProject"
|
||||
Me.TsBtnDeleteProject.Size = New System.Drawing.Size(60, 37)
|
||||
Me.TsBtnDeleteProject.Text = "删除项目"
|
||||
Me.TsBtnDeleteProject.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Controls.Add(Me.Label6)
|
||||
Me.GroupBox2.Controls.Add(Me.Panel1)
|
||||
Me.GroupBox2.Controls.Add(Me.CboProjectType)
|
||||
Me.GroupBox2.Controls.Add(Me.Label4)
|
||||
Me.GroupBox2.Controls.Add(Me.DtpValidDate)
|
||||
Me.GroupBox2.Controls.Add(Me.Label5)
|
||||
Me.GroupBox2.Controls.Add(Me.NudPrice)
|
||||
Me.GroupBox2.Controls.Add(Me.Label3)
|
||||
Me.GroupBox2.Controls.Add(Me.TxtRemark)
|
||||
Me.GroupBox2.Controls.Add(Me.Label2)
|
||||
Me.GroupBox2.Controls.Add(Me.GroupBox3)
|
||||
Me.GroupBox2.Controls.Add(Me.TxtDescription)
|
||||
Me.GroupBox2.Controls.Add(Me.Label1)
|
||||
Me.GroupBox2.Controls.Add(Me.TxtProjectName)
|
||||
Me.GroupBox2.Controls.Add(Me.LblProjectNameTip)
|
||||
Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(670, 199)
|
||||
Me.GroupBox2.TabIndex = 5
|
||||
Me.GroupBox2.TabStop = False
|
||||
Me.GroupBox2.Text = "项目信息"
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.AutoSize = True
|
||||
Me.Label6.Location = New System.Drawing.Point(2, 74)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label6.TabIndex = 25
|
||||
Me.Label6.Text = "条码规则:"
|
||||
'
|
||||
'Panel1
|
||||
'
|
||||
Me.Panel1.Controls.Add(Me.RadTestCreate)
|
||||
Me.Panel1.Controls.Add(Me.RadOrderCreate)
|
||||
Me.Panel1.Location = New System.Drawing.Point(66, 69)
|
||||
Me.Panel1.Name = "Panel1"
|
||||
Me.Panel1.Size = New System.Drawing.Size(318, 22)
|
||||
Me.Panel1.TabIndex = 24
|
||||
'
|
||||
'RadTestCreate
|
||||
'
|
||||
Me.RadTestCreate.AutoSize = True
|
||||
Me.RadTestCreate.Location = New System.Drawing.Point(200, 3)
|
||||
Me.RadTestCreate.Name = "RadTestCreate"
|
||||
Me.RadTestCreate.Size = New System.Drawing.Size(83, 16)
|
||||
Me.RadTestCreate.TabIndex = 1
|
||||
Me.RadTestCreate.Text = "测试时生成"
|
||||
Me.RadTestCreate.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RadOrderCreate
|
||||
'
|
||||
Me.RadOrderCreate.AutoSize = True
|
||||
Me.RadOrderCreate.Checked = True
|
||||
Me.RadOrderCreate.Location = New System.Drawing.Point(3, 3)
|
||||
Me.RadOrderCreate.Name = "RadOrderCreate"
|
||||
Me.RadOrderCreate.Size = New System.Drawing.Size(95, 16)
|
||||
Me.RadOrderCreate.TabIndex = 0
|
||||
Me.RadOrderCreate.TabStop = True
|
||||
Me.RadOrderCreate.Text = "跟随订单生成"
|
||||
Me.RadOrderCreate.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CboProjectType
|
||||
'
|
||||
Me.CboProjectType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.CboProjectType.FormattingEnabled = True
|
||||
Me.CboProjectType.Location = New System.Drawing.Point(264, 19)
|
||||
Me.CboProjectType.Name = "CboProjectType"
|
||||
Me.CboProjectType.Size = New System.Drawing.Size(120, 20)
|
||||
Me.CboProjectType.TabIndex = 23
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(223, 22)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(35, 12)
|
||||
Me.Label4.TabIndex = 22
|
||||
Me.Label4.Text = "类型:"
|
||||
'
|
||||
'DtpValidDate
|
||||
'
|
||||
Me.DtpValidDate.CustomFormat = "yyyy-MM-dd"
|
||||
Me.DtpValidDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom
|
||||
Me.DtpValidDate.Location = New System.Drawing.Point(66, 45)
|
||||
Me.DtpValidDate.Name = "DtpValidDate"
|
||||
Me.DtpValidDate.Size = New System.Drawing.Size(134, 21)
|
||||
Me.DtpValidDate.TabIndex = 21
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Location = New System.Drawing.Point(13, 51)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(47, 12)
|
||||
Me.Label5.TabIndex = 20
|
||||
Me.Label5.Text = "有效至:"
|
||||
'
|
||||
'NudPrice
|
||||
'
|
||||
Me.NudPrice.DecimalPlaces = 2
|
||||
Me.NudPrice.Location = New System.Drawing.Point(264, 45)
|
||||
Me.NudPrice.Maximum = New Decimal(New Integer() {20200202, 0, 0, 0})
|
||||
Me.NudPrice.Name = "NudPrice"
|
||||
Me.NudPrice.Size = New System.Drawing.Size(120, 21)
|
||||
Me.NudPrice.TabIndex = 9
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(223, 47)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(35, 12)
|
||||
Me.Label3.TabIndex = 8
|
||||
Me.Label3.Text = "单价:"
|
||||
'
|
||||
'TxtRemark
|
||||
'
|
||||
Me.TxtRemark.Location = New System.Drawing.Point(66, 163)
|
||||
Me.TxtRemark.Multiline = True
|
||||
Me.TxtRemark.Name = "TxtRemark"
|
||||
Me.TxtRemark.Size = New System.Drawing.Size(318, 32)
|
||||
Me.TxtRemark.TabIndex = 7
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(25, 163)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(35, 12)
|
||||
Me.Label2.TabIndex = 6
|
||||
Me.Label2.Text = "备注:"
|
||||
'
|
||||
'GroupBox3
|
||||
'
|
||||
Me.GroupBox3.Controls.Add(Me.PicProject)
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(411, 11)
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(237, 184)
|
||||
Me.GroupBox3.TabIndex = 5
|
||||
Me.GroupBox3.TabStop = False
|
||||
Me.GroupBox3.Text = "项目图像"
|
||||
'
|
||||
'PicProject
|
||||
'
|
||||
Me.PicProject.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.PicProject.Location = New System.Drawing.Point(3, 17)
|
||||
Me.PicProject.Name = "PicProject"
|
||||
Me.PicProject.Size = New System.Drawing.Size(231, 164)
|
||||
Me.PicProject.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
Me.PicProject.TabIndex = 4
|
||||
Me.PicProject.TabStop = False
|
||||
'
|
||||
'TxtDescription
|
||||
'
|
||||
Me.TxtDescription.Location = New System.Drawing.Point(66, 94)
|
||||
Me.TxtDescription.Multiline = True
|
||||
Me.TxtDescription.Name = "TxtDescription"
|
||||
Me.TxtDescription.Size = New System.Drawing.Size(318, 64)
|
||||
Me.TxtDescription.TabIndex = 3
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(25, 94)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(35, 12)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "描述:"
|
||||
'
|
||||
'TxtProjectName
|
||||
'
|
||||
Me.TxtProjectName.Location = New System.Drawing.Point(66, 19)
|
||||
Me.TxtProjectName.Name = "TxtProjectName"
|
||||
Me.TxtProjectName.Size = New System.Drawing.Size(134, 21)
|
||||
Me.TxtProjectName.TabIndex = 1
|
||||
'
|
||||
'LblProjectNameTip
|
||||
'
|
||||
Me.LblProjectNameTip.AutoSize = True
|
||||
Me.LblProjectNameTip.Location = New System.Drawing.Point(25, 22)
|
||||
Me.LblProjectNameTip.Name = "LblProjectNameTip"
|
||||
Me.LblProjectNameTip.Size = New System.Drawing.Size(35, 12)
|
||||
Me.LblProjectNameTip.TabIndex = 0
|
||||
Me.LblProjectNameTip.Text = "名称:"
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.Add(Me.GrdStations)
|
||||
Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(670, 253)
|
||||
Me.GroupBox1.TabIndex = 6
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "测试站信息"
|
||||
'
|
||||
'GrdStations
|
||||
'
|
||||
Me.GrdStations.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdStations.CheckedImage = Nothing
|
||||
Me.GrdStations.ContextMenuStrip = Me.CtmStation
|
||||
Me.GrdStations.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdStations.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdStations.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdStations.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdStations.Location = New System.Drawing.Point(3, 17)
|
||||
Me.GrdStations.MultiSelect = False
|
||||
Me.GrdStations.Name = "GrdStations"
|
||||
Me.GrdStations.Size = New System.Drawing.Size(664, 233)
|
||||
Me.GrdStations.TabIndex = 1
|
||||
Me.GrdStations.UncheckedImage = Nothing
|
||||
'
|
||||
'CtmStation
|
||||
'
|
||||
Me.CtmStation.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsmAddStation, Me.TsmRemoveStation, Me.TsmMoveUpStation, Me.TsmMoveDownStation, Me.MsiStationPreview})
|
||||
Me.CtmStation.Name = "CtmStation"
|
||||
Me.CtmStation.Size = New System.Drawing.Size(130, 114)
|
||||
'
|
||||
'TsmAddStation
|
||||
'
|
||||
Me.TsmAddStation.Name = "TsmAddStation"
|
||||
Me.TsmAddStation.Size = New System.Drawing.Size(129, 22)
|
||||
Me.TsmAddStation.Text = "(&A)添加站"
|
||||
'
|
||||
'TsmRemoveStation
|
||||
'
|
||||
Me.TsmRemoveStation.Name = "TsmRemoveStation"
|
||||
Me.TsmRemoveStation.Size = New System.Drawing.Size(129, 22)
|
||||
Me.TsmRemoveStation.Text = "(R)删除站"
|
||||
'
|
||||
'TsmMoveUpStation
|
||||
'
|
||||
Me.TsmMoveUpStation.Name = "TsmMoveUpStation"
|
||||
Me.TsmMoveUpStation.Size = New System.Drawing.Size(129, 22)
|
||||
Me.TsmMoveUpStation.Text = "(U)上移站"
|
||||
'
|
||||
'TsmMoveDownStation
|
||||
'
|
||||
Me.TsmMoveDownStation.Name = "TsmMoveDownStation"
|
||||
Me.TsmMoveDownStation.Size = New System.Drawing.Size(129, 22)
|
||||
Me.TsmMoveDownStation.Text = "(D)下移站"
|
||||
'
|
||||
'MsiStationPreview
|
||||
'
|
||||
Me.MsiStationPreview.Name = "MsiStationPreview"
|
||||
Me.MsiStationPreview.Size = New System.Drawing.Size(129, 22)
|
||||
Me.MsiStationPreview.Text = "(&P)预览图"
|
||||
'
|
||||
'SplProject
|
||||
'
|
||||
Me.SplProject.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplProject.Location = New System.Drawing.Point(0, 40)
|
||||
Me.SplProject.Name = "SplProject"
|
||||
Me.SplProject.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplProject.Panel1
|
||||
'
|
||||
Me.SplProject.Panel1.Controls.Add(Me.GroupBox2)
|
||||
'
|
||||
'SplProject.Panel2
|
||||
'
|
||||
Me.SplProject.Panel2.Controls.Add(Me.GroupBox1)
|
||||
Me.SplProject.Size = New System.Drawing.Size(670, 456)
|
||||
Me.SplProject.SplitterDistance = 199
|
||||
Me.SplProject.TabIndex = 7
|
||||
'
|
||||
'FrmProject
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(670, 496)
|
||||
Me.Controls.Add(Me.SplProject)
|
||||
Me.Controls.Add(Me.ToolStrip1)
|
||||
Me.Name = "FrmProject"
|
||||
Me.Text = "FrmProject"
|
||||
Me.ToolStrip1.ResumeLayout(False)
|
||||
Me.ToolStrip1.PerformLayout()
|
||||
Me.GroupBox2.ResumeLayout(False)
|
||||
Me.GroupBox2.PerformLayout()
|
||||
Me.Panel1.ResumeLayout(False)
|
||||
Me.Panel1.PerformLayout()
|
||||
CType(Me.NudPrice, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.GroupBox3.ResumeLayout(False)
|
||||
CType(Me.PicProject, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.CtmStation.ResumeLayout(False)
|
||||
Me.SplProject.Panel1.ResumeLayout(False)
|
||||
Me.SplProject.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplProject, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplProject.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ToolStrip1 As ToolStrip
|
||||
Friend WithEvents TsBtnNewProject As ToolStripButton
|
||||
Friend WithEvents TsBtnLoadProject As ToolStripButton
|
||||
Friend WithEvents TsBtnSaveProject As ToolStripButton
|
||||
Friend WithEvents TsBtnReleaseProject As ToolStripButton
|
||||
Friend WithEvents GroupBox2 As GroupBox
|
||||
Friend WithEvents TxtDescription As TextBox
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents TxtProjectName As TextBox
|
||||
Friend WithEvents LblProjectNameTip As Label
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents GrdStations As FlexCell.Grid
|
||||
Friend WithEvents SplProject As SplitContainer
|
||||
Friend WithEvents CtmStation As ContextMenuStrip
|
||||
Friend WithEvents TsmAddStation As ToolStripMenuItem
|
||||
Friend WithEvents TsmRemoveStation As ToolStripMenuItem
|
||||
Friend WithEvents TsmMoveUpStation As ToolStripMenuItem
|
||||
Friend WithEvents TsmMoveDownStation As ToolStripMenuItem
|
||||
Friend WithEvents TsBtnDeleteProject As ToolStripButton
|
||||
Friend WithEvents PicProject As PictureBox
|
||||
Friend WithEvents MsiStationPreview As ToolStripMenuItem
|
||||
Friend WithEvents GroupBox3 As GroupBox
|
||||
Friend WithEvents TxtRemark As TextBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents NudPrice As NumericUpDown
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents TsBtnCloneProject As ToolStripButton
|
||||
Friend WithEvents DtpValidDate As DateTimePicker
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents CboProjectType As ComboBox
|
||||
Friend WithEvents Panel1 As Panel
|
||||
Friend WithEvents RadTestCreate As RadioButton
|
||||
Friend WithEvents RadOrderCreate As RadioButton
|
||||
Friend WithEvents Label6 As Label
|
||||
End Class
|
||||
End Namespace
|
||||
186
UTS_Core/UTSModule/Project/FrmProject.resx
Normal file
186
UTS_Core/UTSModule/Project/FrmProject.resx
Normal file
@@ -0,0 +1,186 @@
|
||||
<?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="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="TsBtnNewProject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAB+SURBVDhPlZBLDsAgCER7Nu9/l7YbtjbTdMxIUZHkBfzw
|
||||
MB5mVkEp5c3g2Ak2k22JNqvkO17H6AVZwj/QvRm4017hG1lf5x0yFPgJuiadQBuj2k8mnQALwka/D9j4
|
||||
E/Cy1jotogn8H6gA2RMKNFQwIyVAVrYFM5aCDENBHqsPLCJwVXAvuTMAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="TsBtnLoadProject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEcSURBVDhPlZKxqsIwFIb7Bvc+idxHuPQVXFpQcOhe8Amc
|
||||
OqqzCBdU6HQfQIfunVwKoi7FQQeF9GrajufmhDYkTaMY+EjPyf//TZtY9aCUfhVFQRggQbBfSV4PFJ8v
|
||||
GekMf8HqzqE3jXhIhRwsqKyWxYpJ3bzcMpBD4jgG27Y1RACaZ+sEPvoLbmqCa/f7AzLyJ2gGcDO+bXe6
|
||||
ajugDypMiBJQluU3f2DiZ+YmT3eANWIyIyKgFsv/AOs2k4wSgIXneRBFEaRpyhew10ZbwNb3fU1oYrPe
|
||||
qAF5no/CMNSEJsbjiRqAty9JEk1ownEcNaA6BeK6riY2cdgf+SwC2Gf8BEGgCU2slis+iwB2mQZ4Ak3h
|
||||
K0QAIeQTi/cp4B9tCZE2c6oRhQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TsBtnCloneProject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEcSURBVDhPlZKxqsIwFIb7Bvc+idxHuPQVXFpQcOhe8Amc
|
||||
OqqzCBdU6HQfQIfunVwKoi7FQQeF9GrajufmhDYkTaMY+EjPyf//TZtY9aCUfhVFQRggQbBfSV4PFJ8v
|
||||
GekMf8HqzqE3jXhIhRwsqKyWxYpJ3bzcMpBD4jgG27Y1RACaZ+sEPvoLbmqCa/f7AzLyJ2gGcDO+bXe6
|
||||
ajugDypMiBJQluU3f2DiZ+YmT3eANWIyIyKgFsv/AOs2k4wSgIXneRBFEaRpyhew10ZbwNb3fU1oYrPe
|
||||
qAF5no/CMNSEJsbjiRqAty9JEk1ownEcNaA6BeK6riY2cdgf+SwC2Gf8BEGgCU2slis+iwB2mQZ4Ak3h
|
||||
K0QAIeQTi/cp4B9tCZE2c6oRhQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TsBtnSaveProject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAABRSURBVDhPY6AK+Pbt239S8NevX+dDtUIASNDJyQmOP7z/
|
||||
CMfIYiC6ra0N0xBSDABhmCFQ7aQbAMJEG4CMkdXQ1gBi8KgBg9IAcjBUOyWAgQEAoTb4kYkPBE8AAAAA
|
||||
SUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="TsBtnReleaseProject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACQSURBVDhPxZDNDYAgDEYZwVGcgVmYhfUYgwOHakK4Ymoo
|
||||
qQ3y48UvecFC+yKomaSUsgBijHs5HgeHtNYVa+2ahAQHnDdcUlr6kQKS4H7rfhwHABt+dwVYtDDGZO+9
|
||||
mxLwQ2ogSQih1pwpAYIS7GsxJUD4ENWvLyyRAuKz4L8/kOuyQPIQjKgDMtw4ooywKHUBEuGL7JrhBKgA
|
||||
AAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="TsBtnDeleteProject.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFrSURBVDhPnZM/SwNBEMXvCwj5ABapbGwsrKy0tdFWsEgp
|
||||
VnZpr9HWQqxVCFipRSoRTKGNWigiqQRRLCImxCAS5P6s85vbNXtyR8AHQ459897OzE4CYIypJEmyJ78m
|
||||
iqJ+mqYbSvyB0CE5HpaVQNC5ujCHs5Mavfb9iBTIdzWO49v2/q45mJowL2dN+NDSQSC3t+52tpQkmktz
|
||||
Zjh470tSBXO+L+trypEn+SdWmsFV4AyI6826tvP5+qyGnGFCJRhbaQYOIB6PGzkTbqMlvr2qqlaWR5kJ
|
||||
gcn34ENSzLxNLwbuZLl+XWDKK9m0YiAuq+BoYXps+TMMjMH5Qn8Gp6uLOkArGcGJi8pG4L8CF0gr21aa
|
||||
gdLO11dyYhbGvbVcUCOHCpyx4HfJArddLore2lb5BEdLnYcbXTIlfYPSRRFwxsaST0tfvbeWEsNuV3ec
|
||||
YBZFYh/MgP8CmysI1ZlVJsaJHSSvRjWEPfovguAHNGLazFL+H1IAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="CtmStation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>129, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
429
UTS_Core/UTSModule/Project/FrmProject.vb
Normal file
429
UTS_Core/UTSModule/Project/FrmProject.vb
Normal file
@@ -0,0 +1,429 @@
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
Imports System.Windows.Forms
|
||||
Imports UTS_Core.UTSModule.Login
|
||||
Imports UTS_Core.UTSModule.Production
|
||||
Imports UTS_Core.UTSModule.Station
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class FrmProject
|
||||
|
||||
Private _userProject As ProjectInfo
|
||||
Private _userInfo As UserInfo
|
||||
Private _productTypeManager As ProductTypeManager
|
||||
|
||||
Public Sub ShowForm(parentControl As Control, userInfo As UserInfo)
|
||||
FormBorderStyle = FormBorderStyle.None
|
||||
TopLevel = False
|
||||
Dock = DockStyle.Fill
|
||||
Parent = parentControl
|
||||
|
||||
_userInfo = userInfo
|
||||
Show()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub EnabledSaveProject(isEnabled As Boolean)
|
||||
TsBtnSaveProject.Enabled = isEnabled
|
||||
TsBtnReleaseProject.Enabled = isEnabled
|
||||
TsBtnDeleteProject.Enabled = isEnabled
|
||||
|
||||
TxtProjectName.Enabled = isEnabled
|
||||
TxtDescription.Enabled = isEnabled
|
||||
GrdStations.Enabled = isEnabled
|
||||
PicProject.Enabled = isEnabled
|
||||
TxtRemark.Enabled = isEnabled
|
||||
NudPrice.Enabled = isEnabled
|
||||
|
||||
CboProjectType.Enabled = isEnabled
|
||||
DtpValidDate.Enabled = isEnabled
|
||||
|
||||
RadOrderCreate.Enabled = isEnabled
|
||||
RadTestCreate.Enabled = isEnabled
|
||||
End Sub
|
||||
|
||||
Private Sub InitializeForm()
|
||||
_productTypeManager = ProductTypeManager.CreateManager()
|
||||
CboProjectType.Items.AddRange(_productTypeManager.GetAllProductType())
|
||||
|
||||
EnabledSaveProject(_userProject IsNot Nothing)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub FrmProject_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
InitializeForm()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadProjectInitForm(project As ProjectInfo)
|
||||
TxtProjectName.Text = project.Name
|
||||
TxtDescription.Text = project.Description
|
||||
TxtRemark.Text = project.Remark
|
||||
PicProject.Image = project.MasterImage
|
||||
NudPrice.Value = project.Price
|
||||
|
||||
Select Case project.SnType
|
||||
Case 0
|
||||
RadTestCreate.Checked = True
|
||||
Case 1
|
||||
RadOrderCreate.Checked = True
|
||||
End Select
|
||||
|
||||
'todo:初始化产品类型ID
|
||||
CboProjectType.SelectedIndex = CboProjectType.Items.IndexOf(_productTypeManager.GetProductType(project.ProductTypeId))
|
||||
DtpValidDate.Value = project.EolDate
|
||||
|
||||
EnabledSaveProject(_userProject IsNot Nothing)
|
||||
ProjectStationGrid.InitTestStationGrid(GrdStations, project)
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnNewProject_Click(sender As Object, e As EventArgs) Handles TsBtnNewProject.Click
|
||||
Using dlg As New DlgCreateProject
|
||||
If dlg.ShowDialog() <> DialogResult.OK Then Return
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, _userInfo.UserName, dlg.ProjectName)
|
||||
LoadProjectInitForm(_userProject)
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TsBtnLoadProject_Click(sender As Object, e As EventArgs) Handles TsBtnLoadProject.Click
|
||||
Using dlg As New DlgLoadProject
|
||||
If dlg.ShowDialog() <> DialogResult.OK Then Return
|
||||
Try
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, _userInfo.UserName, dlg.ProjectName, dlg.LoadMode)
|
||||
LoadProjectInitForm(_userProject) '初始化页面
|
||||
Catch ex As Exception
|
||||
MsgBox($"Load Project Error:{ex.Message}")
|
||||
End Try
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TsBtnCloneProject_Click(sender As Object, e As EventArgs) Handles TsBtnCloneProject.Click
|
||||
Using dlg As New DlgLoadProject
|
||||
If dlg.ShowDialog() <> DialogResult.OK Then Return
|
||||
Try
|
||||
_userProject = New ProjectInfo(_userInfo.UserId, _userInfo.UserName, dlg.ProjectName, dlg.LoadMode)
|
||||
LoadProjectInitForm(_userProject) '初始化页面
|
||||
_userProject.Index = -1
|
||||
Catch ex As Exception
|
||||
MsgBox($"Clone Project Error:{ex.Message}")
|
||||
End Try
|
||||
End Using
|
||||
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 检测用户对项目的修改是否输入合法
|
||||
''' 不合法时会抛出异常
|
||||
''' </summary>
|
||||
Private Sub CheckUserAlter()
|
||||
If String.IsNullOrEmpty(TxtProjectName.Text) Then Throw New Exception($"项目名称不能空,请重新输入!")
|
||||
'后续可新增对项目名中非常规字符的检测
|
||||
|
||||
For row As Integer = 1 To GrdStations.Rows - 1
|
||||
If String.IsNullOrEmpty(GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Name).Text) Then
|
||||
GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Name).SetFocus()
|
||||
Throw New Exception($"项目站名不能为空,如若未使用,请右键删除该站!")
|
||||
|
||||
'后续可新增对项目站名中非常规字符的检测
|
||||
End If
|
||||
|
||||
|
||||
If String.IsNullOrEmpty(GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Type).Text) Then
|
||||
GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Type).SetFocus()
|
||||
Throw New Exception($"项目类型不能为空,如若未使用,请右键删除该站!")
|
||||
|
||||
'后续可新增对项目站名中非常规字符的检测
|
||||
End If
|
||||
|
||||
|
||||
If String.IsNullOrEmpty(GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.SnType).Text) Then
|
||||
GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.SnType).SetFocus()
|
||||
Throw New Exception($"项目条码规则不能为空,如若未使用,请右键删除该站!")
|
||||
|
||||
'后续可新增对项目站名中非常规字符的检测
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateProjectInfo(project As ProjectInfo)
|
||||
project.UserId = _userInfo.UserId '当前操作项目站用户索引
|
||||
project.UserName = _userInfo.UserName '当前操作项目站用户名称
|
||||
|
||||
If String.Compare(project.Name, TxtProjectName.Text) <> 0 Then
|
||||
project.Name = TxtProjectName.Text
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
|
||||
'todo:检测产品类型修改
|
||||
Dim tmpIndex As Integer = _productTypeManager.GetProductIndex(CboProjectType.Text)
|
||||
If project.ProductTypeId <> tmpIndex Then
|
||||
project.ProductTypeId = tmpIndex
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
|
||||
If String.Compare(project.Description, TxtDescription.Text) <> 0 Then
|
||||
project.Description = TxtDescription.Text
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
|
||||
If String.Compare(project.Remark, TxtRemark.Text) <> 0 Then
|
||||
project.Remark = TxtRemark.Text
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
|
||||
'Momo 2025-07-17 新增对项目有效期的修改检测
|
||||
MsgBox(DtpValidDate.Value)
|
||||
If String.Compare(project.EolDate.ToString, DtpValidDate.Value.ToString) <> 0 Then
|
||||
project.EolDate = DtpValidDate.Value
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
|
||||
If project.Price <> NudPrice.Value Then
|
||||
project.Price = NudPrice.Value
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
|
||||
If RadOrderCreate.Checked Then
|
||||
If project.SnType <> 1 Then
|
||||
project.SnType = 1
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
ElseIf RadTestCreate.Checked Then
|
||||
If project.SnType <> 0 Then
|
||||
project.SnType = 0
|
||||
project.InfoChanged = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
For row As Integer = 1 To GrdStations.Rows - 1
|
||||
Dim info As ProcessStation = project.Station.Item(row - 1)
|
||||
With info
|
||||
.UserId = _userInfo.UserId '当前操作项目站用户名
|
||||
|
||||
Dim stationType As ProcessStation.StationTypeEnum = CType([Enum].Parse(GetType(ProcessStation.StationTypeEnum), GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Type).Text), ProcessStation.StationTypeEnum)
|
||||
If .StationType <> stationType Then
|
||||
.StationType = stationType
|
||||
.TypeChange = True
|
||||
End If
|
||||
|
||||
Dim stationNum As Integer = row
|
||||
If .ArtworkOrder <> stationNum Then
|
||||
.ArtworkOrder = stationNum
|
||||
.InfoChanged = True
|
||||
End If
|
||||
|
||||
Dim stationName As String = GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Name).Text
|
||||
If String.Compare(.Name, stationName) <> 0 Then
|
||||
.Name = stationName
|
||||
.InfoChanged = True
|
||||
End If
|
||||
|
||||
Dim stationDesc As String = GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Description).Text
|
||||
If String.Compare(.Description, stationDesc) <> 0 Then
|
||||
.Description = stationDesc
|
||||
.InfoChanged = True
|
||||
End If
|
||||
|
||||
Dim snType As ProcessStation.SnTypeEnum = CType([Enum].Parse(GetType(ProcessStation.SnTypeEnum), GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.SnType).Text), ProcessStation.SnTypeEnum)
|
||||
If .SnType <> snType Then
|
||||
.SnType = snType
|
||||
.InfoChanged = True
|
||||
End If
|
||||
|
||||
Dim stationDevType As String = GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.DevType).Text
|
||||
If String.Compare(.DevType, stationDevType) <> 0 Then
|
||||
.DevType = stationDevType
|
||||
.InfoChanged = True
|
||||
End If
|
||||
|
||||
Dim stationDevApp As String = GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.DevApp).Text
|
||||
If String.Compare(.DevApp, stationDevApp) <> 0 Then
|
||||
.DevApp = stationDevApp
|
||||
.InfoChanged = True
|
||||
End If
|
||||
|
||||
Dim stationPacketName As String = GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.PacketName).Text
|
||||
If String.Compare(.Packet.FileName, stationPacketName) <> 0 Then
|
||||
.Packet.FileName = stationPacketName
|
||||
.InfoChanged = True
|
||||
End If
|
||||
End With
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TsBtnSaveProject_Click(sender As Object, e As EventArgs) Handles TsBtnSaveProject.Click
|
||||
Try
|
||||
CheckUserAlter()
|
||||
UpdateProjectInfo(_userProject)
|
||||
|
||||
Dim filePath As String = UtsPath.ProjectFilePath(_userProject.Name)
|
||||
_userProject.ExportToXml(filePath)
|
||||
MsgBox($"Save {_userProject.Name} Project Succes!")
|
||||
Catch ex As Exception
|
||||
MsgBox($"Save {_userProject.Name} Project Fail,{ex.Message}")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TsBtnReleaseProject_Click(sender As Object, e As EventArgs) Handles TsBtnReleaseProject.Click
|
||||
Try
|
||||
CheckUserAlter()
|
||||
|
||||
UpdateProjectInfo(_userProject)
|
||||
|
||||
Dim filePath As String = UtsPath.ProjectFilePath(_userProject.Name)
|
||||
_userProject.Release(filePath)
|
||||
|
||||
MsgBox($"Release {_userProject.Name} Project Succes!")
|
||||
Catch ex As Exception
|
||||
MsgBox($"Release {_userProject.Name} Project Fail,{ex.Message}")
|
||||
Return
|
||||
End Try
|
||||
|
||||
Try
|
||||
'通过AUTS STUDIO添加机型后,需要调用网站API,更新网站缓存,否则网页不会显示新增的机型信息
|
||||
'临时屏蔽,待新网站完成后此步骤重新启用
|
||||
'’Dim msg As String = GetData("http://uts-data.com/api/Common/ClearCache")
|
||||
'’Console.WriteLine($"Msg:{msg}")
|
||||
Catch ex As Exception
|
||||
MsgBox($"更新缓存数据失败,{ex.Message}")
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function GetData(url As String) As String
|
||||
Dim request As HttpWebRequest = CType(WebRequest.Create(url & "?" & $"cmd=UP&dbName={UtsDb.RemotePrivateDb}"), HttpWebRequest)
|
||||
request.Accept = "text/html,application/xhtml+xml,*/*"
|
||||
request.ContentType = "application/json"
|
||||
request.Method = "GET"
|
||||
|
||||
Dim sr As New StreamReader(request.GetResponse().GetResponseStream)
|
||||
Return sr.ReadToEnd
|
||||
End Function
|
||||
#Region "测试站检测"
|
||||
|
||||
Private Sub GrdStations_ButtonClick(sender As Object, e As FlexCell.Grid.ButtonClickEventArgs) Handles GrdStations.ButtonClick
|
||||
Select Case e.Col
|
||||
Case ProjectStationGrid.ColNameEnum.PacketName
|
||||
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub TsmAddStation_Click(sender As Object, e As EventArgs) Handles TsmAddStation.Click
|
||||
GrdStations.AddItem(String.Empty)
|
||||
|
||||
_userProject.Station.Add(New ProcessStation(_userProject))
|
||||
End Sub
|
||||
|
||||
Private Sub TsmRemoveStation_Click(sender As Object, e As EventArgs) Handles TsmRemoveStation.Click
|
||||
If GrdStations.Selection Is Nothing Then Return
|
||||
|
||||
If GrdStations.Cell(GrdStations.Selection.FirstRow, ProjectStationGrid.ColNameEnum.Name).Text.Length = 0 Then
|
||||
_userProject.Station.RemoveAt(GrdStations.Selection.FirstRow - 1)
|
||||
GrdStations.Selection.DeleteByRow()
|
||||
Else
|
||||
If MsgBox("数据库会删除对应测试站,该操作不可逆,是否继续此操作?", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
|
||||
GrdStations.Selection.DeleteByRow()
|
||||
|
||||
_userProject.DeleteStation.Add(_userProject.Station.Item(GrdStations.Selection.FirstRow - 1))
|
||||
_userProject.Station.RemoveAt(GrdStations.Selection.FirstRow - 1)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TsmMoveUpStation_Click(sender As Object, e As EventArgs) Handles TsmMoveUpStation.Click
|
||||
Dim row As Integer = GrdStations.Selection.FirstRow
|
||||
If row = 1 Then Return
|
||||
GrdStations.Row(row).Position -= 1
|
||||
|
||||
|
||||
Dim stationIndex As Integer = row - 1
|
||||
Dim srcProcessStation As ProcessStation = _userProject.Station.Item(stationIndex)
|
||||
_userProject.Station.Item(stationIndex) = _userProject.Station.Item(stationIndex - 1)
|
||||
_userProject.Station.Item(stationIndex - 1) = srcProcessStation
|
||||
End Sub
|
||||
|
||||
Private Sub TsmMoveDownStation_Click(sender As Object, e As EventArgs) Handles TsmMoveDownStation.Click
|
||||
Dim row As Integer = GrdStations.Selection.FirstRow
|
||||
If row = GrdStations.Rows - 1 Then Return
|
||||
GrdStations.Row(row).Position += 1
|
||||
|
||||
|
||||
Dim stationIndex As Integer = row - 1
|
||||
Dim srcProcessStation As ProcessStation = _userProject.Station.Item(stationIndex)
|
||||
_userProject.Station.Item(stationIndex) = _userProject.Station.Item(stationIndex + 1)
|
||||
_userProject.Station.Item(stationIndex + 1) = srcProcessStation
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TsBtnDeleteProject_Click(sender As Object, e As EventArgs) Handles TsBtnDeleteProject.Click
|
||||
If MsgBox("是否确定删除该项目", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
|
||||
If _userProject Is Nothing Then Return
|
||||
Try
|
||||
_userProject.Delete()
|
||||
_userProject = Nothing
|
||||
EnabledSaveProject(_userProject IsNot Nothing)
|
||||
ProjectStationGrid.InitTestStationGrid(GrdStations)
|
||||
MsgBox("删除完成!")
|
||||
Catch ex As Exception
|
||||
MsgBox("删除失败:" & ex.Message)
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub PicProject_DoubleClick(sender As Object, e As EventArgs) Handles PicProject.DoubleClick
|
||||
Using dlgFile As New OpenFileDialog
|
||||
dlgFile.Filter = $"设备图像 (*.bmp;*.gif;*.jpg;*.png)|*.bmp;*.gif;*.jpg;*.png"
|
||||
If dlgFile.ShowDialog() <> DialogResult.OK Then Return
|
||||
|
||||
Dim imagePath As String = dlgFile.FileName
|
||||
|
||||
_userProject.MasterImage = ImageProcessor.ImageProcessor.CompressImageWithWidth(CType(ImageProcessor.ImageProcessor.GetBitmapImage(imagePath), Drawing.Bitmap), 600)
|
||||
_userProject.PreviewImage = ImageProcessor.ImageProcessor.CompressImageWithWidth(New Drawing.Bitmap(_userProject.MasterImage), 120)
|
||||
|
||||
_userProject.ImageName = $"P_{_userProject.Name}_{Now:yyyyMMdd_HHmmss}.png"
|
||||
|
||||
PicProject.Image = _userProject.MasterImage
|
||||
If _userProject.PreviewImageChanged = False Then _userProject.PreviewImageChanged = True
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub MsiStationPreview_Click(sender As Object, e As EventArgs) Handles MsiStationPreview.Click
|
||||
Dim row As Integer = GrdStations.Selection.FirstRow
|
||||
If row >= GrdStations.Rows OrElse row < 1 Then Return
|
||||
|
||||
Using dlgFile As New OpenFileDialog
|
||||
dlgFile.Filter = $"设备图像 (*.bmp;*.gif;*.jpg;*.png)|*.bmp;*.gif;*.jpg;*.png"
|
||||
If dlgFile.ShowDialog() <> DialogResult.OK Then Return
|
||||
|
||||
Dim imagePath As String = dlgFile.FileName
|
||||
|
||||
_userProject.Station(row - 1).PreViewImage = ImageProcessor.ImageProcessor.CompressImageWithWidth(CType(ImageProcessor.ImageProcessor.GetBitmapImage(imagePath), Drawing.Bitmap), 600)
|
||||
If _userProject.Station(row - 1).PreviewImageChanged = False Then _userProject.Station(row - 1).PreviewImageChanged = True
|
||||
|
||||
Dim imgKey As String
|
||||
If String.IsNullOrEmpty(GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Preview).ImageKey) Then
|
||||
imgKey = GrdStations.Images.Count().ToString()
|
||||
Else
|
||||
imgKey = GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Preview).ImageKey
|
||||
GrdStations.Images.Remove(imgKey)
|
||||
End If
|
||||
|
||||
GrdStations.Images.Add(_userProject.Station(row - 1).PreViewImage, imgKey)
|
||||
GrdStations.Cell(row, ProjectStationGrid.ColNameEnum.Preview).SetImage(imgKey)
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
Private Sub GrdStations_Load(sender As Object, e As EventArgs) Handles GrdStations.Load
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
351
UTS_Core/UTSModule/Project/FrmStationDesign.Designer.vb
generated
Normal file
351
UTS_Core/UTSModule/Project/FrmStationDesign.Designer.vb
generated
Normal file
@@ -0,0 +1,351 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace UTSModule.Project
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class FrmStationDesign
|
||||
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()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(FrmStationDesign))
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.TsBtnReleaseStation = New System.Windows.Forms.ToolStripButton()
|
||||
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.GroupBox4 = New System.Windows.Forms.GroupBox()
|
||||
Me.TxtTestStation = New System.Windows.Forms.TextBox()
|
||||
Me.TxtProjectName = New System.Windows.Forms.TextBox()
|
||||
Me.NudStationVersion = New System.Windows.Forms.NumericUpDown()
|
||||
Me.ChkAutoAugment = New System.Windows.Forms.CheckBox()
|
||||
Me.Label7 = New System.Windows.Forms.Label()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.TxtEditPwd = New System.Windows.Forms.TextBox()
|
||||
Me.DtpValidDate = New System.Windows.Forms.DateTimePicker()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
|
||||
Me.PicStation = New System.Windows.Forms.PictureBox()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.GroupBox2 = New System.Windows.Forms.GroupBox()
|
||||
Me.RtxCurrentImprint = New System.Windows.Forms.RichTextBox()
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.RtxHistoryImprint = New System.Windows.Forms.RichTextBox()
|
||||
Me.ToolStrip1.SuspendLayout
|
||||
CType(Me.SplitContainer1,System.ComponentModel.ISupportInitialize).BeginInit
|
||||
Me.SplitContainer1.Panel1.SuspendLayout
|
||||
Me.SplitContainer1.Panel2.SuspendLayout
|
||||
Me.SplitContainer1.SuspendLayout
|
||||
Me.GroupBox4.SuspendLayout
|
||||
CType(Me.NudStationVersion,System.ComponentModel.ISupportInitialize).BeginInit
|
||||
Me.GroupBox3.SuspendLayout
|
||||
CType(Me.PicStation,System.ComponentModel.ISupportInitialize).BeginInit
|
||||
CType(Me.SplitContainer2,System.ComponentModel.ISupportInitialize).BeginInit
|
||||
Me.SplitContainer2.Panel1.SuspendLayout
|
||||
Me.SplitContainer2.Panel2.SuspendLayout
|
||||
Me.SplitContainer2.SuspendLayout
|
||||
Me.GroupBox2.SuspendLayout
|
||||
Me.GroupBox1.SuspendLayout
|
||||
Me.SuspendLayout
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsBtnReleaseStation})
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(800, 25)
|
||||
Me.ToolStrip1.TabIndex = 6
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'TsBtnReleaseStation
|
||||
'
|
||||
Me.TsBtnReleaseStation.BackColor = System.Drawing.SystemColors.Control
|
||||
Me.TsBtnReleaseStation.Image = CType(resources.GetObject("TsBtnReleaseStation.Image"),System.Drawing.Image)
|
||||
Me.TsBtnReleaseStation.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnReleaseStation.Name = "TsBtnReleaseStation"
|
||||
Me.TsBtnReleaseStation.Size = New System.Drawing.Size(76, 22)
|
||||
Me.TsBtnReleaseStation.Text = "发布站包"
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 25)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.GroupBox4)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.GroupBox3)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.SplitContainer2)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(800, 425)
|
||||
Me.SplitContainer1.SplitterDistance = 475
|
||||
Me.SplitContainer1.TabIndex = 7
|
||||
'
|
||||
'GroupBox4
|
||||
'
|
||||
Me.GroupBox4.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right),System.Windows.Forms.AnchorStyles)
|
||||
Me.GroupBox4.Controls.Add(Me.TxtTestStation)
|
||||
Me.GroupBox4.Controls.Add(Me.TxtProjectName)
|
||||
Me.GroupBox4.Controls.Add(Me.NudStationVersion)
|
||||
Me.GroupBox4.Controls.Add(Me.ChkAutoAugment)
|
||||
Me.GroupBox4.Controls.Add(Me.Label7)
|
||||
Me.GroupBox4.Controls.Add(Me.Label3)
|
||||
Me.GroupBox4.Controls.Add(Me.Label4)
|
||||
Me.GroupBox4.Controls.Add(Me.TxtEditPwd)
|
||||
Me.GroupBox4.Controls.Add(Me.DtpValidDate)
|
||||
Me.GroupBox4.Controls.Add(Me.Label5)
|
||||
Me.GroupBox4.Location = New System.Drawing.Point(3, 3)
|
||||
Me.GroupBox4.Name = "GroupBox4"
|
||||
Me.GroupBox4.Size = New System.Drawing.Size(469, 120)
|
||||
Me.GroupBox4.TabIndex = 25
|
||||
Me.GroupBox4.TabStop = false
|
||||
Me.GroupBox4.Text = "基本信息"
|
||||
'
|
||||
'TxtTestStation
|
||||
'
|
||||
Me.TxtTestStation.Location = New System.Drawing.Point(296, 28)
|
||||
Me.TxtTestStation.Name = "TxtTestStation"
|
||||
Me.TxtTestStation.ReadOnly = true
|
||||
Me.TxtTestStation.Size = New System.Drawing.Size(137, 21)
|
||||
Me.TxtTestStation.TabIndex = 1
|
||||
'
|
||||
'TxtProjectName
|
||||
'
|
||||
Me.TxtProjectName.Location = New System.Drawing.Point(71, 28)
|
||||
Me.TxtProjectName.Name = "TxtProjectName"
|
||||
Me.TxtProjectName.ReadOnly = true
|
||||
Me.TxtProjectName.Size = New System.Drawing.Size(136, 21)
|
||||
Me.TxtProjectName.TabIndex = 1
|
||||
'
|
||||
'NudStationVersion
|
||||
'
|
||||
Me.NudStationVersion.Enabled = false
|
||||
Me.NudStationVersion.Location = New System.Drawing.Point(296, 82)
|
||||
Me.NudStationVersion.Name = "NudStationVersion"
|
||||
Me.NudStationVersion.Size = New System.Drawing.Size(137, 21)
|
||||
Me.NudStationVersion.TabIndex = 25
|
||||
'
|
||||
'ChkAutoAugment
|
||||
'
|
||||
Me.ChkAutoAugment.AutoSize = true
|
||||
Me.ChkAutoAugment.Checked = true
|
||||
Me.ChkAutoAugment.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.ChkAutoAugment.Location = New System.Drawing.Point(218, 85)
|
||||
Me.ChkAutoAugment.Name = "ChkAutoAugment"
|
||||
Me.ChkAutoAugment.Size = New System.Drawing.Size(72, 16)
|
||||
Me.ChkAutoAugment.TabIndex = 24
|
||||
Me.ChkAutoAugment.Text = "版本递增"
|
||||
Me.ChkAutoAugment.UseVisualStyleBackColor = true
|
||||
'
|
||||
'Label7
|
||||
'
|
||||
Me.Label7.AutoSize = true
|
||||
Me.Label7.Location = New System.Drawing.Point(231, 33)
|
||||
Me.Label7.Name = "Label7"
|
||||
Me.Label7.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label7.TabIndex = 23
|
||||
Me.Label7.Text = "测试站名:"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = true
|
||||
Me.Label3.Location = New System.Drawing.Point(6, 31)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label3.TabIndex = 10
|
||||
Me.Label3.Text = "测试项目:"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = true
|
||||
Me.Label4.Location = New System.Drawing.Point(6, 58)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label4.TabIndex = 16
|
||||
Me.Label4.Text = "编辑密码:"
|
||||
'
|
||||
'TxtEditPwd
|
||||
'
|
||||
Me.TxtEditPwd.Location = New System.Drawing.Point(71, 55)
|
||||
Me.TxtEditPwd.Name = "TxtEditPwd"
|
||||
Me.TxtEditPwd.Size = New System.Drawing.Size(136, 21)
|
||||
Me.TxtEditPwd.TabIndex = 17
|
||||
'
|
||||
'DtpValidDate
|
||||
'
|
||||
Me.DtpValidDate.Location = New System.Drawing.Point(296, 55)
|
||||
Me.DtpValidDate.Name = "DtpValidDate"
|
||||
Me.DtpValidDate.Size = New System.Drawing.Size(137, 21)
|
||||
Me.DtpValidDate.TabIndex = 19
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.AutoSize = true
|
||||
Me.Label5.Location = New System.Drawing.Point(231, 60)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label5.TabIndex = 18
|
||||
Me.Label5.Text = "有效日期:"
|
||||
'
|
||||
'GroupBox3
|
||||
'
|
||||
Me.GroupBox3.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.GroupBox3.Controls.Add(Me.PicStation)
|
||||
Me.GroupBox3.Location = New System.Drawing.Point(3, 129)
|
||||
Me.GroupBox3.Name = "GroupBox3"
|
||||
Me.GroupBox3.Size = New System.Drawing.Size(469, 292)
|
||||
Me.GroupBox3.TabIndex = 24
|
||||
Me.GroupBox3.TabStop = false
|
||||
Me.GroupBox3.Text = "图像"
|
||||
'
|
||||
'PicStation
|
||||
'
|
||||
Me.PicStation.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.PicStation.Location = New System.Drawing.Point(3, 17)
|
||||
Me.PicStation.Name = "PicStation"
|
||||
Me.PicStation.Size = New System.Drawing.Size(463, 272)
|
||||
Me.PicStation.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
|
||||
Me.PicStation.TabIndex = 0
|
||||
Me.PicStation.TabStop = false
|
||||
'
|
||||
'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.GroupBox2)
|
||||
'
|
||||
'SplitContainer2.Panel2
|
||||
'
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.GroupBox1)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(321, 425)
|
||||
Me.SplitContainer2.SplitterDistance = 115
|
||||
Me.SplitContainer2.TabIndex = 0
|
||||
'
|
||||
'GroupBox2
|
||||
'
|
||||
Me.GroupBox2.Controls.Add(Me.RtxCurrentImprint)
|
||||
Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GroupBox2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.GroupBox2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GroupBox2.Name = "GroupBox2"
|
||||
Me.GroupBox2.Size = New System.Drawing.Size(321, 115)
|
||||
Me.GroupBox2.TabIndex = 1
|
||||
Me.GroupBox2.TabStop = false
|
||||
Me.GroupBox2.Text = "当前说明"
|
||||
'
|
||||
'RtxCurrentImprint
|
||||
'
|
||||
Me.RtxCurrentImprint.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxCurrentImprint.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxCurrentImprint.Location = New System.Drawing.Point(3, 17)
|
||||
Me.RtxCurrentImprint.Name = "RtxCurrentImprint"
|
||||
Me.RtxCurrentImprint.Size = New System.Drawing.Size(315, 95)
|
||||
Me.RtxCurrentImprint.TabIndex = 0
|
||||
Me.RtxCurrentImprint.Text = ""
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.Add(Me.RtxHistoryImprint)
|
||||
Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GroupBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(321, 306)
|
||||
Me.GroupBox1.TabIndex = 0
|
||||
Me.GroupBox1.TabStop = false
|
||||
Me.GroupBox1.Text = "历史说明"
|
||||
'
|
||||
'RtxHistoryImprint
|
||||
'
|
||||
Me.RtxHistoryImprint.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxHistoryImprint.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxHistoryImprint.Location = New System.Drawing.Point(3, 17)
|
||||
Me.RtxHistoryImprint.Name = "RtxHistoryImprint"
|
||||
Me.RtxHistoryImprint.Size = New System.Drawing.Size(315, 286)
|
||||
Me.RtxHistoryImprint.TabIndex = 0
|
||||
Me.RtxHistoryImprint.Text = ""
|
||||
'
|
||||
'FrmStationDesign
|
||||
'
|
||||
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.ToolStrip1)
|
||||
Me.Enabled = false
|
||||
Me.Name = "FrmStationDesign"
|
||||
Me.Text = "FrmStationDesign"
|
||||
Me.ToolStrip1.ResumeLayout(false)
|
||||
Me.ToolStrip1.PerformLayout
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(false)
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(false)
|
||||
CType(Me.SplitContainer1,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.SplitContainer1.ResumeLayout(false)
|
||||
Me.GroupBox4.ResumeLayout(false)
|
||||
Me.GroupBox4.PerformLayout
|
||||
CType(Me.NudStationVersion,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.GroupBox3.ResumeLayout(false)
|
||||
CType(Me.PicStation,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.SplitContainer2.Panel1.ResumeLayout(false)
|
||||
Me.SplitContainer2.Panel2.ResumeLayout(false)
|
||||
CType(Me.SplitContainer2,System.ComponentModel.ISupportInitialize).EndInit
|
||||
Me.SplitContainer2.ResumeLayout(false)
|
||||
Me.GroupBox2.ResumeLayout(false)
|
||||
Me.GroupBox1.ResumeLayout(false)
|
||||
Me.ResumeLayout(false)
|
||||
Me.PerformLayout
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ToolStrip1 As ToolStrip
|
||||
Friend WithEvents TsBtnReleaseStation As ToolStripButton
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents GroupBox4 As GroupBox
|
||||
Friend WithEvents TxtTestStation As TextBox
|
||||
Friend WithEvents TxtProjectName As TextBox
|
||||
Friend WithEvents NudStationVersion As NumericUpDown
|
||||
Friend WithEvents ChkAutoAugment As CheckBox
|
||||
Friend WithEvents Label7 As Label
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents TxtEditPwd As TextBox
|
||||
Friend WithEvents DtpValidDate As DateTimePicker
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents GroupBox3 As GroupBox
|
||||
Friend WithEvents PicStation As PictureBox
|
||||
Friend WithEvents SplitContainer2 As SplitContainer
|
||||
Friend WithEvents GroupBox2 As GroupBox
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents RtxCurrentImprint As RichTextBox
|
||||
Friend WithEvents RtxHistoryImprint As RichTextBox
|
||||
End Class
|
||||
End Namespace
|
||||
139
UTS_Core/UTSModule/Project/FrmStationDesign.resx
Normal file
139
UTS_Core/UTSModule/Project/FrmStationDesign.resx
Normal file
@@ -0,0 +1,139 @@
|
||||
<?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="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="TsBtnReleaseStation.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
162
UTS_Core/UTSModule/Project/FrmStationDesign.vb
Normal file
162
UTS_Core/UTSModule/Project/FrmStationDesign.vb
Normal file
@@ -0,0 +1,162 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class FrmStationDesign
|
||||
|
||||
Private _isAutoAugment As Boolean = True
|
||||
|
||||
Public Property StationPacket() As ProjectStationPacket
|
||||
|
||||
|
||||
Public Sub ShowForm(parentControl As Control)
|
||||
FormBorderStyle = FormBorderStyle.None
|
||||
TopLevel = False
|
||||
Dock = DockStyle.Fill
|
||||
Parent = parentControl
|
||||
|
||||
Enabled = StationPacket IsNot Nothing
|
||||
|
||||
Show()
|
||||
End Sub
|
||||
|
||||
Public Sub ShowForm(parentControl As Control, packet As ProjectStationPacket)
|
||||
FormBorderStyle = FormBorderStyle.None
|
||||
TopLevel = False
|
||||
Dock = DockStyle.Fill
|
||||
Parent = parentControl
|
||||
|
||||
UpdateStationPacket(packet)
|
||||
Enabled = StationPacket IsNot Nothing
|
||||
Show()
|
||||
End Sub
|
||||
|
||||
Public Sub Station_Changed(station As StationInfo)
|
||||
UpdateStationPacket(station.Packet)
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>修改窗体标题</summary>
|
||||
Private Sub ShowFormTitle()
|
||||
Text = $"{My.Application.Info.ProductName} StationDesign"
|
||||
End Sub
|
||||
|
||||
Private Sub ShowFormTitle(packetName As String)
|
||||
Text = $"{My.Application.Info.ProductName} StationDesign -- {packetName}"
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub UpdateStationPacket(packet As ProjectStationPacket)
|
||||
StationPacket = packet
|
||||
Enabled = StationPacket IsNot Nothing
|
||||
If StationPacket IsNot Nothing Then
|
||||
ShowFormTitle(StationPacket.Name)
|
||||
LoadProjectInitForm()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub LoadProjectInitForm()
|
||||
TxtProjectName.Text = StationPacket.ParentStation.ParentProject.Name
|
||||
TxtTestStation.Text = StationPacket.ParentStation.Name
|
||||
TxtEditPwd.Text = StationPacket.PassWord
|
||||
|
||||
|
||||
NudStationVersion.Text = CType(StationPacket.StationVersion, String)
|
||||
PicStation.Image = StationPacket.StationImage
|
||||
RtxHistoryImprint.Text = ProjectStationPacket.PacketImprintsToString(StationPacket.HistoryImprints)
|
||||
RtxCurrentImprint.Text = StationPacket.CurrentImprint.ToString()
|
||||
|
||||
If StationPacket.ValidDate >= DtpValidDate.MaxDate Then
|
||||
DtpValidDate.Value = Now.AddMonths(1) '默认有效期一个月
|
||||
ElseIf StationPacket.ValidDate <= DtpValidDate.MinDate Then
|
||||
DtpValidDate.Value = Now.AddMonths(1) '默认有效期一个月
|
||||
Else
|
||||
DtpValidDate.Value = StationPacket.ValidDate
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub InitForm()
|
||||
ShowFormTitle()
|
||||
End Sub
|
||||
|
||||
Private Sub FrmStationDesign_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
InitForm()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub PicStation_DoubleClick(sender As Object, e As EventArgs) Handles PicStation.DoubleClick
|
||||
Using dlgOpenFile As New OpenFileDialog
|
||||
dlgOpenFile.Filter = $"设备图像 (*.bmp;*.gif;*.jpg;*.png)|*.bmp;*.gif;*.jpg;*.png"
|
||||
If dlgOpenFile.ShowDialog = DialogResult.OK Then
|
||||
Try
|
||||
Dim imagePath As String = dlgOpenFile.FileName
|
||||
PicStation.Image = ImageProcessor.ImageProcessor.GetBitmapImage(imagePath)
|
||||
|
||||
'更新图像预览图
|
||||
If String.IsNullOrEmpty(StationPacket.ImageFileName) Then '若图像路径不存在,则更新图像路径
|
||||
Dim imgSavePath As String = $"{UtsPath.StationPacketResourceDirPath(StationPacket.Name)}\{StationPacket.ParentStation.Index}.jpg"
|
||||
PicStation.Image.Save(imgSavePath)
|
||||
|
||||
StationPacket.ImageFileName = $"{StationPacket.ParentStation.Index}.jpg" '更新站图像路径
|
||||
Else
|
||||
Dim imgSavePath As String = $"{UtsPath.StationPacketResourceDirPath(StationPacket.Name)}\{StationPacket.ImageFileName}"
|
||||
PicStation.Image.Save(imgSavePath)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox($"设置项目图像失败,{ex.Message}")
|
||||
End Try
|
||||
End If
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub UpdateStationPacket()
|
||||
StationPacket.ModifiedTime = Now
|
||||
StationPacket.PassWord = TxtEditPwd.Text
|
||||
StationPacket.ValidDate = DtpValidDate.Value
|
||||
StationPacket.CurrentImprint = New StationPacketImprint(RtxCurrentImprint.Text)
|
||||
If _isAutoAugment Then
|
||||
StationPacket.StationVersion += 1
|
||||
Else
|
||||
StationPacket.StationVersion = CInt(NudStationVersion.Value)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AfterReleasePacketSuccess()
|
||||
RtxCurrentImprint.Text = StationPacket.CurrentImprint.ToString()
|
||||
RtxHistoryImprint.Text = ProjectStationPacket.PacketImprintsToString(StationPacket.HistoryImprints)
|
||||
NudStationVersion.Value = StationPacket.StationVersion
|
||||
|
||||
ShowFormTitle(StationPacket.Name)
|
||||
End Sub
|
||||
|
||||
Private Sub AfterReleasePacketFail()
|
||||
RtxCurrentImprint.Text = StationPacket.CurrentImprint.ToString()
|
||||
RtxHistoryImprint.Text = ProjectStationPacket.PacketImprintsToString(StationPacket.HistoryImprints)
|
||||
NudStationVersion.Value = StationPacket.StationVersion
|
||||
|
||||
ShowFormTitle(StationPacket.Name)
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnReleaseStation_Click(sender As Object, e As EventArgs) Handles TsBtnReleaseStation.Click
|
||||
Try
|
||||
UpdateStationPacket()
|
||||
StationPacket.ReleasePacket()
|
||||
AfterReleasePacketSuccess()
|
||||
|
||||
' RaiseEvent ReleaseStationSuccessed(StationPacket.ParentStation)
|
||||
MsgBox($"项目站包 {StationPacket.FileName} 发布成功!")
|
||||
Catch ex As Exception
|
||||
MsgBox($"项目站包发布失败,{ex.Message}")
|
||||
|
||||
AfterReleasePacketFail()
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub ChkAutoAugment_CheckedChanged(sender As Object, e As EventArgs) Handles ChkAutoAugment.CheckedChanged
|
||||
_isAutoAugment = ChkAutoAugment.Checked
|
||||
NudStationVersion.Enabled = Not _isAutoAugment
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
601
UTS_Core/UTSModule/Project/FrmStationPlan.Designer.vb
generated
Normal file
601
UTS_Core/UTSModule/Project/FrmStationPlan.Designer.vb
generated
Normal file
@@ -0,0 +1,601 @@
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Namespace UTSModule.Project
|
||||
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class 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(FrmStationPlan))
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.TsBtnReleaseStation = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.TsBtnLockedEdit = New System.Windows.Forms.ToolStripButton()
|
||||
Me.TsBtnMouseFollow = New System.Windows.Forms.ToolStripButton()
|
||||
Me.SplStationPlan = New System.Windows.Forms.SplitContainer()
|
||||
Me.SplPlanDesign = New System.Windows.Forms.SplitContainer()
|
||||
Me.GrpStationTest = New System.Windows.Forms.GroupBox()
|
||||
Me.GrdTestPlan = New FlexCell.Grid()
|
||||
Me.CmsStationPlan = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.MsiAddPlanRow = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MsiPlanAddRow = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MsiPlanAddRows = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.删除一行ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.修改主题ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.默认主题ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.调整字体ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.ConsoleToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.微软雅黑ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.调整字色ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.红色ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.橙色ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.其他ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.调整背景ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.红色ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.橙色ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.其他ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.对齐方式ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.上左ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.上左ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.上层居右ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.中层居左ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.中层居中ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.中层居右ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.下层居左ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.下层居中ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.下层居右ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.内容自适应ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.刷新ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.GrpSingleRowInfo = New System.Windows.Forms.GroupBox()
|
||||
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.GrdSingleRowInfo = New FlexCell.Grid()
|
||||
Me.CmsSingleRow = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.RtxColTip = New System.Windows.Forms.RichTextBox()
|
||||
Me.GrpOutputInfo = New System.Windows.Forms.GroupBox()
|
||||
Me.TabControl1 = New System.Windows.Forms.TabControl()
|
||||
Me.TpOutputInfo = New System.Windows.Forms.TabPage()
|
||||
Me.RtxOutputInfo = New System.Windows.Forms.RichTextBox()
|
||||
Me.TpTerminal = New System.Windows.Forms.TabPage()
|
||||
Me.RtxTerminal = New System.Windows.Forms.RichTextBox()
|
||||
Me.ToolStrip1.SuspendLayout()
|
||||
CType(Me.SplStationPlan, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplStationPlan.Panel1.SuspendLayout()
|
||||
Me.SplStationPlan.Panel2.SuspendLayout()
|
||||
Me.SplStationPlan.SuspendLayout()
|
||||
CType(Me.SplPlanDesign, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplPlanDesign.Panel1.SuspendLayout()
|
||||
Me.SplPlanDesign.Panel2.SuspendLayout()
|
||||
Me.SplPlanDesign.SuspendLayout()
|
||||
Me.GrpStationTest.SuspendLayout()
|
||||
Me.CmsStationPlan.SuspendLayout()
|
||||
Me.GrpSingleRowInfo.SuspendLayout()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
Me.GrpOutputInfo.SuspendLayout()
|
||||
Me.TabControl1.SuspendLayout()
|
||||
Me.TpOutputInfo.SuspendLayout()
|
||||
Me.TpTerminal.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.TsBtnReleaseStation, Me.ToolStripSeparator1, Me.TsBtnLockedEdit, Me.TsBtnMouseFollow})
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(784, 25)
|
||||
Me.ToolStrip1.TabIndex = 7
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'TsBtnReleaseStation
|
||||
'
|
||||
Me.TsBtnReleaseStation.Image = CType(resources.GetObject("TsBtnReleaseStation.Image"), System.Drawing.Image)
|
||||
Me.TsBtnReleaseStation.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnReleaseStation.Name = "TsBtnReleaseStation"
|
||||
Me.TsBtnReleaseStation.Size = New System.Drawing.Size(76, 22)
|
||||
Me.TsBtnReleaseStation.Text = "发布站包"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 25)
|
||||
'
|
||||
'TsBtnLockedEdit
|
||||
'
|
||||
Me.TsBtnLockedEdit.Image = CType(resources.GetObject("TsBtnLockedEdit.Image"), System.Drawing.Image)
|
||||
Me.TsBtnLockedEdit.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnLockedEdit.Name = "TsBtnLockedEdit"
|
||||
Me.TsBtnLockedEdit.Size = New System.Drawing.Size(76, 22)
|
||||
Me.TsBtnLockedEdit.Text = "解锁编辑"
|
||||
'
|
||||
'TsBtnMouseFollow
|
||||
'
|
||||
Me.TsBtnMouseFollow.Image = CType(resources.GetObject("TsBtnMouseFollow.Image"), System.Drawing.Image)
|
||||
Me.TsBtnMouseFollow.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.TsBtnMouseFollow.Name = "TsBtnMouseFollow"
|
||||
Me.TsBtnMouseFollow.Size = New System.Drawing.Size(76, 22)
|
||||
Me.TsBtnMouseFollow.Text = "光标预览"
|
||||
'
|
||||
'SplStationPlan
|
||||
'
|
||||
Me.SplStationPlan.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplStationPlan.Location = New System.Drawing.Point(0, 25)
|
||||
Me.SplStationPlan.Name = "SplStationPlan"
|
||||
Me.SplStationPlan.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplStationPlan.Panel1
|
||||
'
|
||||
Me.SplStationPlan.Panel1.Controls.Add(Me.SplPlanDesign)
|
||||
'
|
||||
'SplStationPlan.Panel2
|
||||
'
|
||||
Me.SplStationPlan.Panel2.Controls.Add(Me.GrpOutputInfo)
|
||||
Me.SplStationPlan.Size = New System.Drawing.Size(784, 536)
|
||||
Me.SplStationPlan.SplitterDistance = 396
|
||||
Me.SplStationPlan.TabIndex = 9
|
||||
'
|
||||
'SplPlanDesign
|
||||
'
|
||||
Me.SplPlanDesign.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplPlanDesign.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplPlanDesign.Name = "SplPlanDesign"
|
||||
'
|
||||
'SplPlanDesign.Panel1
|
||||
'
|
||||
Me.SplPlanDesign.Panel1.Controls.Add(Me.GrpStationTest)
|
||||
'
|
||||
'SplPlanDesign.Panel2
|
||||
'
|
||||
Me.SplPlanDesign.Panel2.Controls.Add(Me.GrpSingleRowInfo)
|
||||
Me.SplPlanDesign.Size = New System.Drawing.Size(784, 396)
|
||||
Me.SplPlanDesign.SplitterDistance = 524
|
||||
Me.SplPlanDesign.TabIndex = 0
|
||||
'
|
||||
'GrpStationTest
|
||||
'
|
||||
Me.GrpStationTest.Controls.Add(Me.GrdTestPlan)
|
||||
Me.GrpStationTest.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrpStationTest.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrpStationTest.Name = "GrpStationTest"
|
||||
Me.GrpStationTest.Size = New System.Drawing.Size(524, 396)
|
||||
Me.GrpStationTest.TabIndex = 45
|
||||
Me.GrpStationTest.TabStop = False
|
||||
Me.GrpStationTest.Text = "完整流程"
|
||||
'
|
||||
'GrdTestPlan
|
||||
'
|
||||
Me.GrdTestPlan.BorderColor = System.Drawing.Color.Transparent
|
||||
Me.GrdTestPlan.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdTestPlan.CheckedImage = CType(resources.GetObject("GrdTestPlan.CheckedImage"), System.Drawing.Bitmap)
|
||||
Me.GrdTestPlan.ContextMenuStrip = Me.CmsStationPlan
|
||||
Me.GrdTestPlan.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdTestPlan.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdTestPlan.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdTestPlan.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdTestPlan.Location = New System.Drawing.Point(3, 17)
|
||||
Me.GrdTestPlan.Name = "GrdTestPlan"
|
||||
Me.GrdTestPlan.Size = New System.Drawing.Size(518, 376)
|
||||
Me.GrdTestPlan.TabIndex = 44
|
||||
Me.GrdTestPlan.UncheckedImage = CType(resources.GetObject("GrdTestPlan.UncheckedImage"), System.Drawing.Bitmap)
|
||||
'
|
||||
'CmsStationPlan
|
||||
'
|
||||
Me.CmsStationPlan.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MsiAddPlanRow, Me.删除一行ToolStripMenuItem, Me.修改主题ToolStripMenuItem, Me.调整字体ToolStripMenuItem, Me.调整字色ToolStripMenuItem, Me.调整背景ToolStripMenuItem, Me.对齐方式ToolStripMenuItem, Me.内容自适应ToolStripMenuItem, Me.刷新ToolStripMenuItem})
|
||||
Me.CmsStationPlan.Name = "CmsStationPlan"
|
||||
Me.CmsStationPlan.Size = New System.Drawing.Size(181, 224)
|
||||
'
|
||||
'MsiAddPlanRow
|
||||
'
|
||||
Me.MsiAddPlanRow.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.MsiPlanAddRow, Me.MsiPlanAddRows})
|
||||
Me.MsiAddPlanRow.Name = "MsiAddPlanRow"
|
||||
Me.MsiAddPlanRow.Size = New System.Drawing.Size(180, 22)
|
||||
Me.MsiAddPlanRow.Text = "新增流程行"
|
||||
'
|
||||
'MsiPlanAddRow
|
||||
'
|
||||
Me.MsiPlanAddRow.Name = "MsiPlanAddRow"
|
||||
Me.MsiPlanAddRow.Size = New System.Drawing.Size(180, 22)
|
||||
Me.MsiPlanAddRow.Text = "新增一行"
|
||||
'
|
||||
'MsiPlanAddRows
|
||||
'
|
||||
Me.MsiPlanAddRows.Name = "MsiPlanAddRows"
|
||||
Me.MsiPlanAddRows.Size = New System.Drawing.Size(180, 22)
|
||||
Me.MsiPlanAddRows.Text = "新增多行"
|
||||
'
|
||||
'删除一行ToolStripMenuItem
|
||||
'
|
||||
Me.删除一行ToolStripMenuItem.Name = "删除一行ToolStripMenuItem"
|
||||
Me.删除一行ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.删除一行ToolStripMenuItem.Text = "删除流程行"
|
||||
'
|
||||
'修改主题ToolStripMenuItem
|
||||
'
|
||||
Me.修改主题ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.默认主题ToolStripMenuItem})
|
||||
Me.修改主题ToolStripMenuItem.Name = "修改主题ToolStripMenuItem"
|
||||
Me.修改主题ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.修改主题ToolStripMenuItem.Text = "修改主题"
|
||||
'
|
||||
'默认主题ToolStripMenuItem
|
||||
'
|
||||
Me.默认主题ToolStripMenuItem.Name = "默认主题ToolStripMenuItem"
|
||||
Me.默认主题ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.默认主题ToolStripMenuItem.Text = "默认主题"
|
||||
'
|
||||
'调整字体ToolStripMenuItem
|
||||
'
|
||||
Me.调整字体ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ConsoleToolStripMenuItem, Me.微软雅黑ToolStripMenuItem})
|
||||
Me.调整字体ToolStripMenuItem.Name = "调整字体ToolStripMenuItem"
|
||||
Me.调整字体ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.调整字体ToolStripMenuItem.Text = "修改字体"
|
||||
'
|
||||
'ConsoleToolStripMenuItem
|
||||
'
|
||||
Me.ConsoleToolStripMenuItem.Name = "ConsoleToolStripMenuItem"
|
||||
Me.ConsoleToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.ConsoleToolStripMenuItem.Text = "Console"
|
||||
'
|
||||
'微软雅黑ToolStripMenuItem
|
||||
'
|
||||
Me.微软雅黑ToolStripMenuItem.Name = "微软雅黑ToolStripMenuItem"
|
||||
Me.微软雅黑ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.微软雅黑ToolStripMenuItem.Text = "微软雅黑"
|
||||
'
|
||||
'调整字色ToolStripMenuItem
|
||||
'
|
||||
Me.调整字色ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.红色ToolStripMenuItem, Me.橙色ToolStripMenuItem, Me.其他ToolStripMenuItem1})
|
||||
Me.调整字色ToolStripMenuItem.Name = "调整字色ToolStripMenuItem"
|
||||
Me.调整字色ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.调整字色ToolStripMenuItem.Text = "修改字色"
|
||||
'
|
||||
'红色ToolStripMenuItem
|
||||
'
|
||||
Me.红色ToolStripMenuItem.Name = "红色ToolStripMenuItem"
|
||||
Me.红色ToolStripMenuItem.Size = New System.Drawing.Size(109, 22)
|
||||
Me.红色ToolStripMenuItem.Text = "红色"
|
||||
'
|
||||
'橙色ToolStripMenuItem
|
||||
'
|
||||
Me.橙色ToolStripMenuItem.Name = "橙色ToolStripMenuItem"
|
||||
Me.橙色ToolStripMenuItem.Size = New System.Drawing.Size(109, 22)
|
||||
Me.橙色ToolStripMenuItem.Text = "橙色"
|
||||
'
|
||||
'其他ToolStripMenuItem1
|
||||
'
|
||||
Me.其他ToolStripMenuItem1.Name = "其他ToolStripMenuItem1"
|
||||
Me.其他ToolStripMenuItem1.Size = New System.Drawing.Size(109, 22)
|
||||
Me.其他ToolStripMenuItem1.Text = "其他..."
|
||||
'
|
||||
'调整背景ToolStripMenuItem
|
||||
'
|
||||
Me.调整背景ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.红色ToolStripMenuItem1, Me.橙色ToolStripMenuItem1, Me.其他ToolStripMenuItem})
|
||||
Me.调整背景ToolStripMenuItem.Name = "调整背景ToolStripMenuItem"
|
||||
Me.调整背景ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.调整背景ToolStripMenuItem.Text = "修改背景色"
|
||||
'
|
||||
'红色ToolStripMenuItem1
|
||||
'
|
||||
Me.红色ToolStripMenuItem1.Name = "红色ToolStripMenuItem1"
|
||||
Me.红色ToolStripMenuItem1.Size = New System.Drawing.Size(180, 22)
|
||||
Me.红色ToolStripMenuItem1.Text = "红色"
|
||||
'
|
||||
'橙色ToolStripMenuItem1
|
||||
'
|
||||
Me.橙色ToolStripMenuItem1.Name = "橙色ToolStripMenuItem1"
|
||||
Me.橙色ToolStripMenuItem1.Size = New System.Drawing.Size(180, 22)
|
||||
Me.橙色ToolStripMenuItem1.Text = "橙色"
|
||||
'
|
||||
'其他ToolStripMenuItem
|
||||
'
|
||||
Me.其他ToolStripMenuItem.Name = "其他ToolStripMenuItem"
|
||||
Me.其他ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.其他ToolStripMenuItem.Text = "其他..."
|
||||
'
|
||||
'对齐方式ToolStripMenuItem
|
||||
'
|
||||
Me.对齐方式ToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.上左ToolStripMenuItem, Me.上左ToolStripMenuItem1, Me.上层居右ToolStripMenuItem, Me.中层居左ToolStripMenuItem, Me.中层居中ToolStripMenuItem, Me.中层居右ToolStripMenuItem, Me.下层居左ToolStripMenuItem, Me.下层居中ToolStripMenuItem, Me.下层居右ToolStripMenuItem})
|
||||
Me.对齐方式ToolStripMenuItem.Name = "对齐方式ToolStripMenuItem"
|
||||
Me.对齐方式ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.对齐方式ToolStripMenuItem.Text = "对齐方式"
|
||||
'
|
||||
'上左ToolStripMenuItem
|
||||
'
|
||||
Me.上左ToolStripMenuItem.Name = "上左ToolStripMenuItem"
|
||||
Me.上左ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.上左ToolStripMenuItem.Text = "上层居左"
|
||||
'
|
||||
'上左ToolStripMenuItem1
|
||||
'
|
||||
Me.上左ToolStripMenuItem1.Name = "上左ToolStripMenuItem1"
|
||||
Me.上左ToolStripMenuItem1.Size = New System.Drawing.Size(124, 22)
|
||||
Me.上左ToolStripMenuItem1.Text = "上层居中"
|
||||
'
|
||||
'上层居右ToolStripMenuItem
|
||||
'
|
||||
Me.上层居右ToolStripMenuItem.Name = "上层居右ToolStripMenuItem"
|
||||
Me.上层居右ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.上层居右ToolStripMenuItem.Text = "上层居右"
|
||||
'
|
||||
'中层居左ToolStripMenuItem
|
||||
'
|
||||
Me.中层居左ToolStripMenuItem.Name = "中层居左ToolStripMenuItem"
|
||||
Me.中层居左ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.中层居左ToolStripMenuItem.Text = "中层居左"
|
||||
'
|
||||
'中层居中ToolStripMenuItem
|
||||
'
|
||||
Me.中层居中ToolStripMenuItem.Name = "中层居中ToolStripMenuItem"
|
||||
Me.中层居中ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.中层居中ToolStripMenuItem.Text = "中层居中"
|
||||
'
|
||||
'中层居右ToolStripMenuItem
|
||||
'
|
||||
Me.中层居右ToolStripMenuItem.Name = "中层居右ToolStripMenuItem"
|
||||
Me.中层居右ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.中层居右ToolStripMenuItem.Text = "中层居右"
|
||||
'
|
||||
'下层居左ToolStripMenuItem
|
||||
'
|
||||
Me.下层居左ToolStripMenuItem.Name = "下层居左ToolStripMenuItem"
|
||||
Me.下层居左ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.下层居左ToolStripMenuItem.Text = "下层居左"
|
||||
'
|
||||
'下层居中ToolStripMenuItem
|
||||
'
|
||||
Me.下层居中ToolStripMenuItem.Name = "下层居中ToolStripMenuItem"
|
||||
Me.下层居中ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.下层居中ToolStripMenuItem.Text = "下层居中"
|
||||
'
|
||||
'下层居右ToolStripMenuItem
|
||||
'
|
||||
Me.下层居右ToolStripMenuItem.Name = "下层居右ToolStripMenuItem"
|
||||
Me.下层居右ToolStripMenuItem.Size = New System.Drawing.Size(124, 22)
|
||||
Me.下层居右ToolStripMenuItem.Text = "下层居右"
|
||||
'
|
||||
'内容自适应ToolStripMenuItem
|
||||
'
|
||||
Me.内容自适应ToolStripMenuItem.Name = "内容自适应ToolStripMenuItem"
|
||||
Me.内容自适应ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.内容自适应ToolStripMenuItem.Text = "内容自适应"
|
||||
'
|
||||
'刷新ToolStripMenuItem
|
||||
'
|
||||
Me.刷新ToolStripMenuItem.Name = "刷新ToolStripMenuItem"
|
||||
Me.刷新ToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
|
||||
Me.刷新ToolStripMenuItem.Text = "刷新提示"
|
||||
'
|
||||
'GrpSingleRowInfo
|
||||
'
|
||||
Me.GrpSingleRowInfo.Controls.Add(Me.SplitContainer1)
|
||||
Me.GrpSingleRowInfo.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrpSingleRowInfo.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrpSingleRowInfo.Name = "GrpSingleRowInfo"
|
||||
Me.GrpSingleRowInfo.Size = New System.Drawing.Size(256, 396)
|
||||
Me.GrpSingleRowInfo.TabIndex = 1
|
||||
Me.GrpSingleRowInfo.TabStop = False
|
||||
Me.GrpSingleRowInfo.Text = "单行信息"
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(3, 17)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.GrdSingleRowInfo)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.RtxColTip)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(250, 376)
|
||||
Me.SplitContainer1.SplitterDistance = 294
|
||||
Me.SplitContainer1.TabIndex = 1
|
||||
'
|
||||
'GrdSingleRowInfo
|
||||
'
|
||||
Me.GrdSingleRowInfo.BorderColor = System.Drawing.Color.Transparent
|
||||
Me.GrdSingleRowInfo.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
Me.GrdSingleRowInfo.CheckedImage = Nothing
|
||||
Me.GrdSingleRowInfo.ContextMenuStrip = Me.CmsSingleRow
|
||||
Me.GrdSingleRowInfo.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.GrdSingleRowInfo.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrdSingleRowInfo.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.GrdSingleRowInfo.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.GrdSingleRowInfo.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrdSingleRowInfo.Name = "GrdSingleRowInfo"
|
||||
Me.GrdSingleRowInfo.ScrollBars = FlexCell.ScrollBarsEnum.Vertical
|
||||
Me.GrdSingleRowInfo.Size = New System.Drawing.Size(250, 294)
|
||||
Me.GrdSingleRowInfo.TabIndex = 0
|
||||
Me.GrdSingleRowInfo.UncheckedImage = Nothing
|
||||
'
|
||||
'CmsSingleRow
|
||||
'
|
||||
Me.CmsSingleRow.Name = "CmsSingleRow"
|
||||
Me.CmsSingleRow.Size = New System.Drawing.Size(61, 4)
|
||||
'
|
||||
'RtxColTip
|
||||
'
|
||||
Me.RtxColTip.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxColTip.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxColTip.Enabled = False
|
||||
Me.RtxColTip.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RtxColTip.Name = "RtxColTip"
|
||||
Me.RtxColTip.Size = New System.Drawing.Size(250, 78)
|
||||
Me.RtxColTip.TabIndex = 0
|
||||
Me.RtxColTip.Text = ""
|
||||
'
|
||||
'GrpOutputInfo
|
||||
'
|
||||
Me.GrpOutputInfo.Controls.Add(Me.TabControl1)
|
||||
Me.GrpOutputInfo.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.GrpOutputInfo.Location = New System.Drawing.Point(0, 0)
|
||||
Me.GrpOutputInfo.Name = "GrpOutputInfo"
|
||||
Me.GrpOutputInfo.Size = New System.Drawing.Size(784, 136)
|
||||
Me.GrpOutputInfo.TabIndex = 0
|
||||
Me.GrpOutputInfo.TabStop = False
|
||||
Me.GrpOutputInfo.Text = "输出内容"
|
||||
'
|
||||
'TabControl1
|
||||
'
|
||||
Me.TabControl1.Controls.Add(Me.TpOutputInfo)
|
||||
Me.TabControl1.Controls.Add(Me.TpTerminal)
|
||||
Me.TabControl1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.TabControl1.Location = New System.Drawing.Point(3, 17)
|
||||
Me.TabControl1.Name = "TabControl1"
|
||||
Me.TabControl1.SelectedIndex = 0
|
||||
Me.TabControl1.Size = New System.Drawing.Size(778, 116)
|
||||
Me.TabControl1.TabIndex = 1
|
||||
'
|
||||
'TpOutputInfo
|
||||
'
|
||||
Me.TpOutputInfo.Controls.Add(Me.RtxOutputInfo)
|
||||
Me.TpOutputInfo.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TpOutputInfo.Name = "TpOutputInfo"
|
||||
Me.TpOutputInfo.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TpOutputInfo.Size = New System.Drawing.Size(770, 90)
|
||||
Me.TpOutputInfo.TabIndex = 0
|
||||
Me.TpOutputInfo.Text = "输出信息"
|
||||
Me.TpOutputInfo.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RtxOutputInfo
|
||||
'
|
||||
Me.RtxOutputInfo.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxOutputInfo.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxOutputInfo.Location = New System.Drawing.Point(3, 3)
|
||||
Me.RtxOutputInfo.Name = "RtxOutputInfo"
|
||||
Me.RtxOutputInfo.Size = New System.Drawing.Size(764, 84)
|
||||
Me.RtxOutputInfo.TabIndex = 0
|
||||
Me.RtxOutputInfo.Text = ""
|
||||
'
|
||||
'TpTerminal
|
||||
'
|
||||
Me.TpTerminal.Controls.Add(Me.RtxTerminal)
|
||||
Me.TpTerminal.Location = New System.Drawing.Point(4, 22)
|
||||
Me.TpTerminal.Name = "TpTerminal"
|
||||
Me.TpTerminal.Size = New System.Drawing.Size(770, 90)
|
||||
Me.TpTerminal.TabIndex = 1
|
||||
Me.TpTerminal.Text = "运行终端"
|
||||
Me.TpTerminal.UseVisualStyleBackColor = True
|
||||
'
|
||||
'RtxTerminal
|
||||
'
|
||||
Me.RtxTerminal.BorderStyle = System.Windows.Forms.BorderStyle.None
|
||||
Me.RtxTerminal.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.RtxTerminal.Location = New System.Drawing.Point(0, 0)
|
||||
Me.RtxTerminal.Name = "RtxTerminal"
|
||||
Me.RtxTerminal.Size = New System.Drawing.Size(770, 90)
|
||||
Me.RtxTerminal.TabIndex = 0
|
||||
Me.RtxTerminal.Text = ""
|
||||
'
|
||||
'FrmStationPlan
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(784, 561)
|
||||
Me.Controls.Add(Me.SplStationPlan)
|
||||
Me.Controls.Add(Me.ToolStrip1)
|
||||
Me.Name = "FrmStationPlan"
|
||||
Me.Text = "FrmStationPlan"
|
||||
Me.ToolStrip1.ResumeLayout(False)
|
||||
Me.ToolStrip1.PerformLayout()
|
||||
Me.SplStationPlan.Panel1.ResumeLayout(False)
|
||||
Me.SplStationPlan.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplStationPlan, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplStationPlan.ResumeLayout(False)
|
||||
Me.SplPlanDesign.Panel1.ResumeLayout(False)
|
||||
Me.SplPlanDesign.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplPlanDesign, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplPlanDesign.ResumeLayout(False)
|
||||
Me.GrpStationTest.ResumeLayout(False)
|
||||
Me.CmsStationPlan.ResumeLayout(False)
|
||||
Me.GrpSingleRowInfo.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.GrpOutputInfo.ResumeLayout(False)
|
||||
Me.TabControl1.ResumeLayout(False)
|
||||
Me.TpOutputInfo.ResumeLayout(False)
|
||||
Me.TpTerminal.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ToolStrip1 As ToolStrip
|
||||
Friend WithEvents SplStationPlan As SplitContainer
|
||||
Friend WithEvents SplPlanDesign As SplitContainer
|
||||
Friend WithEvents GrdTestPlan As FlexCell.Grid
|
||||
Friend WithEvents GrdSingleRowInfo As FlexCell.Grid
|
||||
Friend WithEvents TsBtnReleaseStation As ToolStripButton
|
||||
Friend WithEvents GrpStationTest As GroupBox
|
||||
Friend WithEvents GrpSingleRowInfo As GroupBox
|
||||
Friend WithEvents GrpOutputInfo As GroupBox
|
||||
Friend WithEvents RtxOutputInfo As RichTextBox
|
||||
Friend WithEvents TabControl1 As TabControl
|
||||
Friend WithEvents TpOutputInfo As TabPage
|
||||
Friend WithEvents ToolStripSeparator1 As ToolStripSeparator
|
||||
Friend WithEvents TsBtnLockedEdit As ToolStripButton
|
||||
Friend WithEvents CmsStationPlan As ContextMenuStrip
|
||||
Friend WithEvents MsiAddPlanRow As ToolStripMenuItem
|
||||
Friend WithEvents 删除一行ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 修改主题ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 调整字体ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 调整字色ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 调整背景ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 对齐方式ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 内容自适应ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 刷新ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents MsiPlanAddRow As ToolStripMenuItem
|
||||
Friend WithEvents MsiPlanAddRows As ToolStripMenuItem
|
||||
Friend WithEvents 默认主题ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents ConsoleToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 微软雅黑ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 红色ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 橙色ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 其他ToolStripMenuItem1 As ToolStripMenuItem
|
||||
Friend WithEvents 红色ToolStripMenuItem1 As ToolStripMenuItem
|
||||
Friend WithEvents 橙色ToolStripMenuItem1 As ToolStripMenuItem
|
||||
Friend WithEvents 其他ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 上左ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 上左ToolStripMenuItem1 As ToolStripMenuItem
|
||||
Friend WithEvents 上层居右ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 中层居左ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 中层居中ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 中层居右ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 下层居左ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 下层居中ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents 下层居右ToolStripMenuItem As ToolStripMenuItem
|
||||
Friend WithEvents CmsSingleRow As ContextMenuStrip
|
||||
Friend WithEvents TpTerminal As TabPage
|
||||
Friend WithEvents RtxTerminal As RichTextBox
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents RtxColTip As RichTextBox
|
||||
Friend WithEvents TsBtnMouseFollow As ToolStripButton
|
||||
End Class
|
||||
End Namespace
|
||||
239
UTS_Core/UTSModule/Project/FrmStationPlan.resx
Normal file
239
UTS_Core/UTSModule/Project/FrmStationPlan.resx
Normal file
@@ -0,0 +1,239 @@
|
||||
<?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="ToolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="ToolStrip1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="TsBtnReleaseStation.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TsBtnLockedEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="TsBtnMouseFollow.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="SplStationPlan.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="SplPlanDesign.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GrpStationTest.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GrdTestPlan.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="GrdTestPlan.CheckedImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
Qk3OAAAAAAAAAHYAAAAoAAAACwAAAAsAAAABAAQAAAAAAAAAAADEDgAAxA4AABAAAAAQAAAAAAAA/wAA
|
||||
gP8AgAD/AICA/4AAAP+AAID/gIAA/8DAwP+AgID/AAD//wD/AP8A/////wAA//8A/////wD//////4iI
|
||||
iIiIgAAAj/////+AAACP/w///4AAAI/wAP//gAAAjwAAD/+AAACPAPAA/4AAAI8P/wAPgAAAj///8A+A
|
||||
AACP////D4AAAI//////gAAAiIiIiIiAAAA=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="CmsStationPlan.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>129, 17</value>
|
||||
</metadata>
|
||||
<data name="GrdTestPlan.UncheckedImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
Qk3OAAAAAAAAAHYAAAAoAAAACwAAAAsAAAABAAQAAAAAAAAAAADEDgAAxA4AABAAAAAQAAAAAAAA/wAA
|
||||
gP8AgAD/AICA/4AAAP+AAID/gIAA/8DAwP+AgID/AAD//wD/AP8A/////wAA//8A/////wD//////4iI
|
||||
iIiIgAAAj/////+AAACP/////4AAAI//////gAAAj/////+AAACP/////4AAAI//////gAAAj/////+A
|
||||
AACP/////4AAAI//////gAAAiIiIiIiAAAA=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="GrpSingleRowInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="SplitContainer1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GrdSingleRowInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="CmsSingleRow.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>273, 17</value>
|
||||
</metadata>
|
||||
<metadata name="RtxColTip.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="GrpOutputInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TabControl1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TpOutputInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="RtxOutputInfo.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="TpTerminal.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="RtxTerminal.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
711
UTS_Core/UTSModule/Project/FrmStationPlan.vb
Normal file
711
UTS_Core/UTSModule/Project/FrmStationPlan.vb
Normal file
@@ -0,0 +1,711 @@
|
||||
Imports System.Drawing
|
||||
Imports System.Windows.Forms
|
||||
Imports FlexCell
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class FrmStationPlan
|
||||
Private _isShown As Boolean
|
||||
|
||||
Public Property StationPlan() As ProjectStationPlan
|
||||
|
||||
Public Property StationPlanCommandHelpers As Dictionary(Of String, StationPlanCommandHelper)
|
||||
|
||||
Public Property StationPlanColHelpers() As Dictionary(Of String, PlanColHelper)
|
||||
|
||||
Public Sub ShowForm(parentControl As Control)
|
||||
FormBorderStyle = FormBorderStyle.None
|
||||
TopLevel = False
|
||||
Dock = DockStyle.Fill
|
||||
Parent = parentControl
|
||||
Enabled = StationPlan IsNot Nothing
|
||||
|
||||
Show()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub Station_Changed(station As StationInfo)
|
||||
StationPlan = station.Packet.StationPlan
|
||||
|
||||
Enabled = StationPlan IsNot Nothing
|
||||
|
||||
If StationPlan IsNot Nothing Then
|
||||
GrdTestPlan.AutoRedraw = False
|
||||
|
||||
GrdTestPlan.LoadFromStream(StationPlan.StationPlanGrid.ExportToStream())
|
||||
GrdTestPlan.ComboBox(StationPlanGrid.ColNameEnum.Command).Items.Clear()
|
||||
GrdTestPlan.ComboBox(StationPlanGrid.ColNameEnum.Command).Items.AddRange(StationPlanCommandHelpers.Keys.ToArray())
|
||||
|
||||
GrdTestPlan.AutoRedraw = True
|
||||
GrdTestPlan.Refresh()
|
||||
|
||||
StationPlan.StationPlanGrid.Dispose() '清空资源
|
||||
StationPlan.StationPlanGrid = GrdTestPlan '保证站包与站流程表指向内容一致
|
||||
|
||||
LockedTestPlanGrid(StationPlan.TestPlanLocked)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub LockedTestPlanGrid(testPlanLocked As Boolean)
|
||||
GrdTestPlan.Range(1, 1, GrdTestPlan.Rows - 1, GrdTestPlan.Cols - 1).Locked = testPlanLocked
|
||||
If testPlanLocked Then
|
||||
TsBtnLockedEdit.Text = $"解锁表格"
|
||||
TsBtnLockedEdit.ForeColor = Color.Red
|
||||
Else
|
||||
TsBtnLockedEdit.Text = $"加锁表格"
|
||||
TsBtnLockedEdit.ForeColor = Color.Green
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub TsBtnLockedEdit_Click(sender As Object, e As EventArgs) Handles TsBtnLockedEdit.Click
|
||||
If StationPlan.TestPlanLocked Then
|
||||
If StationPlan.ParentPacket.PassWord.Length > 0 Then
|
||||
Dim pwd As String = InputBox(String.Empty, $"请输入解锁密码")
|
||||
If String.Compare(pwd, StationPlan.ParentPacket.PassWord) <> 0 Then Return
|
||||
End If
|
||||
StationPlan.TestPlanLocked = False
|
||||
LockedTestPlanGrid(StationPlan.TestPlanLocked)
|
||||
Else
|
||||
StationPlan.TestPlanLocked = True
|
||||
LockedTestPlanGrid(StationPlan.TestPlanLocked)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub InitStationPlanCommandHelper()
|
||||
Try
|
||||
StationPlanCommandHelpers = StationPlanCommandHelper.InitCommandHelper(Database.Sqlite.ConnectionParams.Path, Database.Sqlite.ConnectionParams.Password)
|
||||
Catch ex As Exception
|
||||
Console.WriteLine($"InitStationPlanCommandHelper Error:{ex.Message}")
|
||||
End Try
|
||||
If StationPlanCommandHelpers Is Nothing Then
|
||||
StationPlanCommandHelpers = New Dictionary(Of String, StationPlanCommandHelper)()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub InitStationPlanColHelper()
|
||||
Try
|
||||
StationPlanColHelpers = PlanColHelper.InitPlanColHelper(Database.Sqlite.ConnectionParams.Path, Database.Sqlite.ConnectionParams.Password)
|
||||
Catch ex As Exception
|
||||
Console.WriteLine($"InitStationPlanColHelper Error:{ex.Message}")
|
||||
End Try
|
||||
|
||||
If StationPlanColHelpers Is Nothing Then
|
||||
StationPlanColHelpers = New Dictionary(Of String, PlanColHelper)()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub InitForm()
|
||||
Dim commands As String() = StationPlanCommandHelpers.Keys.ToArray()
|
||||
StationPlanGrid.InitGrid(GrdTestPlan, commands)
|
||||
SingleRowGrid.InitGrid(GrdSingleRowInfo, commands)
|
||||
End Sub
|
||||
|
||||
Private Sub FrmStationPlan_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
_isShown = False
|
||||
|
||||
InitStationPlanCommandHelper()
|
||||
|
||||
InitStationPlanColHelper()
|
||||
|
||||
InitForm()
|
||||
|
||||
_isShown = True
|
||||
End Sub
|
||||
|
||||
Private Sub TsBtnReleaseStation_Click(sender As Object, e As EventArgs) Handles TsBtnReleaseStation.Click
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "TestPlan"
|
||||
|
||||
Private Sub TestPlanSelChange(selRow As Integer, selCol As Integer)
|
||||
Static lastRow As Integer = 0
|
||||
Static lastCol As Integer = 0
|
||||
|
||||
If selRow < 1 OrElse selRow > GrdTestPlan.Rows - 1 Then Return
|
||||
If selCol < 0 OrElse selCol > GrdTestPlan.Cols - 1 Then Return
|
||||
|
||||
_cellChanged = GridCellChangedEnum.TestPlanSelChange
|
||||
|
||||
If lastRow <> selRow Then
|
||||
SyncTestPlanRow(selRow)
|
||||
ChangeSingleRowGridColName()
|
||||
|
||||
UpdateSingleRowTip(TestPlanColToSingleRow(selCol))
|
||||
lastRow = selRow
|
||||
End If
|
||||
|
||||
If lastCol <> selCol Then
|
||||
SingleRowSelChange(TestPlanColToSingleRow(selCol))
|
||||
lastCol = selCol
|
||||
End If
|
||||
|
||||
_cellChanged = GridCellChangedEnum.None
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 流程表格选中行修改时,将流程表格某行的内容,填充到单行信息表中
|
||||
''' </summary>
|
||||
''' <param name="selRow"></param>
|
||||
Private Sub SyncTestPlanRow(selRow As Integer)
|
||||
Dim col As Integer = SingleRowGrid.ColNameEnum.ColValue
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Step, col).Text = selRow.ToString()
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.[Label], col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.[Label]).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Action, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Action).Text
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Command, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Command).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Description, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Description).Text
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Retry, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Retry).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.RetryInterval, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.RetryInterval).Text
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Record, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Record).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.RecordName, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.RecordName).Text
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.PassGoto, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.PassGoto).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.FailGoto, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.FailGoto).Text
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.ErrorCode, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.ErrorCode).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.ErrorMessage, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.ErrorMessage).Text
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Help, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Help).Text
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter1, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Parameter1).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter2, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Parameter2).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter3, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Parameter3).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter4, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Parameter4).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter5, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Parameter5).Text
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter6, col).Text = GrdTestPlan.Cell(selRow, StationPlanGrid.ColNameEnum.Parameter6).Text
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 命令变更时,修改单行信息表中列名
|
||||
''' </summary>
|
||||
Private Sub ChangeSingleRowGridColName()
|
||||
Static colNameChanged As Boolean = False
|
||||
|
||||
Dim col As Integer = SingleRowGrid.ColNameEnum.ColValue
|
||||
Dim command As String = GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Command, col).Text
|
||||
Dim nameCol As Integer = SingleRowGrid.ColNameEnum.ColName
|
||||
|
||||
If String.IsNullOrEmpty(command) OrElse StationPlanCommandHelpers.ContainsKey(command) = False Then
|
||||
If colNameChanged Then
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter1, nameCol).Text = SingleRowGrid.RowNameEnum.Parameter1.ToString()
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter2, nameCol).Text = SingleRowGrid.RowNameEnum.Parameter2.ToString()
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter3, nameCol).Text = SingleRowGrid.RowNameEnum.Parameter3.ToString()
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter4, nameCol).Text = SingleRowGrid.RowNameEnum.Parameter4.ToString()
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter5, nameCol).Text = SingleRowGrid.RowNameEnum.Parameter5.ToString()
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter6, nameCol).Text = SingleRowGrid.RowNameEnum.Parameter6.ToString()
|
||||
|
||||
colNameChanged = False
|
||||
End If
|
||||
Else
|
||||
Dim commandHelper As StationPlanCommandHelper = StationPlanCommandHelpers.Item(command)
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter1, nameCol).Text = commandHelper.Params(0).Desc
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter2, nameCol).Text = commandHelper.Params(1).Desc
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter3, nameCol).Text = commandHelper.Params(2).Desc
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter4, nameCol).Text = commandHelper.Params(3).Desc
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter5, nameCol).Text = commandHelper.Params(4).Desc
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter6, nameCol).Text = commandHelper.Params(5).Desc
|
||||
|
||||
If colNameChanged = False Then colNameChanged = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub GrdTestPlan_SelChange(sender As Object, e As Grid.SelChangeEventArgs) Handles GrdTestPlan.SelChange
|
||||
TestPlanSelChange(e.FirstRow, e.FirstCol)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 测试流程表列号转换成单行信息表的对应行号
|
||||
''' </summary>
|
||||
''' <param name="col"></param>
|
||||
''' <returns></returns>
|
||||
Private Function TestPlanColToSingleRow(col As Integer) As Integer
|
||||
Dim row As Integer
|
||||
Select Case col
|
||||
Case StationPlanGrid.ColNameEnum.Step
|
||||
row = SingleRowGrid.RowNameEnum.Step
|
||||
|
||||
Case StationPlanGrid.ColNameEnum.[Label]
|
||||
row = SingleRowGrid.RowNameEnum.[Label]
|
||||
Case StationPlanGrid.ColNameEnum.Action
|
||||
row = SingleRowGrid.RowNameEnum.Action
|
||||
|
||||
Case StationPlanGrid.ColNameEnum.Command
|
||||
row = SingleRowGrid.RowNameEnum.Command
|
||||
Case StationPlanGrid.ColNameEnum.Description
|
||||
row = SingleRowGrid.RowNameEnum.Description
|
||||
|
||||
Case StationPlanGrid.ColNameEnum.Parameter1
|
||||
row = SingleRowGrid.RowNameEnum.Parameter1
|
||||
Case StationPlanGrid.ColNameEnum.Parameter2
|
||||
row = SingleRowGrid.RowNameEnum.Parameter2
|
||||
Case StationPlanGrid.ColNameEnum.Parameter3
|
||||
row = SingleRowGrid.RowNameEnum.Parameter3
|
||||
Case StationPlanGrid.ColNameEnum.Parameter4
|
||||
row = SingleRowGrid.RowNameEnum.Parameter4
|
||||
Case StationPlanGrid.ColNameEnum.Parameter5
|
||||
row = SingleRowGrid.RowNameEnum.Parameter5
|
||||
Case StationPlanGrid.ColNameEnum.Parameter6
|
||||
row = SingleRowGrid.RowNameEnum.Parameter6
|
||||
|
||||
Case StationPlanGrid.ColNameEnum.Retry
|
||||
row = SingleRowGrid.RowNameEnum.Retry
|
||||
Case StationPlanGrid.ColNameEnum.RetryInterval
|
||||
row = SingleRowGrid.RowNameEnum.RetryInterval
|
||||
|
||||
Case StationPlanGrid.ColNameEnum.Record
|
||||
row = SingleRowGrid.RowNameEnum.Record
|
||||
Case StationPlanGrid.ColNameEnum.RecordName
|
||||
row = SingleRowGrid.RowNameEnum.RecordName
|
||||
|
||||
Case StationPlanGrid.ColNameEnum.PassGoto
|
||||
row = SingleRowGrid.RowNameEnum.PassGoto
|
||||
Case StationPlanGrid.ColNameEnum.FailGoto
|
||||
row = SingleRowGrid.RowNameEnum.FailGoto
|
||||
|
||||
Case StationPlanGrid.ColNameEnum.ErrorCode
|
||||
row = SingleRowGrid.RowNameEnum.ErrorCode
|
||||
Case StationPlanGrid.ColNameEnum.ErrorMessage
|
||||
row = SingleRowGrid.RowNameEnum.ErrorMessage
|
||||
|
||||
Case StationPlanGrid.ColNameEnum.Help
|
||||
row = SingleRowGrid.RowNameEnum.Help
|
||||
Case Else
|
||||
Console.WriteLine($"SyncTestPlanChange Unknown Col:{col}")
|
||||
End Select
|
||||
Return row
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' 测试流程表内容修改时,同步更新单行信息表内容
|
||||
''' </summary>
|
||||
''' <param name="e"></param>
|
||||
Private Sub SyncTestPlanChange(e As Grid.CellChangingEventArgs)
|
||||
Dim row As Integer = TestPlanColToSingleRow(e.Col)
|
||||
Dim col As Integer = SingleRowGrid.ColNameEnum.ColValue
|
||||
|
||||
GrdSingleRowInfo.Cell(row, col).Text = GrdTestPlan.Cell(e.Row, e.Col).Text
|
||||
End Sub
|
||||
|
||||
Private _dropDownRow As Integer
|
||||
Private _dropDownCol As Integer
|
||||
|
||||
''' <summary>
|
||||
''' 测试流程表格命令变更时,应用帮助信息
|
||||
''' </summary>
|
||||
Private Sub GrdTestPlanCommandChanged()
|
||||
Dim key As String = GrdTestPlan.Cell(_dropDownRow, _dropDownCol).Text
|
||||
If StationPlanCommandHelpers.ContainsKey(key) Then
|
||||
Dim planCommandHelper As StationPlanCommandHelper = StationPlanCommandHelpers.Item(key)
|
||||
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Action).Text = "1"
|
||||
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Description).Text = planCommandHelper.CommandDesc
|
||||
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Parameter1).Text = planCommandHelper.Params(0).Value
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Parameter2).Text = planCommandHelper.Params(1).Value
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Parameter3).Text = planCommandHelper.Params(2).Value
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Parameter4).Text = planCommandHelper.Params(3).Value
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Parameter5).Text = planCommandHelper.Params(4).Value
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Parameter6).Text = planCommandHelper.Params(5).Value
|
||||
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Retry).Text = planCommandHelper.Retry
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.RetryInterval).Text = planCommandHelper.RetryInterval
|
||||
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Record).Text = planCommandHelper.Record
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.RecordName).Text = planCommandHelper.RecordName
|
||||
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.PassGoto).Text = planCommandHelper.PassGoto
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.FailGoto).Text = planCommandHelper.FailGoto
|
||||
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.ErrorCode).Text = planCommandHelper.ErrorCode
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.ErrorMessage).Text = planCommandHelper.ErrorMessage
|
||||
|
||||
GrdTestPlan.Cell(_dropDownRow, StationPlanGrid.ColNameEnum.Help).Text = planCommandHelper.Help
|
||||
End If
|
||||
|
||||
ChangeSingleRowGridColName() '变更单行信息表列名
|
||||
End Sub
|
||||
|
||||
Private Sub GrdTestPlan_CellChanging(sender As Object, e As Grid.CellChangingEventArgs) Handles GrdTestPlan.CellChanging
|
||||
If _isShown = False Then Return
|
||||
If _cellChanged = GridCellChangedEnum.None Then _cellChanged = GridCellChangedEnum.TestPlan
|
||||
|
||||
If _cellChanged = GridCellChangedEnum.TestPlan Then
|
||||
SyncTestPlanChange(e)
|
||||
_cellChanged = GridCellChangedEnum.None
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GrdTestPlan_ComboClick(sender As Object, e As Grid.ComboClickEventArgs) Handles GrdTestPlan.ComboClick
|
||||
If _dropDownCol = StationPlanGrid.ColNameEnum.Command Then
|
||||
GrdTestPlanCommandChanged()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GrdTestPlan_ComboDropDown(sender As Object, e As Grid.ComboDropDownEventArgs) Handles GrdTestPlan.ComboDropDown
|
||||
_dropDownRow = e.Row
|
||||
_dropDownCol = e.Col
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "SingleRow"
|
||||
Enum GridCellChangedEnum
|
||||
None
|
||||
TestPlan
|
||||
SingleRowInfo
|
||||
TestPlanSelChange
|
||||
End Enum
|
||||
|
||||
Private _cellChanged As GridCellChangedEnum = GridCellChangedEnum.None
|
||||
|
||||
Private _grdSingleRowDropRow As Integer
|
||||
Private _grdSingleRowDropCol As Integer
|
||||
|
||||
Private Function SingleRowToTestPlanCol(row As Integer) As Integer
|
||||
Dim col As Integer
|
||||
Select Case row
|
||||
Case SingleRowGrid.RowNameEnum.[Label]
|
||||
col = StationPlanGrid.ColNameEnum.[Label]
|
||||
Case SingleRowGrid.RowNameEnum.Action
|
||||
col = StationPlanGrid.ColNameEnum.Action
|
||||
|
||||
Case SingleRowGrid.RowNameEnum.Command
|
||||
col = StationPlanGrid.ColNameEnum.Command
|
||||
Case SingleRowGrid.RowNameEnum.Description
|
||||
col = StationPlanGrid.ColNameEnum.Description
|
||||
|
||||
Case SingleRowGrid.RowNameEnum.Parameter1
|
||||
col = StationPlanGrid.ColNameEnum.Parameter1
|
||||
Case SingleRowGrid.RowNameEnum.Parameter2
|
||||
col = StationPlanGrid.ColNameEnum.Parameter2
|
||||
Case SingleRowGrid.RowNameEnum.Parameter3
|
||||
col = StationPlanGrid.ColNameEnum.Parameter3
|
||||
Case SingleRowGrid.RowNameEnum.Parameter4
|
||||
col = StationPlanGrid.ColNameEnum.Parameter4
|
||||
Case SingleRowGrid.RowNameEnum.Parameter5
|
||||
col = StationPlanGrid.ColNameEnum.Parameter5
|
||||
Case SingleRowGrid.RowNameEnum.Parameter6
|
||||
col = StationPlanGrid.ColNameEnum.Parameter6
|
||||
|
||||
Case SingleRowGrid.RowNameEnum.Retry
|
||||
col = StationPlanGrid.ColNameEnum.Retry
|
||||
Case SingleRowGrid.RowNameEnum.RetryInterval
|
||||
col = StationPlanGrid.ColNameEnum.RetryInterval
|
||||
|
||||
Case SingleRowGrid.RowNameEnum.Record
|
||||
col = StationPlanGrid.ColNameEnum.Record
|
||||
Case SingleRowGrid.RowNameEnum.RecordName
|
||||
col = StationPlanGrid.ColNameEnum.RecordName
|
||||
|
||||
Case SingleRowGrid.RowNameEnum.PassGoto
|
||||
col = StationPlanGrid.ColNameEnum.PassGoto
|
||||
Case SingleRowGrid.RowNameEnum.FailGoto
|
||||
col = StationPlanGrid.ColNameEnum.FailGoto
|
||||
|
||||
Case SingleRowGrid.RowNameEnum.ErrorCode
|
||||
col = StationPlanGrid.ColNameEnum.ErrorCode
|
||||
Case SingleRowGrid.RowNameEnum.ErrorMessage
|
||||
col = StationPlanGrid.ColNameEnum.ErrorMessage
|
||||
|
||||
Case SingleRowGrid.RowNameEnum.Help
|
||||
col = StationPlanGrid.ColNameEnum.Help
|
||||
Case Else
|
||||
Console.WriteLine($"SyncSingleRowChange Unknown Row:{row}")
|
||||
End Select
|
||||
Return col
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' 单行信息表格内容修改时,同步修改测试流程表的内容
|
||||
''' </summary>
|
||||
''' <param name="e"></param>
|
||||
Private Sub SyncSingleRowChange(e As Grid.CellChangingEventArgs)
|
||||
If e.Col <> SingleRowGrid.ColNameEnum.ColValue Then Return
|
||||
|
||||
If GrdTestPlan.Selection Is Nothing Then Return
|
||||
If GrdTestPlan.Selection.FirstRow <= 0 OrElse GrdTestPlan.Selection.LastCol >= GrdTestPlan.Cols Then Return
|
||||
|
||||
Dim col As Integer = SingleRowToTestPlanCol(e.Row)
|
||||
Dim row As Integer = GrdTestPlan.Selection.FirstRow
|
||||
GrdTestPlan.Cell(row, col).Text = GrdSingleRowInfo.Cell(e.Row, e.Col).Text
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 单行信息表格命令修改后,同步刷新本身信息
|
||||
''' </summary>
|
||||
Private Sub GrdSingleRowInfoCommandChanged()
|
||||
Dim key As String = GrdSingleRowInfo.Cell(_grdSingleRowDropRow, _grdSingleRowDropCol).Text
|
||||
If StationPlanCommandHelpers.ContainsKey(key) Then
|
||||
Dim planCommandHelper As StationPlanCommandHelper = StationPlanCommandHelpers.Item(key)
|
||||
Dim col As Integer = SingleRowGrid.ColNameEnum.ColValue
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Action, col).Text = "1"
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Description, col).Text = planCommandHelper.CommandDesc
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter1, col).Text = planCommandHelper.Params(0).Value
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter2, col).Text = planCommandHelper.Params(1).Value
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter3, col).Text = planCommandHelper.Params(2).Value
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter4, col).Text = planCommandHelper.Params(3).Value
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter5, col).Text = planCommandHelper.Params(4).Value
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Parameter6, col).Text = planCommandHelper.Params(5).Value
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Retry, col).Text = planCommandHelper.Retry
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.RetryInterval, col).Text = planCommandHelper.RetryInterval
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Record, col).Text = planCommandHelper.Record
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.RecordName, col).Text = planCommandHelper.RecordName
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.PassGoto, col).Text = planCommandHelper.PassGoto
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.FailGoto, col).Text = planCommandHelper.FailGoto
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.ErrorCode, col).Text = planCommandHelper.ErrorCode
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.ErrorMessage, col).Text = planCommandHelper.ErrorMessage
|
||||
|
||||
GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Help, col).Text = planCommandHelper.Help
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GrdSingleRowInfo_CellChanging(sender As Object, e As Grid.CellChangingEventArgs) Handles GrdSingleRowInfo.CellChanging
|
||||
If _isShown = False Then Return
|
||||
If _cellChanged = GridCellChangedEnum.None Then _cellChanged = GridCellChangedEnum.SingleRowInfo
|
||||
|
||||
If _cellChanged = GridCellChangedEnum.SingleRowInfo Then
|
||||
SyncSingleRowChange(e)
|
||||
_cellChanged = GridCellChangedEnum.None
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GrdSingleRowInfo_ComboDropDown(sender As Object, e As Grid.ComboDropDownEventArgs) Handles GrdSingleRowInfo.ComboDropDown
|
||||
_grdSingleRowDropRow = e.Row
|
||||
_grdSingleRowDropCol = e.Col
|
||||
|
||||
Select Case e.Row
|
||||
Case SingleRowGrid.RowNameEnum.Command
|
||||
GrdSingleRowInfo.ComboBox(0).Items.Clear()
|
||||
GrdSingleRowInfo.ComboBox(0).Items.AddRange(StationPlanCommandHelpers.Keys.ToArray())
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub GrdSingleRowInfo_ComboClick(sender As Object, e As Grid.ComboClickEventArgs) Handles GrdSingleRowInfo.ComboClick
|
||||
If _grdSingleRowDropRow = SingleRowGrid.RowNameEnum.Command Then
|
||||
GrdSingleRowInfoCommandChanged()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "TestPlan 右键菜单"
|
||||
Private Sub MsiAddPlanRow_Click(sender As Object, e As EventArgs) Handles MsiAddPlanRow.Click, MsiPlanAddRow.Click
|
||||
If GrdTestPlan.Selection Is Nothing Then
|
||||
GrdTestPlan.AddItem("")
|
||||
Else
|
||||
GrdTestPlan.InsertRow(GrdTestPlan.Selection.FirstRow, 1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub 删除一行ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 删除一行ToolStripMenuItem.Click
|
||||
If GrdTestPlan.Selection IsNot Nothing Then
|
||||
GrdTestPlan.Selection.DeleteByRow()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub 内容自适应ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 内容自适应ToolStripMenuItem.Click
|
||||
GrdTestPlan.AutoSize = Not GrdTestPlan.AutoSize
|
||||
If GrdTestPlan.AutoSize Then
|
||||
GrdTestPlan.AutoSize = False
|
||||
内容自适应ToolStripMenuItem.Text = $"取消自适应"
|
||||
Else
|
||||
GrdTestPlan.AutoSize = True
|
||||
内容自适应ToolStripMenuItem.Text = $"内容自适应"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub 调整字体ToolStripMenuItem_DropDownItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles 调整字体ToolStripMenuItem.DropDownItemClicked
|
||||
GrdTestPlan.Selection.FontName = e.ClickedItem.Text
|
||||
End Sub
|
||||
|
||||
Private Sub 调整字色ToolStripMenuItem_DropDownItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles 调整字色ToolStripMenuItem.DropDownItemClicked
|
||||
GrdTestPlan.Selection.ForeColor = e.ClickedItem.ForeColor
|
||||
End Sub
|
||||
|
||||
Private Sub 调整背景ToolStripMenuItem_DropDownItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles 调整背景ToolStripMenuItem.DropDownItemClicked
|
||||
GrdTestPlan.Selection.BackColor = e.ClickedItem.BackColor
|
||||
End Sub
|
||||
|
||||
Private Sub 对齐方式ToolStripMenuItem_DropDownItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles 对齐方式ToolStripMenuItem.DropDownItemClicked
|
||||
Dim alignment As AlignmentEnum = AlignmentEnum.CenterCenter
|
||||
Select Case e.ClickedItem.Text
|
||||
Case "上层居左"
|
||||
alignment = AlignmentEnum.LeftTop
|
||||
Case "上层居中"
|
||||
alignment = AlignmentEnum.CenterTop
|
||||
Case "上层居右"
|
||||
alignment = AlignmentEnum.RightTop
|
||||
Case "中层居左"
|
||||
alignment = AlignmentEnum.LeftCenter
|
||||
Case "中层居中"
|
||||
alignment = AlignmentEnum.CenterCenter
|
||||
Case "中层居右"
|
||||
alignment = AlignmentEnum.RightCenter
|
||||
Case "下层居左"
|
||||
alignment = AlignmentEnum.LeftBottom
|
||||
Case "下层居中"
|
||||
alignment = AlignmentEnum.CenterBottom
|
||||
Case "下层居右"
|
||||
alignment = AlignmentEnum.RightBottom
|
||||
Case Else
|
||||
Console.WriteLine($"对齐方式ToolStripMenuItem_DropDownItemClicked Unknown Text:{e.ClickedItem.Text}")
|
||||
End Select
|
||||
GrdTestPlan.Selection.Alignment = alignment
|
||||
End Sub
|
||||
|
||||
Private Sub 修改主题ToolStripMenuItem_DropDownItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles 修改主题ToolStripMenuItem.DropDownItemClicked
|
||||
Select Case e.ClickedItem.Text
|
||||
Case "默认主题"
|
||||
|
||||
Case Else
|
||||
Console.WriteLine($"修改主题ToolStripMenuItem_DropDownItemClicked Unknown Text:{e.ClickedItem.Text}")
|
||||
End Select
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "TestPlan光标追随"
|
||||
Private _mouseFollow As Boolean = False '是否开启鼠标跟随功能
|
||||
Private _mouseMoveLastRow As Integer = 0 '鼠标移动上次所在行
|
||||
|
||||
Private Sub TsBtnMouseFollow_Click(sender As Object, e As EventArgs) Handles TsBtnMouseFollow.Click
|
||||
If _mouseFollow Then
|
||||
_mouseFollow = False
|
||||
|
||||
GrdTestPlan.Range(_mouseMoveLastRow, 1, _mouseMoveLastRow, GrdTestPlan.Cols - 1).Borders(EdgeEnum.Outside) = LineStyleEnum.None
|
||||
|
||||
TsBtnMouseFollow.Text = $"光标预览"
|
||||
Else
|
||||
_mouseFollow = True
|
||||
TsBtnMouseFollow.Text = $"取消预览"
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TestPlanMouseMoveChangeBorders(mouseRow As Integer)
|
||||
If _mouseMoveLastRow = mouseRow Then Return
|
||||
If mouseRow < 1 OrElse mouseRow > GrdTestPlan.Rows - 1 Then Return
|
||||
|
||||
GrdTestPlan.Range(_mouseMoveLastRow, 1, _mouseMoveLastRow, GrdTestPlan.Cols - 1).Borders(EdgeEnum.Outside) = LineStyleEnum.None
|
||||
|
||||
GrdTestPlan.Range(mouseRow, 1, mouseRow, GrdTestPlan.Cols - 1).Borders(EdgeEnum.Outside) = LineStyleEnum.Thin
|
||||
|
||||
_mouseMoveLastRow = mouseRow
|
||||
End Sub
|
||||
|
||||
Private Sub TestPlanMouseMove()
|
||||
If _mouseFollow = False Then Return
|
||||
|
||||
Dim mouseRow As Integer = GrdTestPlan.MouseRow
|
||||
Dim mouseCol As Integer = GrdTestPlan.MouseCol
|
||||
|
||||
TestPlanSelChange(mouseRow, mouseCol)
|
||||
|
||||
TestPlanMouseMoveChangeBorders(mouseRow)
|
||||
End Sub
|
||||
|
||||
Private Sub GrdTestPlan_MouseMove(sender As Object, e As MouseEventArgs) Handles GrdTestPlan.MouseMove
|
||||
TestPlanMouseMove()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub GrdTestPlan_Scroll(sender As Object, e As EventArgs) Handles GrdTestPlan.Scroll
|
||||
TestPlanMouseMove()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "SingleRow 提示选择列"
|
||||
Private _lastSingleRowSelCol As Integer
|
||||
Private _lastSingleRowSelRow As Integer
|
||||
|
||||
Private Sub UpdatePlanColNameTip(colName As String)
|
||||
If StationPlanColHelpers.ContainsKey(colName) Then
|
||||
Dim colHelper As PlanColHelper = StationPlanColHelpers.Item(colName)
|
||||
RtxColTip.SuspendLayout()
|
||||
RtxColTip.Clear()
|
||||
|
||||
RtxColTip.AppendText($"{colHelper.ColName}{vbCrLf}")
|
||||
RtxColTip.AppendText($"类型:{colHelper.ColType}{vbCrLf}")
|
||||
RtxColTip.AppendText($"描述:{colHelper.ColDesc}{vbCrLf}")
|
||||
RtxColTip.ResumeLayout(False)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub UpdateCommandTip(colName As String, command As String, paramIndex As Integer)
|
||||
If StationPlanCommandHelpers.ContainsKey(command) Then
|
||||
Dim commandHelper As StationPlanCommandHelper = StationPlanCommandHelpers.Item(command)
|
||||
RtxColTip.SuspendLayout()
|
||||
RtxColTip.Clear()
|
||||
|
||||
RtxColTip.AppendText($"{colName}{vbCrLf}")
|
||||
RtxColTip.AppendText($"类型:{commandHelper.Params(paramIndex).Type}{vbCrLf}")
|
||||
RtxColTip.AppendText($"上限:{commandHelper.Params(paramIndex).UpperLimit}{vbCrLf}")
|
||||
RtxColTip.AppendText($"下限:{commandHelper.Params(paramIndex).LowerLimit}{vbCrLf}")
|
||||
RtxColTip.AppendText($"描述:{commandHelper.Params(paramIndex).Desc}{vbCrLf}")
|
||||
RtxColTip.ResumeLayout(False)
|
||||
Else
|
||||
RtxColTip.AppendText($"{colName}{vbCrLf}")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 单行信息表格更新当前行
|
||||
''' </summary>
|
||||
''' <param name="row"></param>
|
||||
Private Sub UpdateSingleRowTip(row As Integer)
|
||||
Dim colName As String = GrdSingleRowInfo.Cell(row, SingleRowGrid.ColNameEnum.ColName).Text
|
||||
|
||||
If row >= SingleRowGrid.RowNameEnum.Parameter1 AndAlso row <= SingleRowGrid.RowNameEnum.Parameter6 Then
|
||||
Dim command As String = GrdSingleRowInfo.Cell(SingleRowGrid.RowNameEnum.Command, SingleRowGrid.ColNameEnum.ColValue).Text
|
||||
If String.IsNullOrEmpty(command) Then
|
||||
UpdatePlanColNameTip(colName)
|
||||
Else
|
||||
UpdateCommandTip(colName, command, row - SingleRowGrid.RowNameEnum.Parameter1)
|
||||
End If
|
||||
Else
|
||||
UpdatePlanColNameTip(colName)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SingleRowSelChange(row As Integer)
|
||||
If _lastSingleRowSelRow = row Then Return
|
||||
|
||||
'新增命令切换处理
|
||||
|
||||
GrdSingleRowInfo.Cell(_lastSingleRowSelRow, SingleRowGrid.ColNameEnum.ColName).FontBold = False
|
||||
|
||||
GrdSingleRowInfo.Cell(row, SingleRowGrid.ColNameEnum.ColName).FontBold = True
|
||||
|
||||
UpdateSingleRowTip(row) '更新列提示
|
||||
|
||||
_lastSingleRowSelRow = row
|
||||
End Sub
|
||||
|
||||
Private Sub GrdSingleRowInfo_SelChange(sender As Object, e As Grid.SelChangeEventArgs) Handles GrdSingleRowInfo.SelChange
|
||||
SingleRowSelChange(e.FirstRow)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
57
UTS_Core/UTSModule/Project/PlanColHelper.vb
Normal file
57
UTS_Core/UTSModule/Project/PlanColHelper.vb
Normal file
@@ -0,0 +1,57 @@
|
||||
Imports System.Data.SQLite
|
||||
Imports UTS_Core.Database.Sqlite
|
||||
Imports UTS_Core.UTSModule.DatabaseTable
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class PlanColHelper
|
||||
Property ColName() As String
|
||||
|
||||
Property ColType() As String
|
||||
|
||||
Property ColDesc() As String
|
||||
|
||||
|
||||
Private Shared Function SearchPlanCol(path As String, password As String) As DataTable
|
||||
Dim connectString As String = CommandHelpers.ConnectionString(path, password)
|
||||
Using sqliteConn As New SQLiteConnection(connectString)
|
||||
sqliteConn.Open()
|
||||
Dim tableName As String = StationPlanColHelperTable.TableName
|
||||
Dim colNames As New List(Of String)
|
||||
colNames.Add(StationPlanColHelperTable.ColNamesEnum.ID.ToString())
|
||||
colNames.Add(StationPlanColHelperTable.ColNamesEnum.ColName.ToString())
|
||||
colNames.Add(StationPlanColHelperTable.ColNamesEnum.ColType.ToString())
|
||||
colNames.Add(StationPlanColHelperTable.ColNamesEnum.ColDesc.ToString())
|
||||
|
||||
Return Executor.Search(sqliteConn, tableName, colNames)
|
||||
End Using
|
||||
End Function
|
||||
|
||||
|
||||
Public Function InitPlanColHelper(dtRow As DataRow) As Boolean
|
||||
ColName = dtRow.Item(StationPlanColHelperTable.ColNamesEnum.ColName).ToString()
|
||||
ColType = dtRow.Item(StationPlanColHelperTable.ColNamesEnum.ColType).ToString()
|
||||
ColDesc = dtRow.Item(StationPlanColHelperTable.ColNamesEnum.ColDesc).ToString()
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Shared Function InitPlanColHelper(dtPlanCol As DataTable) As Dictionary(Of String, PlanColHelper)
|
||||
Dim dicCommandHelpers As New Dictionary(Of String, PlanColHelper)
|
||||
|
||||
For row As Integer = 0 To dtPlanCol.Rows.Count - 1
|
||||
Dim colHelper As New PlanColHelper
|
||||
colHelper.InitPlanColHelper(dtPlanCol.Rows(row))
|
||||
|
||||
dicCommandHelpers.Add(colHelper.ColName, colHelper)
|
||||
Next
|
||||
|
||||
Return dicCommandHelpers
|
||||
End Function
|
||||
|
||||
Public Shared Function InitPlanColHelper(path As String, password As String) As Dictionary(Of String, PlanColHelper)
|
||||
Dim dtPlanCol As DataTable = SearchPlanCol(path, password)
|
||||
|
||||
Return InitPlanColHelper(dtPlanCol)
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
1292
UTS_Core/UTSModule/Project/ProjectInfo.vb
Normal file
1292
UTS_Core/UTSModule/Project/ProjectInfo.vb
Normal file
File diff suppressed because it is too large
Load Diff
129
UTS_Core/UTSModule/Project/ProjectStationGrid.vb
Normal file
129
UTS_Core/UTSModule/Project/ProjectStationGrid.vb
Normal file
@@ -0,0 +1,129 @@
|
||||
Imports System.Drawing
|
||||
Imports UTS_Core.UTSModule.Station
|
||||
|
||||
Namespace UTSModule.Project
|
||||
|
||||
Public Class ProjectStationGrid
|
||||
Public Enum ColNameEnum
|
||||
''' <summary>
|
||||
''' 工艺站序号
|
||||
''' </summary>
|
||||
Sn
|
||||
''' <summary>
|
||||
''' 工艺站名称
|
||||
''' </summary>
|
||||
Name
|
||||
''' <summary>
|
||||
''' 工艺站类型,下拉选择
|
||||
''' </summary>
|
||||
Type
|
||||
|
||||
''' <summary>
|
||||
''' 工艺站预览图,按键加载
|
||||
''' </summary>
|
||||
Preview
|
||||
|
||||
''' <summary>
|
||||
''' 工艺站描述
|
||||
''' </summary>
|
||||
Description
|
||||
|
||||
''' <summary>
|
||||
''' 条码生成方式,1.系统生成,2.用户录入
|
||||
''' </summary>
|
||||
SnType
|
||||
|
||||
''' <summary>
|
||||
''' 允许测试设备类型
|
||||
''' </summary>
|
||||
DevType
|
||||
|
||||
''' <summary>
|
||||
''' 允许测试软件名称
|
||||
''' </summary>
|
||||
DevApp
|
||||
|
||||
''' <summary>
|
||||
''' 工艺站包名,按键加载
|
||||
''' </summary>
|
||||
PacketName
|
||||
|
||||
Max
|
||||
End Enum
|
||||
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 初始化测试站表格
|
||||
''' </summary>
|
||||
''' <param name="grd">表格控件</param>
|
||||
Public Shared Sub InitTestStationGrid(grd As FlexCell.Grid, Optional userProject As ProjectInfo = Nothing)
|
||||
With grd
|
||||
.AutoRedraw = False
|
||||
.NewFile() '清空表格格式
|
||||
.Images.Clear() '清空缓存图
|
||||
|
||||
.Rows = 1
|
||||
.Cols = ColNameEnum.Max
|
||||
|
||||
.DisplayRowNumber = True '首列显示数字
|
||||
.ExtendLastCol = True '最后一列自动扩充
|
||||
.MultiSelect = False '是否允许选择多行
|
||||
.BackColorFixed = Color.FromArgb(255, 227, 228, 225)
|
||||
.BackColorFixedSel = Color.FromArgb(255, 201, 226, 244)
|
||||
.BackColorBkg = Color.FromArgb(255, 248, 232, 226)
|
||||
.BackColor1 = Color.FromArgb(255, 225, 246, 236)
|
||||
.BackColor2 = Color.FromArgb(255, 247, 247, 228)
|
||||
.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
.GridColor = Color.FromArgb(255, 148, 190, 231)
|
||||
.DefaultRowHeight = 40 '默认行高
|
||||
.DefaultFont = New Font("微软雅黑", 12)
|
||||
.Range(0, 0, 0, .Cols - 1).Font = New Font($"幼圆", 10) '首行样式
|
||||
|
||||
|
||||
.Column(ColNameEnum.Type).CellType = FlexCell.CellTypeEnum.ComboBox
|
||||
.ComboBox(ColNameEnum.Type).Items.AddRange([Enum].GetNames(GetType(ProcessStation.StationTypeEnum)))
|
||||
|
||||
.Column(ColNameEnum.SnType).CellType = FlexCell.CellTypeEnum.ComboBox
|
||||
.ComboBox(ColNameEnum.SnType).Items.AddRange([Enum].GetNames(GetType(ProcessStation.SnTypeEnum)))
|
||||
|
||||
.Column(ColNameEnum.PacketName).CellType = FlexCell.CellTypeEnum.Button
|
||||
|
||||
.Column(ColNameEnum.Description).Width = 240
|
||||
|
||||
For col As Integer = 0 To ColNameEnum.Max - 1
|
||||
.Cell(0, col).Text = [Enum].GetName(GetType(ColNameEnum), col) '设置列名
|
||||
Next
|
||||
|
||||
If userProject IsNot Nothing Then
|
||||
Dim row As Integer = 1
|
||||
For Each stationInfo As ProcessStation In userProject.Station
|
||||
If row > .Rows - 1 Then .AddItem(String.Empty)
|
||||
|
||||
.Cell(row, ColNameEnum.Name).Text = stationInfo.Name
|
||||
.Cell(row, ColNameEnum.Type).Text = stationInfo.StationType.ToString()
|
||||
.Cell(row, ColNameEnum.SnType).Text = stationInfo.SnType.ToString()
|
||||
|
||||
.Cell(row, ColNameEnum.Description).Text = stationInfo.Description
|
||||
.Cell(row, ColNameEnum.PacketName).Text = stationInfo.Packet.FileName
|
||||
|
||||
.Cell(row, ColNameEnum.DevType).Text = stationInfo.DevType
|
||||
.Cell(row, ColNameEnum.DevApp).Text = stationInfo.DevApp
|
||||
|
||||
If stationInfo.PreViewImage IsNot Nothing Then
|
||||
Dim imgKey As String = .Images.Count().ToString()
|
||||
.Images.Add(stationInfo.PreViewImage, imgKey) '添加预览图
|
||||
.Cell(row, ColNameEnum.Preview).SetImage(imgKey)
|
||||
End If
|
||||
|
||||
row += 1
|
||||
Next
|
||||
End If
|
||||
|
||||
.AutoRedraw = True
|
||||
.Refresh()
|
||||
End With
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
119
UTS_Core/UTSModule/Project/ProjectStationInfo.vb
Normal file
119
UTS_Core/UTSModule/Project/ProjectStationInfo.vb
Normal file
@@ -0,0 +1,119 @@
|
||||
Imports System.Drawing
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class StationInfo
|
||||
Sub New(project As ProjectInfo)
|
||||
Index = String.Empty
|
||||
SerialNumber = String.Empty
|
||||
Name = String.Empty
|
||||
Description = String.Empty
|
||||
|
||||
DevType = String.Empty
|
||||
DevApp = String.Empty
|
||||
|
||||
UserId = String.Empty
|
||||
|
||||
Packet = New ProjectStationPacket(Me)
|
||||
ParentProject = project
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 项目站索引,项目站唯一索引,新建站时自动生成,生成后不能修改
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Index As String
|
||||
|
||||
''' <summary>
|
||||
''' 项目站名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Name As String
|
||||
|
||||
''' <summary>
|
||||
''' 项目站序号,表示该站在项目站总流程中测试顺序
|
||||
''' 例如T01,表示当前为第一站
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property SerialNumber() As String
|
||||
|
||||
''' <summary>
|
||||
''' 使用测试站的设备类型
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property DevType() As String
|
||||
|
||||
''' <summary>
|
||||
''' 使用测试站的设备软件名
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property DevApp() As String
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 项目站内容描述
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Description As String
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 项目站当前操作人员,为当前登录人员账号
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property UserId As String
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 项目站关联的项目站包信息
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Packet() As ProjectStationPacket
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 项目站所属项目信息
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property ParentProject() As ProjectInfo
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 站序号已被修改
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property SerialNumberChanged() As Boolean
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 站名已被修改
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property NameChanged() As Boolean
|
||||
|
||||
''' <summary>
|
||||
''' 站描述已被修改
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property DescriptionChanged() As Boolean
|
||||
|
||||
''' <summary>
|
||||
''' 站包名已被修改
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property PacketNameChanged() As Boolean
|
||||
|
||||
''' <summary>
|
||||
''' 站包设备类型已被修改
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property DevTypeChanged() As Boolean
|
||||
|
||||
''' <summary>
|
||||
''' 站包设备应用程序已被修改
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property DevAppChanged() As Boolean
|
||||
End Class
|
||||
End Namespace
|
||||
654
UTS_Core/UTSModule/Project/ProjectStationPacket.vb
Normal file
654
UTS_Core/UTSModule/Project/ProjectStationPacket.vb
Normal file
@@ -0,0 +1,654 @@
|
||||
Imports System.Data.SQLite
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports System.Xml
|
||||
Imports FlexCell
|
||||
Imports UTS_Core.Security
|
||||
Imports UTS_Core.Database.Sqlite
|
||||
Imports UTS_Core.UTSModule.DatabaseTable
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class ProjectStationPacket
|
||||
Sub New(station As StationInfo)
|
||||
CurrentImprint = New StationPacketImprint()
|
||||
HistoryImprints = New List(Of StationPacketImprint)()
|
||||
StationPlan = New ProjectStationPlan(Me)
|
||||
|
||||
StationVersion = 1 '项目站版本从一开始
|
||||
|
||||
ParentStation = station
|
||||
|
||||
End Sub
|
||||
|
||||
Private _image As Drawing.Image
|
||||
Private _imageFileName As String
|
||||
Private _fileName As String
|
||||
Private _name As String
|
||||
|
||||
''' <summary>测试包文件名称,不含.uts后缀</summary>
|
||||
Public ReadOnly Property Name() As String
|
||||
Get
|
||||
Return _name
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>测试包文件名称,含.uts后缀</summary>
|
||||
Public Property FileName() As String
|
||||
Get
|
||||
Return _fileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
_fileName = value
|
||||
_name = Path.GetFileNameWithoutExtension(_fileName)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
''' <summary>测试站包版本</summary>
|
||||
Public Property StationVersion As Integer
|
||||
|
||||
|
||||
''' <summary>修改项目流程时所需密码</summary>
|
||||
Public Property PassWord As String
|
||||
|
||||
|
||||
''' <summary>测试站包有效日期</summary>
|
||||
Public Property ValidDate As Date
|
||||
|
||||
|
||||
''' <summary>测试站包创建时间</summary>
|
||||
Public Property CreateTime As Date
|
||||
|
||||
|
||||
''' <summary>测试站包修改时间</summary>
|
||||
Public Property ModifiedTime As Date
|
||||
|
||||
|
||||
''' <summary>发布测试站包的应用程序版本</summary>
|
||||
Public Property AppVersion() As Version
|
||||
|
||||
|
||||
''' <summary>发布测试站包的图片</summary>
|
||||
Public ReadOnly Property StationImage As Drawing.Image
|
||||
Get
|
||||
Return _image
|
||||
End Get
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' 项目站包历史发布说明
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property HistoryImprints() As List(Of StationPacketImprint)
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 当前版本发布说明
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property CurrentImprint() As StationPacketImprint
|
||||
|
||||
Public Shared Function PacketImprintsToString(imprints As List(Of StationPacketImprint)) As String
|
||||
Dim strReturn As New StringBuilder
|
||||
For Each imprint As StationPacketImprint In imprints
|
||||
strReturn.Append($"{imprint.FileName}{vbNewLine}")
|
||||
strReturn.Append($"{imprint.Creator}{vbNewLine}")
|
||||
strReturn.Append(vbNewLine)
|
||||
|
||||
strReturn.Append(imprint.ToString())
|
||||
|
||||
strReturn.Append(vbNewLine)
|
||||
strReturn.Append(String.Empty.PadRight(40, "-"c))
|
||||
strReturn.Append(vbNewLine)
|
||||
Next
|
||||
|
||||
Return strReturn.ToString() '将历史记录转换成文本
|
||||
End Function
|
||||
|
||||
Public Property ImageFileName() As String
|
||||
Get
|
||||
Return _imageFileName
|
||||
End Get
|
||||
Set(value As String)
|
||||
_imageFileName = value
|
||||
Try
|
||||
Dim imagePath As String = $"{UtsPath.StationPacketResourceDirPath(Name)}\{_imageFileName}"
|
||||
If File.Exists(imagePath) Then
|
||||
_image = ImageProcessor.ImageProcessor.GetBitmapImage(imagePath)
|
||||
Else
|
||||
_image = Nothing
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Console.WriteLine($"ImageName Convert To Image Error:{ex.Message}")
|
||||
End Try
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>发布测试站包的测试流程</summary>
|
||||
Public Property StationPlan() As ProjectStationPlan
|
||||
|
||||
|
||||
''' <summary>测试站包所在的测试站信息</summary>
|
||||
Public Property ParentStation() As StationInfo
|
||||
|
||||
''' <summary>
|
||||
''' 创建项目站包
|
||||
''' </summary>
|
||||
Public Sub CreatePacket()
|
||||
If ParentStation Is Nothing Then Throw New Exception($"项目站包未关联项目站!")
|
||||
If ParentStation.ParentProject Is Nothing Then Throw New Exception($"项目站包未关联项目!")
|
||||
|
||||
'更新文件名,唯一索引
|
||||
FileName = NewPacketFileName()
|
||||
|
||||
StationVersion = 1 '流程从一开始
|
||||
PassWord = String.Empty
|
||||
ValidDate = Now.AddMonths(1) '有效期一个月
|
||||
CreateTime = Now
|
||||
ModifiedTime = Now
|
||||
AppVersion = New Version(Windows.Forms.Application.ProductVersion)
|
||||
HistoryImprints = New List(Of StationPacketImprint)()
|
||||
CurrentImprint = New StationPacketImprint()
|
||||
|
||||
'创建相关文件夹
|
||||
Directory.CreateDirectory(UtsPath.StationPacketDirPath(Name))
|
||||
Directory.CreateDirectory(UtsPath.StationPacketResourceDirPath(Name))
|
||||
Directory.CreateDirectory(UtsPath.StationPacketTestPlanDirPath(Name))
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function LoadImprintNode(nodeList As XmlNodeList) As List(Of String)
|
||||
Dim imprints As New List(Of String)
|
||||
Dim xe As XmlElement
|
||||
For Each node As XmlNode In nodeList
|
||||
xe = CType(node, XmlElement)
|
||||
Select Case xe.LocalName
|
||||
Case "Imprint"
|
||||
imprints.Add(xe.InnerText)
|
||||
End Select
|
||||
Next
|
||||
Return imprints
|
||||
End Function
|
||||
|
||||
Private Function LoadImprintsNode(nodeList As XmlNodeList) As List(Of String)
|
||||
Dim imprints As New List(Of String)
|
||||
Dim xe As XmlElement
|
||||
For Each node As XmlNode In nodeList
|
||||
xe = CType(node, XmlElement)
|
||||
Select Case xe.LocalName
|
||||
Case "Imprints"
|
||||
imprints = LoadImprintNode(node.ChildNodes)
|
||||
End Select
|
||||
Next
|
||||
Return imprints
|
||||
End Function
|
||||
|
||||
Private Function LoadHistoryImprintsNode(nodeList As XmlNodeList) As List(Of StationPacketImprint)
|
||||
Dim packetImprints As New List(Of StationPacketImprint)
|
||||
Dim xe As XmlElement
|
||||
For Each node As XmlNode In nodeList
|
||||
xe = CType(node, XmlElement)
|
||||
|
||||
Select Case xe.LocalName
|
||||
Case "HistoryImprint"
|
||||
Dim packetImprint As New StationPacketImprint
|
||||
packetImprint.FileName = xe.GetAttribute($"PacketName")
|
||||
packetImprint.Creator = xe.GetAttribute($"Creator")
|
||||
packetImprint.Imprints = LoadImprintsNode(node.ChildNodes)
|
||||
packetImprints.Add(packetImprint)
|
||||
Case Else
|
||||
Console.WriteLine($"LoadHistoryImprintsNode Unknown NodeName:{xe.LocalName}")
|
||||
End Select
|
||||
Next
|
||||
Return packetImprints
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 加载项目站包信息文件
|
||||
''' </summary>
|
||||
''' <param name="packetInfoFilePath"></param>
|
||||
Private Sub LoadStationPacketInfoFile(packetInfoFilePath As String)
|
||||
Dim xd As New XmlDocument()
|
||||
xd.Load(packetInfoFilePath)
|
||||
Dim nodeList As XmlNodeList = xd.SelectSingleNode("Configs/StationInfo").ChildNodes
|
||||
For Each node As XmlNode In nodeList
|
||||
Dim xe As XmlElement = CType(node, XmlElement)
|
||||
Select Case xe.LocalName
|
||||
Case "AppVersion"
|
||||
If Version.TryParse(xe.InnerText, AppVersion) = False Then '版本转换
|
||||
Throw New Exception($"AppVersionError!")
|
||||
End If
|
||||
'If AppVersion.CompareTo(My.Application.Info.Version) > 0 Then '版本比较,应该在加载后校验。
|
||||
' Throw New Exception($"AppVersion Is Too Low!")
|
||||
'End If
|
||||
Case "CreateTime"
|
||||
If Date.TryParse(xe.InnerText, CreateTime) = False Then
|
||||
Throw New Exception($"CreateTimeError!")
|
||||
End If
|
||||
Case "ModifiedTime"
|
||||
If Date.TryParse(xe.InnerText, ModifiedTime) = False Then
|
||||
Throw New Exception($"ModifiedTimeError!")
|
||||
End If
|
||||
Case "PassWord"
|
||||
PassWord = Aes128.DecryptStr(xe.InnerText, Aes128.ServerAesKey)
|
||||
Case "ValidDate"
|
||||
If Date.TryParse(Aes128.DecryptStr(xe.InnerText, Aes128.ServerAesKey), ValidDate) = False Then
|
||||
Throw New Exception($"ValidDateError!")
|
||||
End If
|
||||
Case "StationVersion"
|
||||
If IsNumeric(xe.InnerText) = False Then
|
||||
StationVersion = 1
|
||||
Else
|
||||
StationVersion = CType(xe.InnerText, Integer)
|
||||
End If
|
||||
Case "ImageName"
|
||||
ImageFileName = xe.InnerText
|
||||
Case "HistoryImprints"
|
||||
HistoryImprints = LoadHistoryImprintsNode(xe.ChildNodes)
|
||||
Case Else
|
||||
Console.WriteLine($"LoadStationPacketFile Unknown NodeName:{xe.LocalName}")
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 加载项目流程表格属性内容
|
||||
''' </summary>
|
||||
''' <param name="nodeList"></param>
|
||||
''' <param name="grdTestPlan"></param>
|
||||
Private Sub LoadGridProperties(nodeList As XmlNodeList, grdTestPlan As Grid)
|
||||
Dim xe As XmlElement
|
||||
For Each node As XmlNode In nodeList
|
||||
xe = CType(node, XmlElement)
|
||||
Select Case xe.LocalName
|
||||
Case "Rows"
|
||||
grdTestPlan.Rows = Integer.Parse(xe.InnerText) + 1
|
||||
Case "Cols"
|
||||
grdTestPlan.Cols = Integer.Parse(xe.InnerText) + 1
|
||||
End Select
|
||||
Next
|
||||
Return
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 加载项目流程表格单元格内容
|
||||
''' </summary>
|
||||
''' <param name="nodeList"></param>
|
||||
''' <param name="grdTestPlan"></param>
|
||||
Private Sub LoadGridCells(nodeList As XmlNodeList, grdTestPlan As Grid)
|
||||
Dim row, col As Integer
|
||||
Dim xe As XmlElement
|
||||
For Each node As XmlNode In nodeList
|
||||
xe = CType(node, XmlElement)
|
||||
Select Case xe.LocalName
|
||||
Case "Cells"
|
||||
row = CType(xe.GetAttribute($"Row"), Integer)
|
||||
col = CType(xe.GetAttribute($"Col"), Integer)
|
||||
grdTestPlan.Cell(row, col).Text = xe.InnerText
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 加载项目流程文件
|
||||
''' </summary>
|
||||
''' <param name="stationPlanFilePath"></param>
|
||||
Private Sub LoadStationPlanFile(stationPlanFilePath As String)
|
||||
Dim xd As New XmlDocument()
|
||||
xd.Load(stationPlanFilePath)
|
||||
|
||||
Dim xe As XmlElement
|
||||
Dim nodeList As XmlNodeList = xd.SelectSingleNode($"FlexCell.NET").ChildNodes
|
||||
For Each node As XmlNode In nodeList
|
||||
xe = CType(node, XmlElement)
|
||||
Select Case xe.LocalName
|
||||
Case "GridProperties"
|
||||
LoadGridProperties(node.ChildNodes, StationPlan.StationPlanGrid)
|
||||
Case "Cells"
|
||||
LoadGridCells(node.ChildNodes, StationPlan.StationPlanGrid)
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 加载项目站包时,校验路径
|
||||
''' </summary>
|
||||
''' <param name="packetPath"></param>
|
||||
Private Sub LoadCheckPath(packetPath As String)
|
||||
If String.IsNullOrEmpty(FileName) Then
|
||||
Throw New Exception($"未搜索到项目站 {ParentStation.Name} 的项目站包包名,请自行设计发布!")
|
||||
End If
|
||||
|
||||
If File.Exists(packetPath) = False Then
|
||||
Console.WriteLine($"UpdateStationInfo, {packetPath} File Not Exists")
|
||||
Throw New Exception($"未搜索到项目包 {packetPath},请自行设计发布!")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 加载项目站包时,解压项目文件到指定路径
|
||||
''' </summary>
|
||||
''' <param name="packetPath"></param>
|
||||
Private Sub LoadExtractFile(packetPath As String)
|
||||
Dim stationDesignDir As String = UtsPath.StationDesignDirPath()
|
||||
If Directory.Exists(stationDesignDir) = False Then Directory.CreateDirectory(stationDesignDir)
|
||||
Compress.Compress.TarExtractToDirectory(packetPath, stationDesignDir) '解压缩文件到指定路径
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 加载测试站包时,加载项目站包信息
|
||||
''' </summary>
|
||||
''' <param name="packetName"></param>
|
||||
Private Sub LoadFileUpdatePacketInfo(packetName As String)
|
||||
Dim packetInfoPath As String = $"{UtsPath.StationPacketInfoPath(packetName)}"
|
||||
LoadStationPacketInfoFile(packetInfoPath) '解析项目站信息内容
|
||||
|
||||
Dim stationPlanPath As String = $"{UtsPath.StationPacketTestPlanDirPath(packetName)}\Main.xml"
|
||||
LoadStationPlanFile(stationPlanPath) '解析项目站流程内容
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 加载测试站包内容
|
||||
''' </summary>
|
||||
Public Sub LoadPacket()
|
||||
Dim packetPath As String = UtsPath.StationPacketPath(ParentStation.ParentProject.Index, ParentStation.Index, FileName)
|
||||
|
||||
LoadCheckPath(packetPath)
|
||||
|
||||
LoadExtractFile(packetPath)
|
||||
|
||||
LoadFileUpdatePacketInfo(Name)
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 保存项目站流程问文件
|
||||
''' </summary>
|
||||
''' <param name="path"></param>
|
||||
''' <param name="grdTestPlan"></param>
|
||||
Private Sub SaveStationPlanFile(path As String, grdTestPlan As Grid)
|
||||
Dim xws As New XmlWriterSettings
|
||||
With xws
|
||||
.Indent = True
|
||||
.NewLineOnAttributes = False
|
||||
.Encoding = New UTF8Encoding(False)
|
||||
End With
|
||||
|
||||
|
||||
|
||||
Using xw As XmlWriter = XmlWriter.Create(path, xws)
|
||||
xw.WriteStartDocument()
|
||||
xw.WriteStartElement($"FlexCell.NET") '创建跟节点
|
||||
|
||||
xw.WriteStartElement($"GridProperties") '创建表属性节点
|
||||
xw.WriteElementString("Rows", CType(grdTestPlan.Rows - 1, String))
|
||||
xw.WriteElementString("Cols", CType((grdTestPlan.Cols - 1), String))
|
||||
xw.WriteEndElement()
|
||||
|
||||
|
||||
xw.WriteStartElement($"Cells") '创建单元格节点
|
||||
For row As Integer = 0 To grdTestPlan.Rows - 1
|
||||
For col As Integer = 0 To grdTestPlan.Cols - 1
|
||||
xw.WriteStartElement($"Cells")
|
||||
xw.WriteAttributeString($"Row", CType(row, String))
|
||||
xw.WriteAttributeString($"Col", CType(col, String))
|
||||
xw.WriteString(grdTestPlan.Cell(row, col).Text)
|
||||
xw.WriteEndElement()
|
||||
Next
|
||||
Next
|
||||
xw.WriteEndElement()
|
||||
|
||||
xw.WriteEndElement()
|
||||
xw.WriteEndDocument()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 保存项目站历史版本说明
|
||||
''' </summary>
|
||||
''' <param name="xw"></param>
|
||||
Private Sub SavePacketHistoryImprints(xw As XmlWriter)
|
||||
'写入当前版本信息
|
||||
xw.WriteStartElement($"HistoryImprint")
|
||||
xw.WriteAttributeString($"PacketName", CurrentImprint.FileName)
|
||||
xw.WriteAttributeString($"Creator", CurrentImprint.Creator)
|
||||
xw.WriteStartElement($"Imprints")
|
||||
For Each imprint As String In CurrentImprint.Imprints
|
||||
xw.WriteElementString("Imprint", imprint)
|
||||
Next
|
||||
xw.WriteEndElement()
|
||||
xw.WriteEndElement()
|
||||
|
||||
'写入历史版本信息
|
||||
For Each packetImprint As StationPacketImprint In HistoryImprints
|
||||
xw.WriteStartElement($"HistoryImprint")
|
||||
xw.WriteAttributeString($"PacketName", packetImprint.FileName)
|
||||
xw.WriteAttributeString($"Creator", packetImprint.Creator)
|
||||
|
||||
xw.WriteStartElement($"Imprints")
|
||||
For Each imprint As String In packetImprint.Imprints
|
||||
xw.WriteElementString("Imprint", imprint)
|
||||
Next
|
||||
xw.WriteEndElement()
|
||||
|
||||
xw.WriteEndElement()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 保存项目站信息节点内容
|
||||
''' </summary>
|
||||
''' <param name="xw"></param>
|
||||
Private Sub SavePacketInfoNode(xw As XmlWriter)
|
||||
xw.WriteElementString("AppVersion", AppVersion.ToString)
|
||||
xw.WriteElementString("CreateTime", $"{CreateTime:yyyy-MM-dd HH:mm:ss}")
|
||||
xw.WriteElementString("ModifiedTime", $"{ModifiedTime:yyyy-MM-dd HH:mm:ss}")
|
||||
xw.WriteElementString("PassWord", Aes128.EncryptStr(PassWord, Aes128.ServerAesKey))
|
||||
xw.WriteElementString("ValidDate", Aes128.EncryptStr(ValidDate.ToString("yyyy-MM-dd"), Aes128.ServerAesKey))
|
||||
xw.WriteElementString("StationVersion", StationVersion.ToString())
|
||||
xw.WriteElementString("ImageName", ImageFileName)
|
||||
|
||||
xw.WriteStartElement($"HistoryImprints")
|
||||
SavePacketHistoryImprints(xw)
|
||||
xw.WriteEndElement()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 保存项目站包信息文件
|
||||
''' </summary>
|
||||
''' <param name="configPath"></param>
|
||||
Private Sub SavePacketInfoFile(configPath As String)
|
||||
Dim xws As New XmlWriterSettings
|
||||
With xws
|
||||
.Indent = True
|
||||
.NewLineOnAttributes = False
|
||||
.Encoding = New UTF8Encoding(False)
|
||||
End With
|
||||
Using xw As XmlWriter = XmlWriter.Create(configPath, xws)
|
||||
xw.WriteStartDocument()
|
||||
xw.WriteStartElement($"Configs") '创建跟节点
|
||||
xw.WriteStartElement($"StationInfo") '创建一级子节点
|
||||
|
||||
SavePacketInfoNode(xw)
|
||||
|
||||
xw.WriteEndElement()
|
||||
xw.WriteEndElement()
|
||||
xw.WriteEndDocument()
|
||||
'xw.Flush()
|
||||
'xw.Close()
|
||||
End Using
|
||||
|
||||
'Dim xw As XmlWriter = XmlWriter.Create(configPath, xws)
|
||||
'xw.WriteStartDocument()
|
||||
'xw.WriteStartElement($"Configs") '创建跟节点
|
||||
'xw.WriteStartElement($"StationInfo") '创建一级子节点
|
||||
|
||||
'SavePacketInfoNode(xw)
|
||||
|
||||
'xw.WriteEndElement()
|
||||
'xw.WriteEndElement()
|
||||
'xw.WriteEndDocument()
|
||||
'xw.Flush()
|
||||
'xw.Close()
|
||||
Return
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目成功时,新增一条项目站站发布记录
|
||||
''' 由于本地未下载站发布记录,则将命令添加至缓存待上传表中
|
||||
''' </summary>
|
||||
''' <param name="sqliteComm"></param>
|
||||
Private Sub InsertReleaseLogTable(sqliteComm As SQLiteCommand, packetFileName As String)
|
||||
Dim keyValue As New Dictionary(Of String, String) From {
|
||||
{ReleaseLogTable.ColNamesEnum.机型.ToString(), ParentStation.ParentProject.Index},
|
||||
{ReleaseLogTable.ColNamesEnum.栈位.ToString(), ParentStation.Index},
|
||||
{ReleaseLogTable.ColNamesEnum.最新包名.ToString(), packetFileName},
|
||||
{ReleaseLogTable.ColNamesEnum.更新者.ToString(), ParentStation.UserId},
|
||||
{ReleaseLogTable.ColNamesEnum.更新时间.ToString(), $"{ModifiedTime:yyyy-MM-dd HH:mm:ss}"}
|
||||
}
|
||||
Dim commandText As String = Executor.CommandHelper.Insert(ReleaseLogTable.TableName(ParentStation.ParentProject.Index), keyValue)
|
||||
'Executor.ExecuteNonQuery(sqliteComm, commandText)‘本地数据库没有该表,不执行数据表操作
|
||||
CacheTable.SaveCommandToCacheTable(sqliteComm, CacheTable.TableName, commandText) '记录到本地缓存表
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目成功时,更新项目站表对应项目站最新项目站包文件名
|
||||
''' </summary>
|
||||
''' <param name="sqliteComm"></param>
|
||||
''' <param name="packetFileName">项目站包文件名</param>
|
||||
Private Sub UpdateStationTable(sqliteComm As SQLiteCommand, packetFileName As String)
|
||||
Dim keyValue As New Dictionary(Of String, String) From {
|
||||
{StationTable.ColNamesEnum.测试版本包名.ToString(), packetFileName}
|
||||
}
|
||||
Dim condition As String = $"`{StationTable.ColNamesEnum.Index}` = '{ParentStation.Index}'"
|
||||
Dim commandText As String = Executor.CommandHelper.Update(StationTable.TableName(ParentStation.ParentProject.Index), keyValue, condition)
|
||||
Executor.ExecuteNonQuery(sqliteComm, commandText)
|
||||
|
||||
CacheTable.SaveCommandToCacheTable(sqliteComm, CacheTable.TableName, commandText) '记录到本地缓存表
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目时,校验路径合法性
|
||||
''' </summary>
|
||||
Private Sub ReleaseCheckPath()
|
||||
Dim releaseDirPath As String = UtsPath.StationReleaseDirPath
|
||||
If Directory.Exists(releaseDirPath) = False Then
|
||||
Throw New Exception($"未搜索到项目站包发布文件夹 {releaseDirPath}")
|
||||
End If
|
||||
|
||||
Dim designDirPath As String = UtsPath.StationDesignDirPath()
|
||||
If Directory.Exists(designDirPath) = False Then
|
||||
Throw New Exception($"未搜索到项目站包文件夹 {designDirPath}")
|
||||
End If
|
||||
|
||||
Directory.CreateDirectory(UtsPath.StationPacketResourceDirPath(Name))
|
||||
Directory.CreateDirectory(UtsPath.StationPacketTestPlanDirPath(Name))
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目时,将原项目包文件夹名重命名为预发布项目包文件夹名
|
||||
''' </summary>
|
||||
''' <param name="revPacketName">预发布项目站包名</param>
|
||||
Private Sub ReleaseRenamePacketDir(revPacketName As String)
|
||||
|
||||
Dim curPacketDirPath As String = UtsPath.StationPacketDirPath(Name)
|
||||
Dim revPacketDirPath As String = UtsPath.StationPacketDirPath(revPacketName)
|
||||
Directory.Move(curPacketDirPath, revPacketDirPath)
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目时,将缓存信息保存到本地文件中
|
||||
''' </summary>
|
||||
''' <param name="revPacketName">预发布项目站包名</param>
|
||||
Private Sub ReleaseSaveFile(revPacketName As String)
|
||||
Dim revPacketInfoPath As String = $"{UtsPath.StationPacketInfoPath(revPacketName)}"
|
||||
SavePacketInfoFile(revPacketInfoPath) '生成项目站包信息文件
|
||||
|
||||
Dim revStationPlanPath As String = $"{UtsPath.StationPacketTestPlanDirPath(revPacketName)}\Main.xml"
|
||||
SaveStationPlanFile(revStationPlanPath, StationPlan.StationPlanGrid) '生成项目站流程文件
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目时,压缩项目文件夹至发布路径
|
||||
''' </summary>
|
||||
''' <param name="revPacketName">预发布项目站包名</param>
|
||||
''' <param name="revFileName">预发布项目站包文件名</param>
|
||||
Private Sub ReleaseTarFile(revPacketName As String, revFileName As String)
|
||||
Dim tarFileList As New List(Of String)
|
||||
Dim revDirPath As String = UtsPath.StationPacketDirPath(revPacketName)
|
||||
Compress.Compress.FillFileList(tarFileList, revDirPath, revPacketName) '获取压缩文件列表
|
||||
|
||||
Dim revTarFilePath As String = $"{UtsPath.StationDesignDirPath}\{revFileName}"
|
||||
Compress.Compress.TarFiles(tarFileList, revTarFilePath, UtsPath.StationDesignDirPath) '压缩到临时文件夹
|
||||
|
||||
Dim revFilePath As String = $"{UtsPath.StationPacketPath(ParentStation.ParentProject.Index, ParentStation.Index, revFileName)}"
|
||||
If File.Exists(revFilePath) Then File.Delete(revFilePath)
|
||||
File.Move(revTarFilePath, revFilePath) '压缩文件成功后,从临时文件夹移动到发布文件夹
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目成功后,更新数据库数据
|
||||
''' </summary>
|
||||
''' <param name="revFileName"></param>
|
||||
Private Sub ReleaseUpdateDatabase(revFileName As String)
|
||||
|
||||
Dim connectString As String = CommandHelpers.ConnectionString(ConnectionParams.Path, ConnectionParams.Password)
|
||||
Using sqliteConn As New SQLiteConnection(connectString)
|
||||
sqliteConn.Open()
|
||||
Using sqliteComm As SQLiteCommand = sqliteConn.CreateCommand()
|
||||
InsertReleaseLogTable(sqliteComm, revFileName) '更新数据库,项目站发布记录表,新增发布记录
|
||||
|
||||
UpdateStationTable(sqliteComm, revFileName) '更新数据库,测试站表,最新包名
|
||||
End Using
|
||||
sqliteConn.Close()
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目成功后,更新项目包信息
|
||||
''' </summary>
|
||||
''' <param name="revFileName"></param>
|
||||
Private Sub ReleaseUpdatePacketInfo(revFileName As String)
|
||||
FileName = revFileName
|
||||
HistoryImprints.Insert(0, CurrentImprint)
|
||||
CurrentImprint = New StationPacketImprint()
|
||||
End Sub
|
||||
|
||||
Private Function NewPacketName() As String
|
||||
Return $"TP_{ParentStation.ParentProject.Index}_{ParentStation.Index}_REV_{StationVersion.ToString.PadLeft(2, "0"c)}_{ModifiedTime:yyyyMMddHHmmss}"
|
||||
End Function
|
||||
|
||||
Private Function NewPacketFileName() As String
|
||||
Return $"{NewPacketName()}.uts"
|
||||
End Function
|
||||
|
||||
''' <summary>
|
||||
''' 发布项目站包
|
||||
''' </summary>
|
||||
Public Sub ReleasePacket()
|
||||
ReleaseCheckPath()
|
||||
|
||||
Dim revPacketName As String = NewPacketName()
|
||||
Dim revFileName As String = $"{revPacketName}.uts"
|
||||
|
||||
CurrentImprint.Creator = ParentStation.UserId
|
||||
CurrentImprint.FileName = revFileName
|
||||
|
||||
ReleaseRenamePacketDir(revPacketName)
|
||||
|
||||
ReleaseSaveFile(revPacketName)
|
||||
|
||||
ReleaseTarFile(revPacketName, revFileName)
|
||||
|
||||
ReleaseUpdateDatabase(revFileName)
|
||||
|
||||
ReleaseUpdatePacketInfo(revFileName)
|
||||
|
||||
GC.Collect()'回收资源
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
37
UTS_Core/UTSModule/Project/ProjectStationPlan.vb
Normal file
37
UTS_Core/UTSModule/Project/ProjectStationPlan.vb
Normal file
@@ -0,0 +1,37 @@
|
||||
Imports FlexCell
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class ProjectStationPlan
|
||||
Sub New()
|
||||
TestPlanLocked = False
|
||||
’Version = New Version(1, 0)
|
||||
StationPlanGrid = New Grid()
|
||||
Project.StationPlanGrid.InitGrid(StationPlanGrid)
|
||||
End Sub
|
||||
|
||||
|
||||
Sub New(packet As ProjectStationPacket)
|
||||
TestPlanLocked = False
|
||||
‘ Version = New Version(1, 0)
|
||||
|
||||
ParentPacket = packet
|
||||
StationPlanGrid = New Grid()
|
||||
Project.StationPlanGrid.InitGrid(StationPlanGrid)
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>测试流程是否已锁定</summary>
|
||||
Public Property TestPlanLocked As Boolean
|
||||
|
||||
'''' <summary>测试流程版本</summary>
|
||||
'Public Property Version As Version
|
||||
|
||||
''' <summary>测试流程表格</summary>
|
||||
Public Property StationPlanGrid() As Grid
|
||||
|
||||
''' <summary>测试流程所关联的项目站包信息</summary>
|
||||
Public Property ParentPacket() As ProjectStationPacket
|
||||
|
||||
|
||||
End Class
|
||||
End Namespace
|
||||
87
UTS_Core/UTSModule/Project/SingleRowGrid.vb
Normal file
87
UTS_Core/UTSModule/Project/SingleRowGrid.vb
Normal file
@@ -0,0 +1,87 @@
|
||||
Imports System.Drawing
|
||||
Imports FlexCell
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class SingleRowGrid
|
||||
Public Enum ColNameEnum
|
||||
Sn
|
||||
ColName
|
||||
ColValue
|
||||
Max
|
||||
End Enum
|
||||
|
||||
Public Enum RowNameEnum
|
||||
ColName
|
||||
[Step]
|
||||
[Label]
|
||||
Action
|
||||
Command
|
||||
Description
|
||||
Parameter1
|
||||
Parameter2
|
||||
Parameter3
|
||||
Parameter4
|
||||
Parameter5
|
||||
Parameter6
|
||||
Retry
|
||||
RetryInterval
|
||||
Record
|
||||
RecordName
|
||||
PassGoto
|
||||
FailGoto
|
||||
ErrorCode
|
||||
ErrorMessage
|
||||
Help
|
||||
Max
|
||||
End Enum
|
||||
|
||||
''' <summary>
|
||||
''' 初始化测试站表格
|
||||
''' </summary>
|
||||
''' <param name="grd">表格控件</param>
|
||||
Public Shared Sub InitGrid(grd As FlexCell.Grid, Optional commands As String() = Nothing)
|
||||
With grd
|
||||
.AutoRedraw = False
|
||||
|
||||
.NewFile() '清空表格格式
|
||||
|
||||
.Rows = StationPlanGrid.ColNameEnum.Max + 1
|
||||
.Cols = ColNameEnum.Max
|
||||
|
||||
.DisplayRowNumber = True '首列显示数字
|
||||
.ExtendLastCol = True '最后一列自动扩充
|
||||
.MultiSelect = False '是否允许选择多行
|
||||
'.BackColorFixed = Color.FromArgb(255, 227, 228, 225)
|
||||
'.BackColorFixedSel = Color.FromArgb(255, 201, 226, 244)
|
||||
'.BackColorBkg = Color.FromArgb(255, 248, 232, 226)
|
||||
'.BackColor1 = Color.FromArgb(255, 225, 246, 236)
|
||||
'.BackColor2 = Color.FromArgb(255, 247, 247, 228)
|
||||
' .GridColor = Color.FromArgb(255, 148, 190, 231)
|
||||
.BorderStyle = FlexCell.BorderStyleEnum.None
|
||||
.DefaultFont = New Font("微软雅黑", 8)
|
||||
.Range(0, 0, 0, .Cols - 1).Font = New Font($"幼圆", 8) '首行样式
|
||||
|
||||
|
||||
For col As Integer = 0 To ColNameEnum.Max - 1
|
||||
.Cell(0, col).Text = [Enum].GetName(GetType(ColNameEnum), col) '设置列名
|
||||
Next
|
||||
|
||||
For i As Integer = 0 To RowNameEnum.Max - 1
|
||||
.Cell(i, ColNameEnum.ColName).Text = [Enum].GetName(GetType(RowNameEnum), i) '填充行内容
|
||||
Next
|
||||
|
||||
.Column(ColNameEnum.ColName).Locked = True
|
||||
|
||||
.Cell(RowNameEnum.Step, ColNameEnum.ColValue).Locked = True
|
||||
|
||||
.Cell(RowNameEnum.Command, ColNameEnum.ColValue).CellType = CellTypeEnum.ComboBox
|
||||
|
||||
.Cell(RowNameEnum.Action, ColNameEnum.ColValue).CellType = CellTypeEnum.CheckBox
|
||||
.Cell(RowNameEnum.Record, ColNameEnum.ColValue).CellType = CellTypeEnum.CheckBox
|
||||
|
||||
.AutoRedraw = True
|
||||
.Refresh()
|
||||
End With
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
42
UTS_Core/UTSModule/Project/StationPacketImprint.vb
Normal file
42
UTS_Core/UTSModule/Project/StationPacketImprint.vb
Normal file
@@ -0,0 +1,42 @@
|
||||
Imports System.Text
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class StationPacketImprint
|
||||
Sub New()
|
||||
|
||||
Imprints = New List(Of String)()
|
||||
End Sub
|
||||
|
||||
Sub New(imprintString As String)
|
||||
imprintString = imprintString.Replace(Chr(13), Chr(0))
|
||||
Imprints = imprintString.Split(Chr(10)).ToList()
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 项目站包文件名
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property FileName() As String
|
||||
|
||||
''' <summary>
|
||||
''' 项目站包创建者
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Creator() As String
|
||||
|
||||
''' <summary>
|
||||
''' 项目站包版本说明
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Property Imprints() As List(Of String)
|
||||
|
||||
Public Overrides Function ToString() As String
|
||||
Dim strReturn As New StringBuilder
|
||||
For Each imprint As String In Imprints
|
||||
strReturn.Append($"{imprint}{vbNewLine}")
|
||||
Next
|
||||
Return strReturn.ToString()
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
212
UTS_Core/UTSModule/Project/StationPlanCommandHelper.vb
Normal file
212
UTS_Core/UTSModule/Project/StationPlanCommandHelper.vb
Normal file
@@ -0,0 +1,212 @@
|
||||
Imports System.Data.SQLite
|
||||
Imports UTS_Core.Database.Sqlite
|
||||
Imports UTS_Core.UTSModule.DatabaseTable
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class StationPlanCommandHelper
|
||||
Sub New()
|
||||
Params = New List(Of Station.CommandParam)()
|
||||
End Sub
|
||||
|
||||
|
||||
Public Property CommandIndex() As String
|
||||
|
||||
Public Property CommandType() As String
|
||||
|
||||
Public Property CommandName() As String
|
||||
|
||||
Public Property CommandDesc() As String
|
||||
|
||||
Public Property Retry() As String
|
||||
|
||||
Public Property RetryInterval() As String
|
||||
|
||||
Public Property Record() As String
|
||||
|
||||
Public Property RecordName() As String
|
||||
|
||||
Public Property PassGoto() As String
|
||||
|
||||
Public Property FailGoto() As String
|
||||
|
||||
Public Property ErrorCode() As String
|
||||
|
||||
Public Property ErrorMessage() As String
|
||||
|
||||
Public Property Help() As String
|
||||
|
||||
Public Property Params() As List(Of Station.CommandParam)
|
||||
|
||||
Private Shared Function SearchCommand(path As String, password As String) As DataTable
|
||||
Dim connectString As String = CommandHelpers.ConnectionString(path, password)
|
||||
Using sqliteConn As New SQLiteConnection(connectString)
|
||||
sqliteConn.Open()
|
||||
Dim tableName As String = CommandHelperTable.TableName
|
||||
Dim colNames As New List(Of String)
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ID.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.CommandIndex.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.CommandType.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.CommandName.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.CommandDesc.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.Retry.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.RetryInterval.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.Record.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.RecordName.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.PassGoto.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.FailGoto.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ErrorCode.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ErrorMessage.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.Help.ToString())
|
||||
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamDesc1.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamType1.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamLower1.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamUpper1.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamValue1.ToString())
|
||||
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamDesc2.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamType2.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamLower2.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamUpper2.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamValue2.ToString())
|
||||
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamDesc3.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamType3.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamLower3.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamUpper3.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamValue3.ToString())
|
||||
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamDesc4.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamType4.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamLower4.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamUpper4.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamValue4.ToString())
|
||||
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamDesc5.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamType5.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamLower5.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamUpper5.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamValue5.ToString())
|
||||
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamDesc6.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamType6.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamLower6.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamUpper6.ToString())
|
||||
colNames.Add(CommandHelperTable.ColNamesEnum.ParamValue6.ToString())
|
||||
|
||||
Return Executor.Search(sqliteConn, tableName, colNames)
|
||||
sqliteConn.Close()
|
||||
End Using
|
||||
End Function
|
||||
|
||||
Public Function InitCommandHelper(dtRow As DataRow) As Boolean
|
||||
CommandIndex = dtRow.Item(CommandHelperTable.ColNamesEnum.CommandIndex).ToString()
|
||||
CommandType = dtRow.Item(CommandHelperTable.ColNamesEnum.CommandType).ToString()
|
||||
CommandName = dtRow.Item(CommandHelperTable.ColNamesEnum.CommandName).ToString()
|
||||
CommandDesc = dtRow.Item(CommandHelperTable.ColNamesEnum.CommandDesc).ToString()
|
||||
|
||||
Retry = dtRow.Item(CommandHelperTable.ColNamesEnum.Retry).ToString()
|
||||
RetryInterval = dtRow.Item(CommandHelperTable.ColNamesEnum.RetryInterval).ToString()
|
||||
Record = dtRow.Item(CommandHelperTable.ColNamesEnum.Record).ToString()
|
||||
RecordName = dtRow.Item(CommandHelperTable.ColNamesEnum.RecordName).ToString()
|
||||
PassGoto = dtRow.Item(CommandHelperTable.ColNamesEnum.PassGoto).ToString()
|
||||
FailGoto = dtRow.Item(CommandHelperTable.ColNamesEnum.FailGoto).ToString()
|
||||
ErrorCode = dtRow.Item(CommandHelperTable.ColNamesEnum.ErrorCode).ToString()
|
||||
ErrorMessage = dtRow.Item(CommandHelperTable.ColNamesEnum.ErrorMessage).ToString()
|
||||
Help = dtRow.Item(CommandHelperTable.ColNamesEnum.Help).ToString()
|
||||
|
||||
Params.Clear()
|
||||
|
||||
Dim param As New Station.CommandParam
|
||||
param.Desc = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamDesc1).ToString()
|
||||
param.Type = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamType1).ToString()
|
||||
param.LowerLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamLower1).ToString()
|
||||
param.UpperLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamUpper1).ToString()
|
||||
param.Value = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamValue1).ToString()
|
||||
|
||||
if String.IsNullOrEmpty(param.Desc) Then param.Desc = "未使用"
|
||||
Params.Add(param)
|
||||
|
||||
Dim param2 As New Station.CommandParam
|
||||
param2.Desc = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamDesc2).ToString()
|
||||
param2.Type = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamType2).ToString()
|
||||
param2.LowerLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamLower2).ToString()
|
||||
param2.UpperLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamUpper2).ToString()
|
||||
param2.Value = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamValue2).ToString()
|
||||
|
||||
if String.IsNullOrEmpty(param2.Desc) Then param2.Desc = "未使用"
|
||||
Params.Add(param2)
|
||||
|
||||
Dim param3 As New Station.CommandParam
|
||||
param3.Desc = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamDesc3).ToString()
|
||||
param3.Type = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamType3).ToString()
|
||||
param3.LowerLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamLower3).ToString()
|
||||
param3.UpperLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamUpper3).ToString()
|
||||
param3.Value = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamValue3).ToString()
|
||||
|
||||
if String.IsNullOrEmpty(param3.Desc) Then param3.Desc = "未使用"
|
||||
Params.Add(param3)
|
||||
|
||||
Dim param4 As New Station.CommandParam
|
||||
param4.Desc = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamDesc4).ToString()
|
||||
param4.Type = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamType4).ToString()
|
||||
param4.LowerLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamLower5).ToString()
|
||||
param4.UpperLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamUpper5).ToString()
|
||||
param4.Value = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamValue5).ToString()
|
||||
|
||||
if String.IsNullOrEmpty(param4.Desc) Then param4.Desc = "未使用"
|
||||
Params.Add(param4)
|
||||
|
||||
Dim param5 As New Station.CommandParam
|
||||
param5.Desc = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamDesc5).ToString()
|
||||
param5.Type = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamType5).ToString()
|
||||
param5.LowerLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamLower5).ToString()
|
||||
param5.UpperLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamUpper5).ToString()
|
||||
param5.Value = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamValue5).ToString()
|
||||
|
||||
if String.IsNullOrEmpty(param5.Desc) Then param5.Desc = "未使用"
|
||||
Params.Add(param5)
|
||||
|
||||
Dim param6 As New Station.CommandParam
|
||||
param6.Desc = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamDesc6).ToString()
|
||||
param6.Type = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamType6).ToString()
|
||||
param6.LowerLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamLower6).ToString()
|
||||
param6.UpperLimit = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamUpper6).ToString()
|
||||
param6.Value = dtRow.Item(CommandHelperTable.ColNamesEnum.ParamValue6).ToString()
|
||||
|
||||
if String.IsNullOrEmpty(param6.Desc) Then param6.Desc = "未使用"
|
||||
Params.Add(param6)
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Shared Function InitCommandHelper(dtCommand As DataTable) As Dictionary(Of String, StationPlanCommandHelper)
|
||||
Dim dicCommandHelpers As New Dictionary(Of String, StationPlanCommandHelper)
|
||||
|
||||
For row As Integer = 0 To dtCommand.Rows.Count - 1
|
||||
Dim commandHelper As New StationPlanCommandHelper
|
||||
commandHelper.InitCommandHelper(dtCommand.Rows(row))
|
||||
|
||||
dicCommandHelpers.Add(commandHelper.CommandIndex, commandHelper)
|
||||
Next
|
||||
|
||||
Return dicCommandHelpers
|
||||
End Function
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 初始化流程站帮助信息
|
||||
''' 从本地数据库中读取
|
||||
''' </summary>
|
||||
''' <param name="path">本地数据库路径</param>
|
||||
''' <param name="password">本地数据库密码</param>
|
||||
''' <returns>初始化是否成功</returns>
|
||||
Public Shared Function InitCommandHelper(path As String, password As String) As Dictionary(Of String, StationPlanCommandHelper)
|
||||
'查询数据表
|
||||
Dim dtCommand As DataTable = SearchCommand(path, password)
|
||||
|
||||
'赋值
|
||||
Return InitCommandHelper(dtCommand)
|
||||
End Function
|
||||
End Class
|
||||
End Namespace
|
||||
199
UTS_Core/UTSModule/Project/StationPlanGrid.vb
Normal file
199
UTS_Core/UTSModule/Project/StationPlanGrid.vb
Normal file
@@ -0,0 +1,199 @@
|
||||
Imports System.Drawing
|
||||
Imports FlexCell
|
||||
|
||||
Namespace UTSModule.Project
|
||||
Public Class StationPlanGrid
|
||||
''' <summary>
|
||||
''' 表格各列名称对应下表
|
||||
''' </summary>
|
||||
Enum ColNameEnum
|
||||
[Step]
|
||||
[Label]
|
||||
Action
|
||||
Command
|
||||
Description
|
||||
Parameter1
|
||||
Parameter2
|
||||
Parameter3
|
||||
Parameter4
|
||||
Parameter5
|
||||
Parameter6
|
||||
Retry
|
||||
RetryInterval
|
||||
Record
|
||||
RecordName
|
||||
PassGoto
|
||||
FailGoto
|
||||
ErrorCode
|
||||
ErrorMessage
|
||||
Help
|
||||
Max
|
||||
End Enum
|
||||
|
||||
''' <summary>
|
||||
''' 测试表格中的列名
|
||||
''' </summary>
|
||||
Public Shared Name() As String = {"Step",
|
||||
"Label",
|
||||
"Action",
|
||||
"Command",
|
||||
"Description ",
|
||||
"Parameter_1",
|
||||
"Parameter_2",
|
||||
"Parameter_3",
|
||||
"Parameter_4",
|
||||
"Parameter_5",
|
||||
"Parameter_6",
|
||||
"Retry",
|
||||
"RetryInterval",
|
||||
"Record",
|
||||
"RecordName",
|
||||
"Pass Goto",
|
||||
"Fail Goto",
|
||||
"Error Code",
|
||||
"Error Message",
|
||||
"Help"}
|
||||
|
||||
''' <summary>
|
||||
''' 测试表每列默认宽度
|
||||
''' </summary>
|
||||
Public Shared Width() As Integer = {30,
|
||||
50,
|
||||
50,
|
||||
120,
|
||||
80,
|
||||
100,
|
||||
80,
|
||||
80,
|
||||
80,
|
||||
80,
|
||||
80,
|
||||
80,
|
||||
80,
|
||||
50,
|
||||
50,
|
||||
60,
|
||||
60,
|
||||
80,
|
||||
100,
|
||||
50}
|
||||
|
||||
''' <summary>
|
||||
''' 站测试表每列默认类型
|
||||
''' </summary>
|
||||
Public Shared Type() As CellTypeEnum = {CellTypeEnum.DefaultType,
|
||||
CellTypeEnum.DefaultType,
|
||||
CellTypeEnum.CheckBox,
|
||||
CellTypeEnum.ComboBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.CheckBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox,
|
||||
CellTypeEnum.TextBox
|
||||
}
|
||||
|
||||
''' <summary>
|
||||
''' 站测试表每列默认字体名称
|
||||
''' </summary>
|
||||
Public Shared FontName() As String = {$"Calibri", $"微软雅黑", $"Calibri", $"Consolas", $"微软雅黑",
|
||||
$"微软雅黑", $"微软雅黑", $"微软雅黑", $"微软雅黑", $"微软雅黑", $"微软雅黑",
|
||||
$"Calibri", $"Calibri", $"Consolas", $"Consolas", $"Consolas", $"Consolas",
|
||||
$"Calibri", $"微软雅黑", $"微软雅黑"}
|
||||
|
||||
''' <summary>
|
||||
''' 站测试表每列默认字体颜色
|
||||
''' </summary>
|
||||
Public Shared ForeColor() As Color = {Color.Black, Color.Black, Color.Black,
|
||||
Color.FromArgb(255, 0, 0, 255), Color.FromArgb(255, 0, 128, 0),
|
||||
Color.FromArgb(255, 0, 128, 128), Color.FromArgb(255, 0, 128, 128),
|
||||
Color.FromArgb(255, 0, 128, 128), Color.FromArgb(255, 0, 128, 128),
|
||||
Color.FromArgb(255, 0, 128, 128), Color.FromArgb(255, 0, 128, 128),
|
||||
Color.FromArgb(255, 128, 128, 128), Color.FromArgb(255, 128, 128, 128),
|
||||
Color.FromArgb(255, 0, 0, 128), Color.FromArgb(255, 0, 0, 128),
|
||||
Color.FromArgb(255, 0, 128, 0), Color.FromArgb(255, 255, 0, 0),
|
||||
Color.FromArgb(255, 128, 128, 128), Color.FromArgb(255, 128, 128, 128),
|
||||
Color.FromArgb(255, 128, 128, 0)}
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 初始化站测试表格
|
||||
''' </summary>
|
||||
''' <param name="grdStationTest"></param>
|
||||
Public Shared Sub InitGrid(grdStationTest As Grid, Optional commands As String() = Nothing)
|
||||
If grdStationTest Is Nothing Then
|
||||
grdStationTest = New Grid()
|
||||
Else
|
||||
grdStationTest.NewFile() '清空表格格式
|
||||
End If
|
||||
|
||||
With grdStationTest
|
||||
.Rows = 100
|
||||
.Cols = ColNameEnum.Max
|
||||
|
||||
.AutoRedraw = False
|
||||
.BorderStyle = BorderStyleEnum.None
|
||||
.DisplayRowNumber = True '首列显示数字
|
||||
.ExtendLastCol = True '最后一列自动扩充
|
||||
'.BackColorFixed = Color.FromArgb(255, 227, 228, 225)
|
||||
'.BackColorFixedSel = Color.FromArgb(255, 201, 226, 244)
|
||||
'.BackColorBkg = Color.FromArgb(255, 248, 232, 226)
|
||||
'.BackColor1 = Color.FromArgb(255, 225, 246, 236)
|
||||
'.BackColor2 = Color.FromArgb(255, 247, 247, 228)
|
||||
'.GridColor = Color.FromArgb(255, 148, 190, 231)
|
||||
.DefaultFont = New Font("微软雅黑", 8)
|
||||
.Range(0, 0, 0, .Cols - 1).Font = New Font($"幼圆", 8)
|
||||
For i As Integer = 0 To Name.Length - 1
|
||||
.Cell(0, i).Text = Name(i) '设置列名
|
||||
.Column(i).Width = CShort(Width(i)) '设置列宽
|
||||
.Column(i).CellType = Type(i) '设置列型
|
||||
.Range(1, i, .Rows - 1, i).Font = New Font(FontName(i), 8)
|
||||
.Range(1, i, .Rows - 1, i).ForeColor = ForeColor(i)
|
||||
Next
|
||||
|
||||
.ComboBox(ColNameEnum.Command).Items.Clear()
|
||||
If commands IsNot Nothing Then
|
||||
.ComboBox(ColNameEnum.Command).Items.AddRange(commands)
|
||||
End If
|
||||
.ComboBox(ColNameEnum.Command).Locked = False '只允许选择下拉框内容,不允许修改
|
||||
|
||||
.Cell(1, ColNameEnum.Label).Text = "Setup"
|
||||
.Cell(3, ColNameEnum.Label).Text = "End Setup"
|
||||
|
||||
.Cell(5, ColNameEnum.Label).Text = "Main"
|
||||
.Cell(7, ColNameEnum.Label).Text = "End Main"
|
||||
|
||||
|
||||
.Cell(9, ColNameEnum.Label).Text = "Pass"
|
||||
.Cell(11, ColNameEnum.Label).Text = "End Pass"
|
||||
|
||||
.Cell(13, ColNameEnum.Label).Text = "Fail"
|
||||
.Cell(15, ColNameEnum.Label).Text = "End Fail"
|
||||
|
||||
.Cell(17, ColNameEnum.Label).Text = "Finally"
|
||||
.Cell(19, ColNameEnum.Label).Text = "End Finally"
|
||||
|
||||
|
||||
For i As Integer = 1 To grdStationTest.Rows - 1
|
||||
If String.IsNullOrEmpty(.Cell(i, ColNameEnum.Label).Text) = False Then
|
||||
.Cell(i, ColNameEnum.Label).FontBold = True
|
||||
End If
|
||||
Next
|
||||
|
||||
.AutoRedraw = True
|
||||
.Refresh()
|
||||
End With
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
Reference in New Issue
Block a user