初始化项目
This commit is contained in:
37
BLV_Studio/Test/DeepCopyHelper.vb
Normal file
37
BLV_Studio/Test/DeepCopyHelper.vb
Normal file
@@ -0,0 +1,37 @@
|
||||
Imports System.IO
|
||||
Imports System.Runtime.Serialization.Formatters.Binary
|
||||
Imports Processform.DeviceModel
|
||||
|
||||
|
||||
Public Class DeepCopyHelper
|
||||
|
||||
|
||||
Public Shared Function DeepCopy(Of T)(ByVal obj As T) As T
|
||||
If Not GetType(T).IsSerializable Then
|
||||
Throw New ArgumentException("The type must be serializable.", NameOf(obj))
|
||||
End If
|
||||
|
||||
If obj Is Nothing Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Dim formatter As BinaryFormatter = New BinaryFormatter()
|
||||
|
||||
Using stream As MemoryStream = New MemoryStream()
|
||||
formatter.Serialize(stream, obj)
|
||||
stream.Seek(0, SeekOrigin.Begin)
|
||||
Return CType(formatter.Deserialize(stream), T)
|
||||
End Using
|
||||
End Function
|
||||
|
||||
Public Shared Function DictionaryCopy(dic As Dictionary(Of String, DeviceModel)) As Dictionary(Of String, DeviceModel)
|
||||
Dim resultdic As New Dictionary(Of String, DeviceModel)
|
||||
For Each index In dic
|
||||
resultdic.Add(index.Key, index.Value)
|
||||
Next
|
||||
Return resultdic
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
356
BLV_Studio/Test/DeviceModel.vb
Normal file
356
BLV_Studio/Test/DeviceModel.vb
Normal file
@@ -0,0 +1,356 @@
|
||||
Imports System.Xml.Serialization
|
||||
|
||||
<Serializable>
|
||||
<XmlRoot(ElementName:="DeviceModeInfo")>
|
||||
Public Class DeviceModel
|
||||
''' <summary>
|
||||
''' 客户名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlIgnore> '忽略,字段不参与序列号和反序列化
|
||||
Public Property VerdorName As String
|
||||
|
||||
''' <summary>
|
||||
''' 酒店名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlIgnore>
|
||||
Public Property HotelName As String
|
||||
|
||||
''' <summary>
|
||||
''' 酒店房型
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlIgnore>
|
||||
Public Property HotelRoomType As String
|
||||
|
||||
''' <summary>
|
||||
''' 模型名称
|
||||
''' </summary>
|
||||
<XmlAttribute>
|
||||
Public Name As String
|
||||
|
||||
''' <summary>
|
||||
''' 模型说明
|
||||
''' </summary>
|
||||
<XmlElement("Description")>
|
||||
Public Desc As DeviceDescription
|
||||
|
||||
''' <summary>
|
||||
''' 模型配置信息
|
||||
''' </summary>
|
||||
<XmlArray("Common_Configuration"), XmlArrayItem("ConfigurationGroup", GetType(DeviceModelConfigGroup))>
|
||||
Public Config As List(Of DeviceModelConfigGroup)
|
||||
|
||||
''' <summary>
|
||||
''' 模型子节点
|
||||
''' </summary>
|
||||
<XmlArray("DeviceObjectNodes"), XmlArrayItem("DeviceClass", GetType(DeviceChildNodeClass))>
|
||||
Public Nodes As List(Of DeviceChildNodeClass)
|
||||
|
||||
Public Sub New()
|
||||
|
||||
Desc = New DeviceDescription
|
||||
|
||||
Config = New List(Of DeviceModelConfigGroup)
|
||||
|
||||
Nodes = New List(Of DeviceChildNodeClass)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
<XmlRoot(ElementName:="Description")>
|
||||
Public Class DeviceDescription
|
||||
''' <summary>
|
||||
''' 设备名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_NAME")>
|
||||
Public Property Name As String
|
||||
|
||||
''' <summary>
|
||||
''' 设备商标
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_BRAND")>
|
||||
Public Property Brand As String
|
||||
|
||||
''' <summary>
|
||||
''' 设备模型
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_MN")>
|
||||
Public Property Model As String
|
||||
|
||||
''' <summary>
|
||||
''' 协议
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("PROTOCOL")>
|
||||
Public Property Protocol As String
|
||||
|
||||
''' <summary>
|
||||
''' 协议数据
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("PROTOCOL_DATA")>
|
||||
Public Property ProtocolData As String
|
||||
|
||||
''' <summary>
|
||||
''' 协议版本
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("PROTOCOL_VER")>
|
||||
Public Property ProtocolVer As String
|
||||
|
||||
''' <summary>
|
||||
''' 设备接口
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_INTERFACE")>
|
||||
Public Property DevInterface As String
|
||||
|
||||
''' <summary>
|
||||
''' 设备类型数据
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_TYPE_DATA")>
|
||||
Public Property DevTypeData As String
|
||||
|
||||
''' <summary>
|
||||
''' 设备数据模型版本
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_DATA_MODEL_VER")>
|
||||
Public Property DevDataModelVer As String
|
||||
|
||||
''' <summary>
|
||||
''' 设备说明
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_DESCRIPTION")>
|
||||
Public Property DevDescription As String
|
||||
|
||||
''' <summary>
|
||||
''' 设备说明
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("IconKey")>
|
||||
Public Property IconKey As String
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 引用基类的名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_BASIC_CLASS_FILENAME")>
|
||||
Public Property DevBasicClassFilename As String
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 引用条件的名称
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("DEV_CONDICTION_FILENAME")>
|
||||
Public Property DevCondictionFilename As String
|
||||
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Public Class DeviceChildNodeClass
|
||||
<XmlAttribute>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property [Interface] As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property DEV_TYPE_DATA As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property PROTOCOL_VER As String
|
||||
|
||||
|
||||
<XmlElement("Node")>
|
||||
Public Nodes As List(Of DeviceChildNode)
|
||||
|
||||
Public Sub New()
|
||||
Nodes = New List(Of DeviceChildNode)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Public Class DeviceChildNode
|
||||
<XmlAttribute>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property DefaultAliasName As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property [Interface] As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property LoopAddr As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property DefaultClass As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property Description As String
|
||||
|
||||
''' <summary>
|
||||
''' 设备对象类型可选对象类型集合
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
<XmlElement("BaseClassSelect")>
|
||||
Public Property BaseClasses As BaseClasses
|
||||
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Public Class BaseClasses
|
||||
|
||||
<XmlElement("BaseClass")>
|
||||
Public Classes As List(Of BaseClass)
|
||||
|
||||
<XmlIgnore> '忽略,字段不参与序列号和反序列化‘Classes的元素个数’
|
||||
Public ClassesLstCnt As Integer
|
||||
|
||||
Sub New()
|
||||
Classes = New List(Of BaseClass)
|
||||
ClassesLstCnt = 0
|
||||
End Sub
|
||||
|
||||
Public Function GetAllClassName() As String()
|
||||
Dim s As New List(Of String)
|
||||
For Each base As BaseClass In Classes
|
||||
s.Add(base.Name)
|
||||
Next
|
||||
ClassesLstCnt = s.Count
|
||||
Return s.ToArray
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Public Class BaseClass
|
||||
<XmlAttribute>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property [Interface] As String
|
||||
|
||||
<XmlText>
|
||||
Public Property Value As String
|
||||
End Class
|
||||
|
||||
Public Class DeviceModelConfigGroup
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property CFG_Type As String
|
||||
|
||||
<XmlAttribute>
|
||||
Public Property CFG_Value As String
|
||||
|
||||
<XmlElement("Configuration")>
|
||||
Public Attributes As List(Of DeviceChildNodeAttribute)
|
||||
|
||||
Sub New()
|
||||
Attributes = New List(Of DeviceChildNodeAttribute)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class DeviceChildNodeAttribute
|
||||
<XmlAttribute("Name")>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute("DataType")>
|
||||
Public Property DataType As String
|
||||
|
||||
<XmlAttribute("DataRange")>
|
||||
Public Property DataRange As String
|
||||
|
||||
<XmlAttribute("DataRangeValue")>
|
||||
Public Property DataRangeValue As String
|
||||
|
||||
<XmlAttribute("DataDefault")>
|
||||
Public Property DataDefault As String
|
||||
|
||||
<XmlAttribute("Desc")>
|
||||
Public Property Desc As String
|
||||
|
||||
<XmlText>
|
||||
Public Property Value As String
|
||||
|
||||
Sub New()
|
||||
DataRangeValue = ""
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class DeviceChildNodeEvent
|
||||
<XmlAttribute("Name")>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute("DataValue")>
|
||||
Public Property DataValue As String
|
||||
|
||||
<XmlAttribute("Desc")>
|
||||
Public Property Desc As String
|
||||
|
||||
<XmlText>
|
||||
Public Property Value As String
|
||||
|
||||
End Class
|
||||
|
||||
Public Class DeviceChildNodeMethod
|
||||
<XmlAttribute("Name")>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute("Desc")>
|
||||
Public Property Desc As String
|
||||
|
||||
<XmlArray("Params"), XmlArrayItem("Param", GetType(DeviceChildNodeMethodParam))>
|
||||
Public Params As List(Of DeviceChildNodeMethodParam)
|
||||
|
||||
Sub New()
|
||||
Params = New List(Of DeviceChildNodeMethodParam)
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
Public Class DeviceChildNodeMethodParam
|
||||
<XmlAttribute("Name")>
|
||||
Public Property Name As String
|
||||
|
||||
<XmlAttribute("DataType")>
|
||||
Public Property DataType As String
|
||||
|
||||
<XmlAttribute("DataRange")>
|
||||
Public Property DataRange As String
|
||||
|
||||
<XmlAttribute("DataRangeValue")>
|
||||
Public Property DataRangeValue As String
|
||||
|
||||
<XmlAttribute("DataDefault")>
|
||||
Public Property DataDefault As String
|
||||
|
||||
<XmlAttribute("Desc")>
|
||||
Public Property Desc As String
|
||||
|
||||
<XmlText>
|
||||
Public Property Value As String
|
||||
|
||||
Sub New()
|
||||
DataRangeValue = ""
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
46
BLV_Studio/Test/GeisControl/gridControl.vb
Normal file
46
BLV_Studio/Test/GeisControl/gridControl.vb
Normal file
@@ -0,0 +1,46 @@
|
||||
Imports System.Threading
|
||||
|
||||
Public Class gridControl
|
||||
''' <summary>测试器句柄,全局唯一</summary>
|
||||
Private Shared _object As gridControl
|
||||
Private Shared _Grid As FlexCell.Grid
|
||||
''' <summary>初始化测试器线程锁</summary>
|
||||
Private Shared ReadOnly InitLock As New Object()
|
||||
|
||||
''' <summary>
|
||||
''' 创建类单例对象
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Public Shared Function CreateObject(Grid As FlexCell.Grid) As gridControl
|
||||
If _object Is Nothing Then
|
||||
SyncLock InitLock
|
||||
'内存护栏
|
||||
Thread.MemoryBarrier()
|
||||
If _object Is Nothing Then
|
||||
_object = New gridControl(Grid)
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
Return _object
|
||||
End Function
|
||||
Private Sub New(Grid As FlexCell.Grid)
|
||||
_Grid = Grid
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "表格事件" '表格事件
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "表格样式"
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "表格控制" '初始化 增删行列,设置数据
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
190
BLV_Studio/Test/GridTest/ActionParameter.Designer.vb
generated
Normal file
190
BLV_Studio/Test/GridTest/ActionParameter.Designer.vb
generated
Normal file
@@ -0,0 +1,190 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class ActionParameter
|
||||
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.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Table_Grid1 = New FlexCell.Grid()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Grid1 = New FlexCell.Grid()
|
||||
Me.CmdGrid = New FlexCell.Grid()
|
||||
Me.Button4 = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Label4.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label4.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(613, 26)
|
||||
Me.Label4.TabIndex = 26
|
||||
Me.Label4.Text = "Action parameter"
|
||||
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Table_Grid1
|
||||
'
|
||||
Me.Table_Grid1.CheckedImage = Nothing
|
||||
Me.Table_Grid1.DefaultFont = New System.Drawing.Font("宋体", 12.0!)
|
||||
Me.Table_Grid1.DefaultRowHeight = CType(25, Short)
|
||||
Me.Table_Grid1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Table_Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Table_Grid1.Location = New System.Drawing.Point(241, 67)
|
||||
Me.Table_Grid1.Name = "Table_Grid1"
|
||||
Me.Table_Grid1.Size = New System.Drawing.Size(353, 254)
|
||||
Me.Table_Grid1.TabIndex = 27
|
||||
Me.Table_Grid1.UncheckedImage = Nothing
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(477, 502)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(117, 52)
|
||||
Me.Button1.TabIndex = 28
|
||||
Me.Button1.Text = "OK"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(0, 34)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(179, 19)
|
||||
Me.Label1.TabIndex = 29
|
||||
Me.Label1.Text = "Equipment method:"
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(185, 29)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox1.TabIndex = 30
|
||||
Me.ComboBox1.Visible = False
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.Location = New System.Drawing.Point(344, 502)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(117, 52)
|
||||
Me.Button3.TabIndex = 32
|
||||
Me.Button3.Text = "Deletion method"
|
||||
Me.Button3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Location = New System.Drawing.Point(209, 502)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(117, 52)
|
||||
Me.Button2.TabIndex = 31
|
||||
Me.Button2.Text = "Add method"
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label2.Location = New System.Drawing.Point(237, 34)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(259, 19)
|
||||
Me.Label2.TabIndex = 33
|
||||
Me.Label2.Text = "Device method parameters:"
|
||||
'
|
||||
'Grid1
|
||||
'
|
||||
Me.Grid1.CheckedImage = Nothing
|
||||
Me.Grid1.DefaultFont = New System.Drawing.Font("宋体", 12.0!)
|
||||
Me.Grid1.DefaultRowHeight = CType(25, Short)
|
||||
Me.Grid1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Grid1.Location = New System.Drawing.Point(4, 67)
|
||||
Me.Grid1.Name = "Grid1"
|
||||
Me.Grid1.Size = New System.Drawing.Size(227, 254)
|
||||
Me.Grid1.TabIndex = 34
|
||||
Me.Grid1.UncheckedImage = Nothing
|
||||
'
|
||||
'CmdGrid
|
||||
'
|
||||
Me.CmdGrid.CheckedImage = Nothing
|
||||
Me.CmdGrid.DefaultFont = New System.Drawing.Font("宋体", 12.0!)
|
||||
Me.CmdGrid.DefaultRowHeight = CType(25, Short)
|
||||
Me.CmdGrid.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CmdGrid.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.CmdGrid.Location = New System.Drawing.Point(4, 327)
|
||||
Me.CmdGrid.Name = "CmdGrid"
|
||||
Me.CmdGrid.Size = New System.Drawing.Size(590, 169)
|
||||
Me.CmdGrid.TabIndex = 35
|
||||
Me.CmdGrid.UncheckedImage = Nothing
|
||||
'
|
||||
'Button4
|
||||
'
|
||||
Me.Button4.Location = New System.Drawing.Point(477, 29)
|
||||
Me.Button4.Name = "Button4"
|
||||
Me.Button4.Size = New System.Drawing.Size(110, 32)
|
||||
Me.Button4.TabIndex = 36
|
||||
Me.Button4.Text = "隐藏"
|
||||
Me.Button4.UseVisualStyleBackColor = True
|
||||
Me.Button4.Visible = False
|
||||
'
|
||||
'ActionParameter
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(613, 566)
|
||||
Me.Controls.Add(Me.Button4)
|
||||
Me.Controls.Add(Me.CmdGrid)
|
||||
Me.Controls.Add(Me.Grid1)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Button3)
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.ComboBox1)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.Table_Grid1)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Name = "ActionParameter"
|
||||
Me.Text = "ActionParameter"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents Table_Grid1 As FlexCell.Grid
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents ComboBox1 As ComboBox
|
||||
Friend WithEvents Button3 As Button
|
||||
Friend WithEvents Button2 As Button
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Grid1 As FlexCell.Grid
|
||||
Friend WithEvents CmdGrid As FlexCell.Grid
|
||||
Friend WithEvents Button4 As Button
|
||||
End Class
|
||||
120
BLV_Studio/Test/GridTest/ActionParameter.resx
Normal file
120
BLV_Studio/Test/GridTest/ActionParameter.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>
|
||||
903
BLV_Studio/Test/GridTest/ActionParameter.vb
Normal file
903
BLV_Studio/Test/GridTest/ActionParameter.vb
Normal file
@@ -0,0 +1,903 @@
|
||||
Imports FlexCell
|
||||
Imports FlexCell.Grid
|
||||
|
||||
Public Class ActionParameter
|
||||
''' <summary>
|
||||
''' 设备对象基类信息
|
||||
''' </summary>
|
||||
''' <returns></returns>
|
||||
Private Dic_1, Dic_3, Dic_5, Dic_4 As List(Of String)
|
||||
Private Dic_2 As Dictionary(Of String, List(Of String))
|
||||
Private g_BasicClasses As DeviceObjectClasses
|
||||
Private g_nodename As String
|
||||
Public g_ExecutionMode As String
|
||||
Public g_DevNodename As String
|
||||
Public KeyName As String
|
||||
|
||||
'输入输出值
|
||||
Public G_input As String
|
||||
Public G_Result As String
|
||||
|
||||
Private ParamDic As Dictionary(Of String, Dictionary(Of String, String))
|
||||
Private Sub ActionParameter_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
'时间
|
||||
Dic_3 = New List(Of String)
|
||||
'单位
|
||||
Dic_4 = New List(Of String)
|
||||
Dic_5 = New List(Of String)
|
||||
ParamDic = New Dictionary(Of String, Dictionary(Of String, String))
|
||||
' 第一个为默认值
|
||||
For i = 0 To 255
|
||||
If i < 11 AndAlso i > 0 Then
|
||||
Dic_5.Add(i)
|
||||
End If
|
||||
Dic_3.Add(i)
|
||||
Next
|
||||
initCmdGrid()
|
||||
'第一个为默认值
|
||||
Dic_4.AddRange({"s", "ms", "m", "H", "Day"})
|
||||
If String.IsNullOrEmpty(G_input) OrElse G_input.Equals("advanced") Then
|
||||
Else
|
||||
setrowdata(G_input)
|
||||
End If
|
||||
|
||||
ComboBox1.SelectedIndex = 0 'Button4_Click(Nothing, Nothing)
|
||||
End Sub
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Dim buf() As String
|
||||
G_Result = ""
|
||||
Dim desc As String = String.Empty
|
||||
Dim Resli As Dictionary(Of String, String)
|
||||
If Not (CmdGrid.Rows > 1) Then
|
||||
If MsgBox("No device method is selected!!", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Close()
|
||||
Return
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim gparstr As String = String.Empty
|
||||
For i = 1 To CmdGrid.Rows - 1
|
||||
gparstr = CmdGrid.Cell(i, 2).Text
|
||||
Resli = ParamDic.Item(gparstr)
|
||||
For Each index In Resli
|
||||
G_Result = $"{G_Result}{index.Value }{index.Key },{gparstr}{vbLf }"
|
||||
Next
|
||||
|
||||
Next
|
||||
If G_Result.Length > 0 Then
|
||||
G_Result = G_Result.Substring(0, G_Result.Length - 1)
|
||||
End If
|
||||
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Close()
|
||||
Return
|
||||
End Sub
|
||||
|
||||
Public Sub GetEquipmentParameter(devtype As String, datastr As String, BasicClasses As DeviceObjectClasses)
|
||||
|
||||
If IsNothing(BasicClasses) Then
|
||||
MsgBox("Base class loading failed!")
|
||||
Return
|
||||
End If
|
||||
g_BasicClasses = BasicClasses
|
||||
g_nodename = devtype
|
||||
GetDevTypeParameter(devtype)
|
||||
|
||||
initTable()
|
||||
|
||||
AddTableRow()
|
||||
ComboBox1.Items.AddRange(Dic_1.ToArray)
|
||||
inittable2(Dic_1)
|
||||
G_input = datastr
|
||||
End Sub
|
||||
|
||||
Public Sub inittable2(li As List(Of String))
|
||||
If IsNothing(li) Then Return
|
||||
Grid1.Rows = li.Count + 1
|
||||
|
||||
Grid1.Cols = 2
|
||||
Grid1.ExtendLastCol = True
|
||||
Grid1.Column(0).Visible = True
|
||||
Grid1.Locked = True
|
||||
Grid1.Cell(0, 1).Text = "Device method name"
|
||||
For index = 0 To li.Count - 1
|
||||
Grid1.Cell(index + 1, 1).Text = li.Item(index)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub setrowdata(datastr As String)
|
||||
If String.IsNullOrEmpty(datastr) Then Return
|
||||
Dim cmdpar() As String = datastr.Split(vbLf)
|
||||
If IsNothing(cmdpar) OrElse cmdpar.Length = 0 Then Return
|
||||
Dim bli As Dictionary(Of String, String)
|
||||
For Each node In cmdpar
|
||||
Dim bufstr() As String = node.Split(",")
|
||||
Dim keystr As String = String.Empty
|
||||
If bufstr.Length > 2 Then
|
||||
keystr = $"{ bufstr(bufstr.Length - 1)}"
|
||||
If ParamDic.ContainsKey(keystr) Then
|
||||
bli = ParamDic.Item(keystr)
|
||||
Dim cvstr As String = String.Empty
|
||||
For Each nodeindex In bufstr
|
||||
If nodeindex.Equals(bufstr(bufstr.Length - 2)) Then
|
||||
Exit For
|
||||
End If
|
||||
cvstr = $"{cvstr}{nodeindex},"
|
||||
Next
|
||||
If cvstr.Length > 0 Then
|
||||
bli.Add(bufstr(bufstr.Length - 2), cvstr)
|
||||
End If
|
||||
|
||||
Else
|
||||
bli = New Dictionary(Of String, String)
|
||||
Dim cvstr As String = String.Empty
|
||||
For Each nodeindex In bufstr
|
||||
If nodeindex.Equals(bufstr(bufstr.Length - 2)) Then
|
||||
Exit For
|
||||
End If
|
||||
cvstr = $"{cvstr}{nodeindex},"
|
||||
Next
|
||||
If cvstr.Length > 0 Then
|
||||
bli.Add(bufstr(bufstr.Length - 2), cvstr)
|
||||
ParamDic.Add(keystr, bli)
|
||||
CmdGrid.AddItem("")
|
||||
CmdGrid.Cell(CmdGrid.Rows - 1, 1).Text = bufstr(bufstr.Length - 2)
|
||||
CmdGrid.Cell(CmdGrid.Rows - 1, 2).Text = bufstr(bufstr.Length - 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
'Dim buf() As String = node.Split(",")
|
||||
|
||||
'For i = 0 To Dic_1.Count - 1
|
||||
' Dim Index As String = Dic_1(i)
|
||||
' If Index.Equals(buf(buf.Length - 1)) Then
|
||||
' ComboBox1.SelectedIndex = i
|
||||
' Exit For
|
||||
' End If
|
||||
'Next
|
||||
|
||||
|
||||
'Dim timeint As Integer = -1
|
||||
'Dim timecint As Integer = -1
|
||||
|
||||
'If Not (Integer.TryParse(buf(0), timeint) And Integer.TryParse(buf(1), timecint)) Then
|
||||
' Return
|
||||
'End If
|
||||
'If Table_Grid1.Rows > 2 Then
|
||||
' If timeint >= 0 OrElse timeint <= 255 Then
|
||||
' Table_Grid1.Cell(1, 2).Text = timeint.ToString
|
||||
' End If
|
||||
' If timecint >= 1 OrElse timecint <= 5 Then
|
||||
' Table_Grid1.Cell(2, 2).Text = FGetDelayUnit(timecint)
|
||||
' End If
|
||||
'End If
|
||||
'Dim parbuf() As String
|
||||
'If Not IsNothing(Dic_2) AndAlso Dic_2.Count > 0 Then
|
||||
' If Table_Grid1.Rows > (Dic_2.Count) Then
|
||||
|
||||
' For i = 0 To Dic_2.Count - 3
|
||||
' Dim li As List(Of String) = Dic_2.Item(Table_Grid1.Cell(i + 3, 1).Text)
|
||||
' For Each strinf In li
|
||||
' parbuf = strinf.Split(" ")
|
||||
' If buf(2 + i).Equals(parbuf(0)) Then
|
||||
' Table_Grid1.Cell(3 + i, 2).Text = strinf
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' Next
|
||||
' End If
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub AddTableRow()
|
||||
' Table_Grid1.AddItem("")
|
||||
'Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = "设备方法"
|
||||
End Sub
|
||||
|
||||
Private Sub GetDevTypeParameter(devtype As String)
|
||||
Dic_1 = New List(Of String)
|
||||
For Each node In g_BasicClasses.DeviceClass
|
||||
If node.Name.ToUpper.Equals(devtype) Then
|
||||
For Each Anode In node.Methods
|
||||
Dic_1.Add(Anode.Name)
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub Table_Grid1_ComboDropDown(Sender As Object, e As Grid.ComboDropDownEventArgs) Handles Table_Grid1.ComboDropDown
|
||||
If e.Row > 0 Then
|
||||
Me.Table_Grid1.ComboBox(e.Col).Items.Clear()
|
||||
Dim liname As String = Table_Grid1.Cell(e.Row, 1).Text
|
||||
Dim li As List(Of String) = Dic_2.Item(liname)
|
||||
Me.Table_Grid1.ComboBox(e.Col).Items.AddRange(li.ToArray)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Sub AddParameterrow()
|
||||
Dim rcon As Integer = Table_Grid1.Rows - 1
|
||||
Dim delete As Integer = 0
|
||||
Dim nodename As String = ComboBox1.Text
|
||||
Dic_2 = New Dictionary(Of String, List(Of String))
|
||||
Dic_2.Clear()
|
||||
For i = 0 To rcon
|
||||
If i > 0 Then
|
||||
Table_Grid1.Row(Table_Grid1.Rows - 1).Delete()
|
||||
End If
|
||||
Next
|
||||
|
||||
Dic_2.Add("Delay time", Dic_3)
|
||||
Table_Grid1.AddItem("")
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = "Delay time"
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 2).Text = "0"
|
||||
Dic_2.Add("Delay unit", Dic_4)
|
||||
Dic_2.Add("Volume value", Dic_5)
|
||||
|
||||
Table_Grid1.AddItem("")
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = "Delay unit"
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 2).Text = "s"
|
||||
For Each node In g_BasicClasses.DeviceClass
|
||||
If node.Name.ToUpper.Equals(g_nodename) Then
|
||||
For Each Anode In node.Methods
|
||||
If Anode.Name.Equals(nodename) Then
|
||||
|
||||
For Each index In Anode.Params
|
||||
Dim li As New List(Of String)
|
||||
If index.Name.Equals("NULL") Then
|
||||
li.Add(0)
|
||||
|
||||
Else
|
||||
If index.DataType.Equals("List") Then
|
||||
Dim tbuf() As String = index.DataRange.Split(",")
|
||||
li.AddRange(tbuf)
|
||||
li.Remove(tbuf(0))
|
||||
li.Insert(0, tbuf(0))
|
||||
|
||||
ElseIf index.DataType.Equals("Integer") Then
|
||||
Dim buf() As String = index.DataRange.Split(",")
|
||||
Dim startint As Integer = 0
|
||||
Dim endint As Integer = 1
|
||||
Integer.TryParse(buf(0), startint)
|
||||
Integer.TryParse(buf(1), endint)
|
||||
'li.Add(startint)
|
||||
For i = startint To endint
|
||||
li.Add(i)
|
||||
Next
|
||||
li.Remove(index.DataDefault)
|
||||
li.Insert(0, index.DataDefault)
|
||||
End If
|
||||
End If
|
||||
If Not Dic_2.ContainsKey(index.Name) Then
|
||||
Dic_2.Add(index.Name, li)
|
||||
End If
|
||||
Table_Grid1.AddItem("")
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = index.Name
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 2).Text = index.DataDefault
|
||||
Next
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
'Console.WriteLine(g_nodename)
|
||||
'If g_nodename.ToUpper.Contains("MUSIC") Then
|
||||
' Dim li As New List(Of String)
|
||||
' For i = 0 To 100
|
||||
' li.Add(i)
|
||||
' Next
|
||||
' Dic_2.Add("音量", li)
|
||||
' Table_Grid1.AddItem("")
|
||||
' Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = "音量"
|
||||
' Table_Grid1.Cell(Table_Grid1.Rows - 1, 2).Text = "0"
|
||||
'End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub initTable()
|
||||
|
||||
Table_Grid1.Rows = 1
|
||||
Table_Grid1.Cols = 3
|
||||
Table_Grid1.ExtendLastCol = True
|
||||
Table_Grid1.DrawMode = DrawModeEnum.OwnerDraw
|
||||
Table_Grid1.Cell(0, 1).Text = "Stats"
|
||||
Table_Grid1.Cell(0, 2).Text = "Stats value"
|
||||
' Table_Grid1.Cell(0, 3).Text = "设备端口"
|
||||
Table_Grid1.Column(1).Width = 130
|
||||
Table_Grid1.Column(2).Width = 100
|
||||
Table_Grid1.Column(1).Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
With Table_Grid1.Column(2)
|
||||
.Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
.CellType = CellTypeEnum.ComboBox
|
||||
End With
|
||||
Table_Grid1.Column(1).Locked = True
|
||||
'Table_Grid1.ComboBox(2).Locked = True
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Function GetDelayUnit(str As String) As String
|
||||
Dim result As Integer
|
||||
Select Case str
|
||||
Case "ms"
|
||||
result = 1
|
||||
Case "s"
|
||||
result = 2
|
||||
Case "m"
|
||||
result = 3
|
||||
Case "H"
|
||||
result = 4
|
||||
Case "Day"
|
||||
result = 5
|
||||
Case Else
|
||||
result = 1
|
||||
End Select
|
||||
|
||||
Return result.ToString
|
||||
End Function
|
||||
|
||||
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
|
||||
AddParameterrow()
|
||||
Select Case g_nodename
|
||||
Case "DIMMING", "RELAY", "Temp", "PB_STRIP_DEVICE", "PB_LINE_CONTROL"
|
||||
'For i = 2 To Grid1.Rows - 1
|
||||
' Grid1.Row(Grid1.Rows - 1).Delete()
|
||||
'Next
|
||||
'Select Case ComboBox1.Text
|
||||
' Case "循环调光", "开关机功能" ', "控制灯光",
|
||||
' If Table_Grid1.Rows > 3 Then
|
||||
' Table_Grid1.Row(3).Visible = False
|
||||
' End If
|
||||
|
||||
'End Select
|
||||
Case "MUSIC"
|
||||
Dim ExecutionModebuf() = g_ExecutionMode.Split(",")
|
||||
If ExecutionModebuf.Length > 2 Then
|
||||
Dim row As Integer
|
||||
Dim roC As Integer = Grid1.Rows - 1
|
||||
Dim strE As String
|
||||
For i = 0 To roC
|
||||
row = roC - i
|
||||
strE = Grid1.Cell(row, 1).Text
|
||||
Console.WriteLine(strE)
|
||||
Select Case strE
|
||||
Case "设置播放音量", "设置全局百分比", "设置开关机"
|
||||
Grid1.Row(row).Delete()
|
||||
End Select
|
||||
'If g_DevNodename.Equals("HOSTSERVICE") AndAlso ExecutionModebuf(1).Equals("1") Then
|
||||
' If strE.Contains("欢迎词") OrElse strE.Contains("提示音") Then
|
||||
' Continue For
|
||||
' Else
|
||||
' If row >= Grid1.Rows Then
|
||||
' Continue For
|
||||
' End If
|
||||
' Grid1.Row(row).Delete()
|
||||
' End If
|
||||
|
||||
'Else
|
||||
' Select Case ExecutionModebuf(1)
|
||||
' Case "6"
|
||||
' If strE.Contains("助眠") OrElse strE.Contains("提示音") Then
|
||||
' Continue For
|
||||
' Else
|
||||
' If row >= Grid1.Rows Then
|
||||
' Continue For
|
||||
' End If
|
||||
' Grid1.Row(row).Delete()
|
||||
' End If
|
||||
' Case Else
|
||||
' If strE.Contains("助眠") Then
|
||||
' Grid1.Row(row).Delete()
|
||||
' End If
|
||||
' If (KeyName.Equals("插卡") OrElse KeyName.Equals("拔卡")) AndAlso strE.Contains("播放门铃") Then
|
||||
' Grid1.Row(row).Delete()
|
||||
' End If
|
||||
' End Select
|
||||
|
||||
'End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Select Case ComboBox1.Text
|
||||
Case "播放提示音", "播放助眠", "播放助眠冥想", "播放助眠海浪", "播放助眠森林"
|
||||
Table_Grid1.Row(4).Visible = False
|
||||
'Table_Grid1.Row(3).Visible = False
|
||||
Case "设置播放状态", "设置播放状态1", "按键控制播放音量"
|
||||
Table_Grid1.Row(3).Visible = False
|
||||
Case "播放音乐"
|
||||
Table_Grid1.Row(3).Visible = False
|
||||
Case "设置全局百分比"
|
||||
Case "设置开关机"
|
||||
Case "播放门铃", "播放欢迎词"
|
||||
Table_Grid1.Row(4).Visible = False
|
||||
Table_Grid1.Row(3).Visible = False
|
||||
Case "小宝功能设置"
|
||||
Table_Grid1.Row(4).Visible = False
|
||||
Table_Grid1.Row(5).Visible = False
|
||||
Case "小宝音量设置"
|
||||
Table_Grid1.Row(4).Visible = False
|
||||
End Select
|
||||
|
||||
End If
|
||||
Case "485MUSIC"
|
||||
Dim row As Integer
|
||||
Dim roC As Integer = Grid1.Rows - 1
|
||||
Dim strE As String
|
||||
If Grid1.Rows > 2 Then
|
||||
For i = 0 To roC
|
||||
row = roC - i
|
||||
strE = Grid1.Cell(row, 1).Text
|
||||
If Not strE.Contains("华尔思音乐控制") Then
|
||||
Grid1.Row(row).Delete()
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
Case "485FRESHAIR"
|
||||
Dim strE As String = String.Empty
|
||||
Dim Estrbuf As New List(Of String)
|
||||
Estrbuf.Add("3 风速高速")
|
||||
Estrbuf.Add("2 风速中速")
|
||||
Estrbuf.Add("1 风速低速")
|
||||
Grid1.Row(Grid1.Rows - 1).Delete()
|
||||
strE = Grid1.Cell(1, 1).Text
|
||||
If strE.Equals("开关机功能") Then
|
||||
Table_Grid1.Row(3).Visible = False
|
||||
Table_Grid1.AddItem("")
|
||||
Dic_2.Add("设置风速", Estrbuf)
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = "设置风速"
|
||||
|
||||
End If
|
||||
|
||||
Case "485FloorHeat".ToUpper
|
||||
Dim strE As String = String.Empty
|
||||
Dim Estrbuf As New List(Of String)
|
||||
For i = 16 To 32
|
||||
Estrbuf.Add(i)
|
||||
Next
|
||||
Grid1.Row(Grid1.Rows - 1).Delete()
|
||||
strE = Grid1.Cell(1, 1).Text
|
||||
If strE.Equals("开关机功能") Then
|
||||
Table_Grid1.Row(3).Visible = False
|
||||
|
||||
Table_Grid1.AddItem("")
|
||||
Dic_2.Add("设置温度", Estrbuf)
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = "设置温度"
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
|
||||
Select Case ComboBox1.Text
|
||||
Case "控制温控器"
|
||||
If Table_Grid1.Rows > 6 Then
|
||||
Table_Grid1.Row(6).Visible = False
|
||||
End If
|
||||
End Select
|
||||
End Sub
|
||||
Public oldrow As Integer = 0
|
||||
Private Sub Grid1_Click(Sender As Object, e As EventArgs) Handles Grid1.Click
|
||||
If Grid1.ActiveCell.Row > 0 Then
|
||||
Grid1.Cell(oldrow, 1).BackColor = Color.White
|
||||
For Index = 0 To ComboBox1.Items.Count - 1
|
||||
If ComboBox1.Items(Index).ToString.Equals(Grid1.Cell(Grid1.ActiveCell.Row, 1).Text) Then
|
||||
ComboBox1.SelectedIndex = Index
|
||||
Grid1.Cell(Grid1.ActiveCell.Row, 1).BackColor = Color.LightBlue
|
||||
oldrow = Grid1.ActiveCell.Row
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Public IsCellChange As Boolean
|
||||
Private Sub Table_Grid1_CellChange(Sender As Object, e As Grid.CellChangeEventArgs) Handles Table_Grid1.CellChange
|
||||
|
||||
|
||||
If e.Row > 0 AndAlso IsCellChange = False Then
|
||||
|
||||
Dim liname As String = Table_Grid1.Cell(e.Row, 1).Text
|
||||
Dim lival As String = Table_Grid1.Cell(e.Row, 2).Text
|
||||
Dim li As List(Of String) = Dic_2.Item(liname)
|
||||
|
||||
For Each index In li
|
||||
If index.Equals(lival) Then
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
|
||||
Table_Grid1.Cell(e.Row, 2).Text = li(0)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function FGetDelayUnit(str As String) As String
|
||||
Dim result As String = String.Empty
|
||||
Select Case str
|
||||
Case "1"
|
||||
result = "毫秒"
|
||||
Case "2"
|
||||
result = "秒"
|
||||
Case "3"
|
||||
result = "分钟"
|
||||
Case "4"
|
||||
result = "小时"
|
||||
Case "5"
|
||||
result = "天"
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
|
||||
Return result.ToString
|
||||
End Function
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
If Table_Grid1.Rows > 0 Then
|
||||
Dim buf() As String
|
||||
Dim Result As String = String.Empty
|
||||
Dim displystr As String = String.Empty
|
||||
Dim Resli As New Dictionary(Of String, String)
|
||||
If Not (Table_Grid1.Rows > 1) Then
|
||||
MsgBox("未选择设备方法!!")
|
||||
Return
|
||||
End If
|
||||
For i = 1 To Table_Grid1.Rows - 1
|
||||
If String.IsNullOrEmpty(Table_Grid1.Cell(i, 2).Text) Then
|
||||
MsgBox($"第{i}行,方法参数为空!!")
|
||||
Return
|
||||
End If
|
||||
If Table_Grid1.Row(i).Visible = True Then
|
||||
displystr = $"{displystr}{Table_Grid1.Cell(i, 2).Text}*"
|
||||
End If
|
||||
|
||||
Select Case g_nodename
|
||||
Case "485FRESHAIR"
|
||||
If i = Table_Grid1.Rows - 1 Then
|
||||
Dim ti As String = Table_Grid1.Cell(1, 2).Text
|
||||
Dim tid As String = Table_Grid1.Cell(2, 2).Text
|
||||
buf = tid.Split(" ")
|
||||
Dim tidv As String = Table_Grid1.Cell(i, 2).Text
|
||||
Dim bufv = tidv.Split(" ")
|
||||
|
||||
Dim addinten = $"{ti},{GetDelayUnit(buf(0))},4,{bufv(0)},"
|
||||
|
||||
Resli.Add("设置风速功能", addinten)
|
||||
Continue For
|
||||
End If
|
||||
Case "485FloorHeat".ToUpper
|
||||
If i = Table_Grid1.Rows - 1 Then
|
||||
Dim ti As String = Table_Grid1.Cell(1, 2).Text
|
||||
Dim tid As String = Table_Grid1.Cell(2, 2).Text
|
||||
buf = tid.Split(" ")
|
||||
Dim tidv As String = Table_Grid1.Cell(i, 2).Text
|
||||
Dim bufv = tidv.Split(" ")
|
||||
Dim addinten = $"{ti},{GetDelayUnit(buf(0))},3,{bufv(0)},"
|
||||
Resli.Add("设置温度功能", addinten)
|
||||
Continue For
|
||||
End If
|
||||
End Select
|
||||
|
||||
|
||||
buf = Table_Grid1.Cell(i, 2).Text.Split(" ")
|
||||
|
||||
|
||||
If i = 2 Then
|
||||
Result = $"{Result}{GetDelayUnit(buf(0))},"
|
||||
Else
|
||||
Result = $"{Result}{buf(0)},"
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Resli.Add(ComboBox1.Text, Result)
|
||||
If Not String.IsNullOrEmpty(displystr) Then
|
||||
displystr = displystr.Substring(0, displystr.Length - 1)
|
||||
End If
|
||||
If ParamDic.ContainsKey(displystr.Trim) Then
|
||||
MsgBox("已添加相同指令!请勿重复添加!")
|
||||
Return
|
||||
Else
|
||||
ParamDic.Add(displystr.Trim, Resli)
|
||||
End If
|
||||
|
||||
If Resli.Count > 0 Then
|
||||
'Result = $"{G_Result}{ComboBox1.Text }"
|
||||
' For Each index In Resli
|
||||
CmdGrid.AddItem("")
|
||||
CmdGrid.Cell(CmdGrid.Rows - 1, 1).Text = ComboBox1.Text
|
||||
|
||||
CmdGrid.Cell(CmdGrid.Rows - 1, 2).Text = displystr.Trim
|
||||
'CmdGrid.Cell(CmdGrid.Rows - 1, 2).Text = index.Value.Substring(0, index.Value.Length - 1)
|
||||
' Next
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
If CmdGrid.ActiveCell.Row > 0 Then
|
||||
Dim gparstr = CmdGrid.Cell(CmdGrid.ActiveCell.Row, 2).Text
|
||||
If String.IsNullOrEmpty(gparstr) OrElse IsNothing(ParamDic) OrElse Not ParamDic.ContainsKey(gparstr) Then
|
||||
Else
|
||||
ParamDic.Remove(gparstr)
|
||||
End If
|
||||
|
||||
CmdGrid.Row(CmdGrid.ActiveCell.Row).Delete()
|
||||
End If
|
||||
End Sub
|
||||
Public CmdGridoldrow As Integer = 0
|
||||
Private Sub CmdGrid_Click(Sender As Object, e As EventArgs) Handles CmdGrid.Click
|
||||
If CmdGrid.ActiveCell.Row > 0 AndAlso CmdGridoldrow < CmdGrid.ActiveCell.Row Then
|
||||
CmdGrid.Range(CmdGridoldrow, 0, CmdGridoldrow, 2).BackColor = Color.White
|
||||
CmdGrid.Range(CmdGrid.ActiveCell.Row, 0, CmdGrid.ActiveCell.Row, 2).BackColor = Color.LightBlue
|
||||
CmdGridoldrow = CmdGrid.ActiveCell.Row
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
|
||||
Dim b As Boolean
|
||||
If Button4.Text.Equals("显示") Then
|
||||
Button4.Text = "隐藏"
|
||||
b = True
|
||||
Else
|
||||
Button4.Text = "显示"
|
||||
If Grid1.Rows > 1 Then
|
||||
Grid1.Cell(1, 1).SetFocus()
|
||||
Grid1_Click(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
b = False
|
||||
End If
|
||||
For i = 2 To Grid1.Rows - 1
|
||||
Grid1.Row(i).Visible = b
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Table_Grid1_OwnerDrawCell(Sender As Object, e As Grid.OwnerDrawCellEventArgs) Handles Table_Grid1.OwnerDrawCell
|
||||
If e.Row < 1 OrElse e.Col < 1 Then Return
|
||||
|
||||
If e.Col = 2 Then
|
||||
|
||||
Try
|
||||
Dim pen As New System.Drawing.Pen(Color.CornflowerBlue, 1)
|
||||
pen.DashStyle = Drawing2D.DashStyle.Solid
|
||||
|
||||
|
||||
Dim Trect As New Rectangle(e.Bounds.Right - 15, CInt(e.Bounds.Top + ((e.Bounds.Height - 9) / 2)), 8, 8)
|
||||
Dim rect As New Rectangle(e.Bounds.Right - 18, CInt(e.Bounds.Top), 17, (e.Bounds.Height))
|
||||
e.Graphics.FillRectangle(Brushes.LightGray, rect)
|
||||
e.Graphics.DrawRectangle(Pens.LightGray, rect)
|
||||
|
||||
e.Graphics.DrawLine(Pens.Gray, Trect.Left, Trect.Top + 4, Trect.Left + 4, Trect.Bottom)
|
||||
e.Graphics.DrawLine(Pens.Gray, Trect.Left + 4, Trect.Bottom, Trect.Right, Trect.Top + 4)
|
||||
|
||||
e.Graphics.DrawLine(Pens.Gray, Trect.Left, Trect.Top + 3, Trect.Left + 4, Trect.Bottom - 1)
|
||||
e.Graphics.DrawLine(Pens.Gray, Trect.Left + 4, Trect.Bottom - 1, Trect.Right, Trect.Top + 3)
|
||||
|
||||
|
||||
' '文字
|
||||
Dim bColor As New SolidBrush(Table_Grid1.Cell(e.Row, e.Col).ForeColor)
|
||||
bColor.Color = Color.Black
|
||||
With Table_Grid1.Cell(e.Row, e.Col)
|
||||
|
||||
Dim ft = .Font
|
||||
e.Graphics.DrawString(.Text, ft, bColor, e.Bounds.Left, e.Bounds.Top + (e.Bounds.Height - e.Graphics.MeasureString(.Text, .Font).Height) / 2 + 1)
|
||||
|
||||
End With
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
e.Handled = True
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Table_Grid1_CellChanging(Sender As Object, e As CellChangingEventArgs) Handles Table_Grid1.CellChanging
|
||||
If ComboBox1.Text.Equals("播放提示音") AndAlso Table_Grid1.Rows > 5 Then
|
||||
|
||||
If (Table_Grid1.Cell(3, 2).Text.Equals("2 播放(提示音)") OrElse Table_Grid1.Cell(3, 2).Text.Equals("1 静音(提示音)")) Then
|
||||
Table_Grid1.Row(5).Visible = False
|
||||
Else
|
||||
Table_Grid1.Row(5).Visible = True
|
||||
End If
|
||||
IsCellChange = True
|
||||
If e.Row = 3 Then
|
||||
|
||||
If (Table_Grid1.Cell(3, 2).Text.Equals("5 音量加") OrElse Table_Grid1.Cell(3, 2).Text.Equals("6 音量减")) Then
|
||||
Table_Grid1.Cell(5, 2).Text = Dic_2.Item("音量值")(0)
|
||||
Table_Grid1.Cell(5, 1).Text = "音量值"
|
||||
|
||||
Else
|
||||
Table_Grid1.Cell(5, 2).Text = Dic_2.Item("播放文件序号").Item(0)
|
||||
Table_Grid1.Cell(5, 1).Text = "播放文件序号"
|
||||
End If
|
||||
End If
|
||||
IsCellChange = False
|
||||
|
||||
ElseIf ComboBox1.Text.Equals("播放音乐") AndAlso Table_Grid1.Rows > 5 AndAlso IsCellChange = False Then
|
||||
|
||||
If (Table_Grid1.Cell(4, 2).Text.Equals("5 音量加") OrElse Table_Grid1.Cell(4, 2).Text.Equals("6 音量减")) Then
|
||||
Table_Grid1.Row(5).Visible = True
|
||||
Else
|
||||
Table_Grid1.Row(5).Visible = False
|
||||
End If
|
||||
|
||||
ElseIf ComboBox1.Text.Equals("华尔思音乐控制") AndAlso Table_Grid1.Rows > 6 Then
|
||||
If Table_Grid1.Cell(3, 2).Text.Equals("2 关机") Then
|
||||
For i As Integer = 4 To Table_Grid1.Rows - 1
|
||||
Table_Grid1.Row(i).Visible = False
|
||||
Next
|
||||
Else
|
||||
For i As Integer = 4 To Table_Grid1.Rows - 2
|
||||
Table_Grid1.Row(i).Visible = True
|
||||
Next
|
||||
If Table_Grid1.Cell(5, 2).Text.Contains("音量") Then
|
||||
Table_Grid1.Row(6).Visible = True
|
||||
Else
|
||||
Table_Grid1.Row(6).Visible = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Table_Grid1_Click(Sender As Object, e As EventArgs) Handles Table_Grid1.Click
|
||||
|
||||
Try
|
||||
Dim point As Point = Table_Grid1.PointToClient(System.Windows.Forms.Cursor.Position)
|
||||
|
||||
Dim cel As Cell = Table_Grid1.HitTest(point.X, point.Y)
|
||||
|
||||
If cel Is Nothing Then Return
|
||||
|
||||
|
||||
If cel.Row < 1 OrElse cel.Col <> 2 Then Return
|
||||
|
||||
|
||||
|
||||
Dim rect As New Rectangle(cel.Bounds.Right - 18, CInt(cel.Bounds.Top), 17, (cel.Bounds.Height))
|
||||
'Dim rect As New Rectangle(cel.Bounds.Left + 2, cel.Bounds.Top + ((cel.Bounds.Height - 9) \ 2), 8, 8)
|
||||
If rect.Contains(point) = False Then Return
|
||||
Table_Grid1.Cell(cel.Row, cel.Col).SetFocus()
|
||||
Table_Grid1.ComboBox(cel.Col).DropDown()
|
||||
|
||||
Catch ex As Exception
|
||||
Console.WriteLine($"Grid_Click Error:{ex.Message}")
|
||||
End Try
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function CheckDataIsOk(devtype As String, datastr As String, BasicClasses As DeviceObjectClasses) As Boolean
|
||||
If String.IsNullOrEmpty(datastr) Then Return True
|
||||
Dim cmdpar() As String = datastr.Split(vbLf)
|
||||
|
||||
For Each FPnode In cmdpar
|
||||
|
||||
Dim buf() As String = FPnode.Split(",")
|
||||
Dim timeint As Integer = -1
|
||||
Dim timecint As Integer = -1
|
||||
If buf.Length < 2 Then Return False
|
||||
If Not (Integer.TryParse(buf(0), timeint) And Integer.TryParse(buf(1), timecint)) Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
If timeint < 0 OrElse timeint > 255 Then
|
||||
Return False
|
||||
End If
|
||||
If timecint < 1 OrElse timecint > 5 Then
|
||||
Return False
|
||||
End If
|
||||
Dim namebuf() As String
|
||||
Dim Anamebuf() As String
|
||||
Dim isok As Boolean = False
|
||||
For Each node In BasicClasses.DeviceClass
|
||||
If node.Name.ToUpper.Equals(devtype) Then
|
||||
For Each Anode In node.Methods
|
||||
If Anode.Name.Equals(buf(buf.Length - 2).Trim) Then
|
||||
If (buf.Length - 4) = Anode.Params.Count Then
|
||||
For inex = 0 To Anode.Params.Count - 1
|
||||
Dim Index As DeviceChildNodeMethodParam = Anode.Params(inex)
|
||||
Dim li As New List(Of String)
|
||||
isok = False
|
||||
If Index.Name.Equals("无") And buf(2 + inex) = 0 Then
|
||||
Continue For
|
||||
End If
|
||||
If Index.DataType.Equals("List") Then
|
||||
namebuf = Index.DataRange.Split(",")
|
||||
For Each cindex In namebuf
|
||||
Anamebuf = cindex.Split(" ")
|
||||
If Anamebuf(0).Equals(buf(2 + inex)) Then
|
||||
isok = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If isok Then
|
||||
Continue For
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
ElseIf Index.DataType.Equals("Integer") Then
|
||||
Dim parbuf() As String = Index.DataRange.Split(",")
|
||||
Dim startint As Integer = 0
|
||||
Dim endint As Integer = 1
|
||||
Dim parint As Integer = -1
|
||||
Integer.TryParse(parbuf(0), startint)
|
||||
Integer.TryParse(parbuf(1), endint)
|
||||
Integer.TryParse(buf(2 + inex), parint)
|
||||
If parint >= startint AndAlso parint <= endint Then
|
||||
Continue For
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End If
|
||||
|
||||
Next
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub initCmdGrid()
|
||||
With CmdGrid
|
||||
.NewFile()
|
||||
.Cols = 3
|
||||
.Rows = 1
|
||||
.ExtendLastCol = True
|
||||
.Cell(0, 1).Text = "Device method name"
|
||||
' .Cell(0, 2).Text = "方法参数值"
|
||||
.Cell(0, 2).Text = "Parameter description"
|
||||
'Table_Grid1.Cell(0, 3).Text = "设备端口"
|
||||
.Column(1).Width = 130
|
||||
.Column(2).Width = 100
|
||||
.Column(1).Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
.Column(2).Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
.Column(1).Locked = True
|
||||
.Column(2).Locked = True
|
||||
.SelectionMode = SelectionModeEnum.ByCell
|
||||
End With
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
124
BLV_Studio/Test/GridTest/AddDeviceForm/NormalDev.Designer.vb
generated
Normal file
124
BLV_Studio/Test/GridTest/AddDeviceForm/NormalDev.Designer.vb
generated
Normal file
@@ -0,0 +1,124 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class NormalDev
|
||||
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.Label6 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.Table_Grid1 = New FlexCell.Grid()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Label6.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label6.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(105, 45)
|
||||
Me.Label6.TabIndex = 11
|
||||
Me.Label6.Text = "背光灯:"
|
||||
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.Button1.Font = New System.Drawing.Font("宋体", 15.0!)
|
||||
Me.Button1.Location = New System.Drawing.Point(646, 0)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(154, 45)
|
||||
Me.Button1.TabIndex = 12
|
||||
Me.Button1.Text = "确定"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.ComboBox1)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label6)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Button1)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.Table_Grid1)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(800, 450)
|
||||
Me.SplitContainer1.SplitterDistance = 45
|
||||
Me.SplitContainer1.TabIndex = 13
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 21.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(111, 5)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(85, 37)
|
||||
Me.ComboBox1.TabIndex = 13
|
||||
'
|
||||
'Table_Grid1
|
||||
'
|
||||
Me.Table_Grid1.CheckedImage = Nothing
|
||||
Me.Table_Grid1.Cols = 3
|
||||
Me.Table_Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Table_Grid1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Table_Grid1.ExtendLastCol = True
|
||||
Me.Table_Grid1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Table_Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Table_Grid1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Table_Grid1.Name = "Table_Grid1"
|
||||
Me.Table_Grid1.Size = New System.Drawing.Size(800, 401)
|
||||
Me.Table_Grid1.TabIndex = 19
|
||||
Me.Table_Grid1.UncheckedImage = Nothing
|
||||
'
|
||||
'NormalDev
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||
Me.Controls.Add(Me.SplitContainer1)
|
||||
Me.Name = "NormalDev"
|
||||
Me.Text = "NormalDev"
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents Label6 As Label
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents ComboBox1 As ComboBox
|
||||
Friend WithEvents Table_Grid1 As FlexCell.Grid
|
||||
End Class
|
||||
120
BLV_Studio/Test/GridTest/AddDeviceForm/NormalDev.resx
Normal file
120
BLV_Studio/Test/GridTest/AddDeviceForm/NormalDev.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>
|
||||
192
BLV_Studio/Test/GridTest/AddDeviceForm/NormalDev.vb
Normal file
192
BLV_Studio/Test/GridTest/AddDeviceForm/NormalDev.vb
Normal file
@@ -0,0 +1,192 @@
|
||||
Imports System.ComponentModel
|
||||
Imports FlexCell
|
||||
Public Class NormalDev
|
||||
|
||||
Enum Tcolname
|
||||
<Description("输入序号")>
|
||||
输入序号 = 0
|
||||
|
||||
<Description("设备别名")>
|
||||
按键别名
|
||||
<Description("背光")>
|
||||
按键反馈灯
|
||||
|
||||
max
|
||||
End Enum
|
||||
|
||||
Public ResulDic As Dictionary(Of String, String)
|
||||
Public Resultmodel As DeviceModel
|
||||
Public g_Devicemodel As Dictionary(Of String, DeviceModel)
|
||||
Public isok As Boolean = False
|
||||
Private G_father As AddPeripherals
|
||||
Private Sub NormalDev_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub ShowForm(parentControl As Control, father As AddPeripherals)
|
||||
FormBorderStyle = FormBorderStyle.None
|
||||
TopLevel = False
|
||||
Dock = DockStyle.Fill
|
||||
Parent = parentControl
|
||||
G_father = father
|
||||
'Station_Changed()
|
||||
Show()
|
||||
End Sub
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
|
||||
'ResulDic = New Dictionary(Of String, String)
|
||||
|
||||
'If IsNothing(Resultmodel) Then
|
||||
' MsgBox("添加设备失败,未选中设备!")
|
||||
' Return
|
||||
'End If
|
||||
|
||||
'If IsNothing(g_Devicemodel) Then
|
||||
' MsgBox("添加设备失败,未添加中主机模型!")
|
||||
' Return
|
||||
'End If
|
||||
|
||||
'If String.IsNullOrEmpty(TextBox1.Text) OrElse String.IsNullOrEmpty(TextBox2.Text) Then
|
||||
' MsgBox("添加设备失败,设备别名或设备地址为空!")
|
||||
' Return
|
||||
'End If
|
||||
|
||||
'Dim olddevname As String = Resultmodel.Name
|
||||
'Dim newdevname As String = $"{TextBox1.Text.Trim }{vbLf}设备端口:{Resultmodel.Desc.DevInterface }{vbLf}设备地址:{TextBox2.Text.Trim }"
|
||||
''存在且原名和旧名不一样 则为新设备
|
||||
'If g_Devicemodel.ContainsKey(newdevname) AndAlso Not (newdevname.Equals(olddevname)) Then
|
||||
' MsgBox("添加设备失败,已存在相同别名相同设备地址的设备!!")
|
||||
' Return
|
||||
'Else
|
||||
|
||||
' If isok And g_Devicemodel.ContainsKey(olddevname) Then
|
||||
' g_Devicemodel.Remove(olddevname)
|
||||
' End If
|
||||
' SetDevModeAindex(Resultmodel, "拨码地址", TextBox2.Text.Trim)
|
||||
' Resultmodel.Name = newdevname
|
||||
' g_Devicemodel.Add(newdevname, Resultmodel)
|
||||
|
||||
'End If
|
||||
|
||||
'For i = 1 To Table_Grid1.Rows - 1
|
||||
' ResulDic.Add(Table_Grid1.Cell(i, Tcolname.输入序号).Text.Trim, Table_Grid1.Cell(i, Tcolname.按键反馈灯).Text.Trim)
|
||||
'Next
|
||||
|
||||
G_father.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
G_father.Close()
|
||||
Return
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub initTable()
|
||||
|
||||
Table_Grid1.Rows = 1
|
||||
Table_Grid1.Cols = Tcolname.max
|
||||
Table_Grid1.ExtendLastCol = True
|
||||
For i = 0 To Tcolname.max - 1
|
||||
Table_Grid1.Cell(0, i).Text = [Enum].GetName(GetType(Tcolname), i)
|
||||
Select Case i
|
||||
Case Tcolname.输入序号
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 50
|
||||
'.Visible = True
|
||||
.Locked = True
|
||||
End With
|
||||
|
||||
Case Tcolname.按键别名
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 350
|
||||
.Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
|
||||
End With
|
||||
Case Tcolname.按键反馈灯
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 100
|
||||
.Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
'.Locked = True
|
||||
.CellType = CellTypeEnum.ComboBox
|
||||
End With
|
||||
Table_Grid1.ComboBox(i).Locked = True
|
||||
Case Else
|
||||
Exit For
|
||||
End Select
|
||||
|
||||
Next
|
||||
|
||||
AddGrid1RowDragDrop()
|
||||
End Sub
|
||||
Private Do_li As List(Of String)
|
||||
Private Sub AddGrid1RowDragDrop()
|
||||
Do_li = New List(Of String)
|
||||
If Not IsNothing(Resultmodel) Then
|
||||
For Each ModuleFre In Resultmodel.Nodes
|
||||
|
||||
If ModuleFre.Name.Equals("Dimming") Then
|
||||
|
||||
ElseIf ModuleFre.Name.Equals("RELAY") Then
|
||||
|
||||
ElseIf ModuleFre.Name.Equals("DI") Then
|
||||
For Each index In ModuleFre.Nodes
|
||||
Table_Grid1.AddItem("")
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 0).Text = index.LoopAddr
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = index.DefaultAliasName
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 2).Text = index.LoopAddr
|
||||
Next
|
||||
|
||||
ElseIf ModuleFre.Name.Equals("MUSIC") Then
|
||||
|
||||
ElseIf ModuleFre.Name.Equals("DO") Then
|
||||
For Each index In ModuleFre.Nodes
|
||||
Do_li.Add(index.LoopAddr)
|
||||
Next
|
||||
ComboBox1.Items.AddRange(Do_li.ToArray)
|
||||
ComboBox1.SelectedIndex = ComboBox1.Items.Count - 1
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Table_Grid1_ComboDropDown(Sender As Object, e As Grid.ComboDropDownEventArgs) Handles Table_Grid1.ComboDropDown
|
||||
|
||||
Table_Grid1.ComboBox(Tcolname.按键反馈灯).Items.Clear()
|
||||
If IsNothing(Do_li) Then Return
|
||||
|
||||
Table_Grid1.ComboBox(Tcolname.按键反馈灯).Items.AddRange(Do_li.ToArray)
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Table_Grid1_CellChange(Sender As Object, e As Grid.CellChangeEventArgs) Handles Table_Grid1.CellChange
|
||||
If e.Row > 0 Then
|
||||
Select Case e.Col
|
||||
Case Tcolname.按键别名
|
||||
Dim LoopAddr As String = Table_Grid1.Cell(e.Row, Tcolname.输入序号).Text.Trim
|
||||
For Each ModuleFre In Resultmodel.Nodes
|
||||
If ModuleFre.Interface.Equals("DI") Then
|
||||
For Each index In ModuleFre.Nodes
|
||||
If LoopAddr.Equals(index.LoopAddr) Then
|
||||
index.DefaultAliasName = Table_Grid1.Cell(e.Row, Tcolname.按键别名).Text.Trim
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
Case Tcolname.按键反馈灯
|
||||
Dim LoopAddr As String = Table_Grid1.Cell(e.Row, Tcolname.按键反馈灯).Text.Trim
|
||||
For Each ModuleFre In Resultmodel.Nodes
|
||||
If ModuleFre.Interface.Equals("DO") Then
|
||||
For Each index In ModuleFre.Nodes
|
||||
If LoopAddr.Equals(index.LoopAddr) Then
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
MsgBox("背光序号不存在!!将恢复默认调光序号!")
|
||||
Table_Grid1.Cell(e.Row, Tcolname.按键反馈灯).Text = Table_Grid1.Cell(e.Row, Tcolname.输入序号).Text
|
||||
End If
|
||||
Next
|
||||
End Select
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
648
BLV_Studio/Test/GridTest/AddPeripherals.Designer.vb
generated
Normal file
648
BLV_Studio/Test/GridTest/AddPeripherals.Designer.vb
generated
Normal file
@@ -0,0 +1,648 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class AddPeripherals
|
||||
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.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.SplitContainer3 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.CheckBox6 = New System.Windows.Forms.CheckBox()
|
||||
Me.FdevPortText = New System.Windows.Forms.ComboBox()
|
||||
Me.FdevtypeCom = New System.Windows.Forms.ComboBox()
|
||||
Me.FdevPortCom = New System.Windows.Forms.ComboBox()
|
||||
Me.FdevPort = New System.Windows.Forms.Label()
|
||||
Me.Fdevtype = New System.Windows.Forms.Label()
|
||||
Me.FdevAddr = New System.Windows.Forms.Label()
|
||||
Me.CheckBox5 = New System.Windows.Forms.CheckBox()
|
||||
Me.CheckBox4 = New System.Windows.Forms.CheckBox()
|
||||
Me.Label8 = New System.Windows.Forms.Label()
|
||||
Me.CheckBox3 = New System.Windows.Forms.CheckBox()
|
||||
Me.CheckBox2 = New System.Windows.Forms.CheckBox()
|
||||
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
|
||||
Me.Label7 = New System.Windows.Forms.Label()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.TextBox2 = New System.Windows.Forms.TextBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Cob_FilePath = New System.Windows.Forms.ComboBox()
|
||||
Me.Cob_DirPath = New System.Windows.Forms.ComboBox()
|
||||
Me.SplitContainer4 = New System.Windows.Forms.SplitContainer()
|
||||
Me.SplitContainer5 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Table_Grid1 = New FlexCell.Grid()
|
||||
Me.Grid1 = New FlexCell.Grid()
|
||||
Me.Temp_Grid = New FlexCell.Grid()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.TextBox3 = New System.Windows.Forms.TextBox()
|
||||
Me.Label9 = New System.Windows.Forms.Label()
|
||||
Me.SplitContainer6 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer3.Panel1.SuspendLayout()
|
||||
Me.SplitContainer3.Panel2.SuspendLayout()
|
||||
Me.SplitContainer3.SuspendLayout()
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer2.Panel1.SuspendLayout()
|
||||
Me.SplitContainer2.Panel2.SuspendLayout()
|
||||
Me.SplitContainer2.SuspendLayout()
|
||||
CType(Me.SplitContainer4, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer4.Panel1.SuspendLayout()
|
||||
Me.SplitContainer4.Panel2.SuspendLayout()
|
||||
Me.SplitContainer4.SuspendLayout()
|
||||
CType(Me.SplitContainer5, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer5.Panel1.SuspendLayout()
|
||||
Me.SplitContainer5.Panel2.SuspendLayout()
|
||||
Me.SplitContainer5.SuspendLayout()
|
||||
CType(Me.SplitContainer6, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer6.Panel1.SuspendLayout()
|
||||
Me.SplitContainer6.Panel2.SuspendLayout()
|
||||
Me.SplitContainer6.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.SplitContainer3)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.Button1)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(1410, 677)
|
||||
Me.SplitContainer1.SplitterDistance = 589
|
||||
Me.SplitContainer1.TabIndex = 0
|
||||
'
|
||||
'SplitContainer3
|
||||
'
|
||||
Me.SplitContainer3.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer3.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer3.Name = "SplitContainer3"
|
||||
Me.SplitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer3.Panel1
|
||||
'
|
||||
Me.SplitContainer3.Panel1.Controls.Add(Me.Label5)
|
||||
'
|
||||
'SplitContainer3.Panel2
|
||||
'
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.SplitContainer2)
|
||||
Me.SplitContainer3.Size = New System.Drawing.Size(1410, 589)
|
||||
Me.SplitContainer3.SplitterDistance = 38
|
||||
Me.SplitContainer3.TabIndex = 1
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Label5.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label5.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(1410, 38)
|
||||
Me.Label5.TabIndex = 3
|
||||
Me.Label5.Text = "Add device"
|
||||
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'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.SplitContainer6)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox3)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label9)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox6)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox5)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox4)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label8)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox3)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox2)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox1)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label7)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label6)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.ComboBox1)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox2)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label4)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox1)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label3)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label2)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label1)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Cob_FilePath)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Cob_DirPath)
|
||||
'
|
||||
'SplitContainer2.Panel2
|
||||
'
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.SplitContainer4)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(1410, 547)
|
||||
Me.SplitContainer2.SplitterDistance = 120
|
||||
Me.SplitContainer2.TabIndex = 0
|
||||
'
|
||||
'CheckBox6
|
||||
'
|
||||
Me.CheckBox6.AutoSize = True
|
||||
Me.CheckBox6.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox6.Location = New System.Drawing.Point(1263, 67)
|
||||
Me.CheckBox6.Name = "CheckBox6"
|
||||
Me.CheckBox6.Size = New System.Drawing.Size(145, 18)
|
||||
Me.CheckBox6.TabIndex = 24
|
||||
Me.CheckBox6.Text = "Valveless machine"
|
||||
Me.CheckBox6.UseVisualStyleBackColor = True
|
||||
Me.CheckBox6.Visible = False
|
||||
'
|
||||
'FdevPortText
|
||||
'
|
||||
Me.FdevPortText.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.FdevPortText.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.FdevPortText.FormattingEnabled = True
|
||||
Me.FdevPortText.Location = New System.Drawing.Point(581, 3)
|
||||
Me.FdevPortText.Name = "FdevPortText"
|
||||
Me.FdevPortText.Size = New System.Drawing.Size(68, 24)
|
||||
Me.FdevPortText.TabIndex = 23
|
||||
Me.FdevPortText.Visible = False
|
||||
'
|
||||
'FdevtypeCom
|
||||
'
|
||||
Me.FdevtypeCom.BackColor = System.Drawing.SystemColors.Window
|
||||
Me.FdevtypeCom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.FdevtypeCom.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.FdevtypeCom.FormattingEnabled = True
|
||||
Me.FdevtypeCom.Location = New System.Drawing.Point(147, 4)
|
||||
Me.FdevtypeCom.Name = "FdevtypeCom"
|
||||
Me.FdevtypeCom.Size = New System.Drawing.Size(57, 24)
|
||||
Me.FdevtypeCom.TabIndex = 19
|
||||
Me.FdevtypeCom.Visible = False
|
||||
'
|
||||
'FdevPortCom
|
||||
'
|
||||
Me.FdevPortCom.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.FdevPortCom.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.FdevPortCom.FormattingEnabled = True
|
||||
Me.FdevPortCom.Location = New System.Drawing.Point(349, 3)
|
||||
Me.FdevPortCom.Name = "FdevPortCom"
|
||||
Me.FdevPortCom.Size = New System.Drawing.Size(68, 24)
|
||||
Me.FdevPortCom.TabIndex = 21
|
||||
Me.FdevPortCom.Visible = False
|
||||
'
|
||||
'FdevPort
|
||||
'
|
||||
Me.FdevPort.AutoSize = True
|
||||
Me.FdevPort.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.FdevPort.Location = New System.Drawing.Point(208, 8)
|
||||
Me.FdevPort.Name = "FdevPort"
|
||||
Me.FdevPort.Size = New System.Drawing.Size(140, 14)
|
||||
Me.FdevPort.TabIndex = 22
|
||||
Me.FdevPort.Text = "Parent device port:"
|
||||
Me.FdevPort.Visible = False
|
||||
'
|
||||
'Fdevtype
|
||||
'
|
||||
Me.Fdevtype.AutoSize = True
|
||||
Me.Fdevtype.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Fdevtype.Location = New System.Drawing.Point(7, 8)
|
||||
Me.Fdevtype.Name = "Fdevtype"
|
||||
Me.Fdevtype.Size = New System.Drawing.Size(140, 14)
|
||||
Me.Fdevtype.TabIndex = 20
|
||||
Me.Fdevtype.Text = "Parent device type:"
|
||||
Me.Fdevtype.Visible = False
|
||||
'
|
||||
'FdevAddr
|
||||
'
|
||||
Me.FdevAddr.AutoSize = True
|
||||
Me.FdevAddr.CausesValidation = False
|
||||
Me.FdevAddr.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.FdevAddr.Location = New System.Drawing.Point(421, 8)
|
||||
Me.FdevAddr.Name = "FdevAddr"
|
||||
Me.FdevAddr.Size = New System.Drawing.Size(161, 14)
|
||||
Me.FdevAddr.TabIndex = 17
|
||||
Me.FdevAddr.Text = "Parent device address:"
|
||||
Me.FdevAddr.Visible = False
|
||||
'
|
||||
'CheckBox5
|
||||
'
|
||||
Me.CheckBox5.AutoSize = True
|
||||
Me.CheckBox5.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox5.Location = New System.Drawing.Point(1043, 67)
|
||||
Me.CheckBox5.Name = "CheckBox5"
|
||||
Me.CheckBox5.Size = New System.Drawing.Size(215, 18)
|
||||
Me.CheckBox5.TabIndex = 16
|
||||
Me.CheckBox5.Text = "Wind speed mode prompt tone"
|
||||
Me.CheckBox5.UseVisualStyleBackColor = True
|
||||
Me.CheckBox5.Visible = False
|
||||
'
|
||||
'CheckBox4
|
||||
'
|
||||
Me.CheckBox4.AutoSize = True
|
||||
Me.CheckBox4.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox4.Location = New System.Drawing.Point(966, 91)
|
||||
Me.CheckBox4.Name = "CheckBox4"
|
||||
Me.CheckBox4.Size = New System.Drawing.Size(215, 18)
|
||||
Me.CheckBox4.TabIndex = 15
|
||||
Me.CheckBox4.Text = "Display television infrared"
|
||||
Me.CheckBox4.UseVisualStyleBackColor = True
|
||||
Me.CheckBox4.Visible = False
|
||||
'
|
||||
'Label8
|
||||
'
|
||||
Me.Label8.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label8.Location = New System.Drawing.Point(1089, 5)
|
||||
Me.Label8.Name = "Label8"
|
||||
Me.Label8.Size = New System.Drawing.Size(213, 59)
|
||||
Me.Label8.TabIndex = 14
|
||||
Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'CheckBox3
|
||||
'
|
||||
Me.CheckBox3.AutoSize = True
|
||||
Me.CheckBox3.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox3.Location = New System.Drawing.Point(752, 91)
|
||||
Me.CheckBox3.Name = "CheckBox3"
|
||||
Me.CheckBox3.Size = New System.Drawing.Size(208, 18)
|
||||
Me.CheckBox3.TabIndex = 13
|
||||
Me.CheckBox3.Text = "Call for a welcome message"
|
||||
Me.CheckBox3.UseVisualStyleBackColor = True
|
||||
Me.CheckBox3.Visible = False
|
||||
'
|
||||
'CheckBox2
|
||||
'
|
||||
Me.CheckBox2.AutoSize = True
|
||||
Me.CheckBox2.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox2.Location = New System.Drawing.Point(819, 68)
|
||||
Me.CheckBox2.Name = "CheckBox2"
|
||||
Me.CheckBox2.Size = New System.Drawing.Size(222, 18)
|
||||
Me.CheckBox2.TabIndex = 12
|
||||
Me.CheckBox2.Text = "Tone for switching on or off"
|
||||
Me.CheckBox2.UseVisualStyleBackColor = True
|
||||
Me.CheckBox2.Visible = False
|
||||
'
|
||||
'CheckBox1
|
||||
'
|
||||
Me.CheckBox1.AutoSize = True
|
||||
Me.CheckBox1.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox1.Location = New System.Drawing.Point(665, 67)
|
||||
Me.CheckBox1.Name = "CheckBox1"
|
||||
Me.CheckBox1.Size = New System.Drawing.Size(152, 18)
|
||||
Me.CheckBox1.TabIndex = 11
|
||||
Me.CheckBox1.Text = "Power availability"
|
||||
Me.CheckBox1.UseVisualStyleBackColor = True
|
||||
Me.CheckBox1.Visible = False
|
||||
'
|
||||
'Label7
|
||||
'
|
||||
Me.Label7.Font = New System.Drawing.Font("宋体", 15.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label7.Location = New System.Drawing.Point(803, 27)
|
||||
Me.Label7.Name = "Label7"
|
||||
Me.Label7.Size = New System.Drawing.Size(280, 33)
|
||||
Me.Label7.TabIndex = 10
|
||||
Me.Label7.Text = "Port:"
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.AutoSize = True
|
||||
Me.Label6.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label6.Location = New System.Drawing.Point(526, 68)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(77, 14)
|
||||
Me.Label6.TabIndex = 9
|
||||
Me.Label6.Text = "backlight:"
|
||||
Me.Label6.Visible = False
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(604, 63)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(54, 24)
|
||||
Me.ComboBox1.TabIndex = 8
|
||||
Me.ComboBox1.Visible = False
|
||||
'
|
||||
'TextBox2
|
||||
'
|
||||
Me.TextBox2.Enabled = False
|
||||
Me.TextBox2.Location = New System.Drawing.Point(487, 65)
|
||||
Me.TextBox2.MaxLength = 900
|
||||
Me.TextBox2.Name = "TextBox2"
|
||||
Me.TextBox2.Size = New System.Drawing.Size(35, 21)
|
||||
Me.TextBox2.TabIndex = 7
|
||||
Me.TextBox2.WordWrap = False
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label4.Location = New System.Drawing.Point(371, 68)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(112, 14)
|
||||
Me.Label4.TabIndex = 6
|
||||
Me.Label4.Text = "Device address:"
|
||||
'
|
||||
'TextBox1
|
||||
'
|
||||
Me.TextBox1.Enabled = False
|
||||
Me.TextBox1.Location = New System.Drawing.Point(97, 65)
|
||||
Me.TextBox1.MaxLength = 3000
|
||||
Me.TextBox1.Name = "TextBox1"
|
||||
Me.TextBox1.Size = New System.Drawing.Size(270, 21)
|
||||
Me.TextBox1.TabIndex = 5
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label3.Location = New System.Drawing.Point(3, 68)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(98, 14)
|
||||
Me.Label3.TabIndex = 4
|
||||
Me.Label3.Text = "Device alias:"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label2.Location = New System.Drawing.Point(280, 5)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(138, 19)
|
||||
Me.Label2.TabIndex = 3
|
||||
Me.Label2.Text = "Device file:"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(3, 5)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(138, 19)
|
||||
Me.Label1.TabIndex = 2
|
||||
Me.Label1.Text = "Device type:"
|
||||
'
|
||||
'Cob_FilePath
|
||||
'
|
||||
Me.Cob_FilePath.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.Cob_FilePath.Font = New System.Drawing.Font("宋体", 19.0!)
|
||||
Me.Cob_FilePath.FormattingEnabled = True
|
||||
Me.Cob_FilePath.Location = New System.Drawing.Point(280, 27)
|
||||
Me.Cob_FilePath.Name = "Cob_FilePath"
|
||||
Me.Cob_FilePath.Size = New System.Drawing.Size(517, 33)
|
||||
Me.Cob_FilePath.TabIndex = 1
|
||||
'
|
||||
'Cob_DirPath
|
||||
'
|
||||
Me.Cob_DirPath.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.Cob_DirPath.Font = New System.Drawing.Font("宋体", 19.0!)
|
||||
Me.Cob_DirPath.FormattingEnabled = True
|
||||
Me.Cob_DirPath.Location = New System.Drawing.Point(3, 27)
|
||||
Me.Cob_DirPath.Name = "Cob_DirPath"
|
||||
Me.Cob_DirPath.Size = New System.Drawing.Size(236, 33)
|
||||
Me.Cob_DirPath.TabIndex = 0
|
||||
'
|
||||
'SplitContainer4
|
||||
'
|
||||
Me.SplitContainer4.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer4.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer4.Name = "SplitContainer4"
|
||||
'
|
||||
'SplitContainer4.Panel1
|
||||
'
|
||||
Me.SplitContainer4.Panel1.Controls.Add(Me.SplitContainer5)
|
||||
'
|
||||
'SplitContainer4.Panel2
|
||||
'
|
||||
Me.SplitContainer4.Panel2.Controls.Add(Me.Temp_Grid)
|
||||
Me.SplitContainer4.Size = New System.Drawing.Size(1410, 423)
|
||||
Me.SplitContainer4.SplitterDistance = 784
|
||||
Me.SplitContainer4.TabIndex = 20
|
||||
'
|
||||
'SplitContainer5
|
||||
'
|
||||
Me.SplitContainer5.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer5.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer5.Name = "SplitContainer5"
|
||||
'
|
||||
'SplitContainer5.Panel1
|
||||
'
|
||||
Me.SplitContainer5.Panel1.Controls.Add(Me.Table_Grid1)
|
||||
'
|
||||
'SplitContainer5.Panel2
|
||||
'
|
||||
Me.SplitContainer5.Panel2.Controls.Add(Me.Grid1)
|
||||
Me.SplitContainer5.Size = New System.Drawing.Size(784, 423)
|
||||
Me.SplitContainer5.SplitterDistance = 436
|
||||
Me.SplitContainer5.TabIndex = 19
|
||||
'
|
||||
'Table_Grid1
|
||||
'
|
||||
Me.Table_Grid1.Cols = 3
|
||||
Me.Table_Grid1.Cursor = System.Windows.Forms.Cursors.Default
|
||||
Me.Table_Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Table_Grid1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Table_Grid1.ExtendLastCol = True
|
||||
Me.Table_Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Table_Grid1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Table_Grid1.MouseWheelSpeed = CType(3, Short)
|
||||
Me.Table_Grid1.Name = "Table_Grid1"
|
||||
Me.Table_Grid1.Size = New System.Drawing.Size(436, 423)
|
||||
Me.Table_Grid1.TabIndex = 18
|
||||
'
|
||||
'Grid1
|
||||
'
|
||||
Me.Grid1.CausesValidation = False
|
||||
Me.Grid1.ClearBlankArea = True
|
||||
Me.Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Grid1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Grid1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Grid1.MouseWheelSpeed = CType(3, Short)
|
||||
Me.Grid1.Name = "Grid1"
|
||||
Me.Grid1.Size = New System.Drawing.Size(344, 423)
|
||||
Me.Grid1.TabIndex = 0
|
||||
'
|
||||
'Temp_Grid
|
||||
'
|
||||
Me.Temp_Grid.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Temp_Grid.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Temp_Grid.ExtendLastCol = True
|
||||
Me.Temp_Grid.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Temp_Grid.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Temp_Grid.MouseWheelSpeed = CType(3, Short)
|
||||
Me.Temp_Grid.Name = "Temp_Grid"
|
||||
Me.Temp_Grid.Size = New System.Drawing.Size(622, 423)
|
||||
Me.Temp_Grid.TabIndex = 0
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.Button1.Font = New System.Drawing.Font("宋体", 15.0!)
|
||||
Me.Button1.Location = New System.Drawing.Point(1257, 0)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(153, 84)
|
||||
Me.Button1.TabIndex = 0
|
||||
Me.Button1.Text = "OK"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TextBox3
|
||||
'
|
||||
Me.TextBox3.Enabled = False
|
||||
Me.TextBox3.Location = New System.Drawing.Point(1307, 90)
|
||||
Me.TextBox3.MaxLength = 8
|
||||
Me.TextBox3.Name = "TextBox3"
|
||||
Me.TextBox3.Size = New System.Drawing.Size(92, 21)
|
||||
Me.TextBox3.TabIndex = 29
|
||||
Me.TextBox3.WordWrap = False
|
||||
'
|
||||
'Label9
|
||||
'
|
||||
Me.Label9.AutoSize = True
|
||||
Me.Label9.Font = New System.Drawing.Font("宋体", 10.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label9.Location = New System.Drawing.Point(1194, 93)
|
||||
Me.Label9.Name = "Label9"
|
||||
Me.Label9.Size = New System.Drawing.Size(112, 14)
|
||||
Me.Label9.TabIndex = 28
|
||||
Me.Label9.Text = "Bluetooth Name:"
|
||||
Me.Label9.Visible = False
|
||||
'
|
||||
'SplitContainer6
|
||||
'
|
||||
Me.SplitContainer6.Location = New System.Drawing.Point(3, 89)
|
||||
Me.SplitContainer6.Name = "SplitContainer6"
|
||||
'
|
||||
'SplitContainer6.Panel1
|
||||
'
|
||||
Me.SplitContainer6.Panel1.Controls.Add(Me.FdevAddr)
|
||||
Me.SplitContainer6.Panel1.Controls.Add(Me.Fdevtype)
|
||||
Me.SplitContainer6.Panel1.Controls.Add(Me.FdevPort)
|
||||
Me.SplitContainer6.Panel1.Controls.Add(Me.FdevPortCom)
|
||||
Me.SplitContainer6.Panel1.Controls.Add(Me.FdevPortText)
|
||||
Me.SplitContainer6.Panel1.Controls.Add(Me.FdevtypeCom)
|
||||
'
|
||||
'SplitContainer6.Panel2
|
||||
'
|
||||
Me.SplitContainer6.Panel2.Controls.Add(Me.Button2)
|
||||
Me.SplitContainer6.Size = New System.Drawing.Size(703, 29)
|
||||
Me.SplitContainer6.SplitterDistance = 656
|
||||
Me.SplitContainer6.TabIndex = 30
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Button2.Font = New System.Drawing.Font("黑体", 5.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Button2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(43, 29)
|
||||
Me.Button2.TabIndex = 1
|
||||
Me.Button2.Text = "···"
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'AddPeripherals
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1410, 677)
|
||||
Me.Controls.Add(Me.SplitContainer1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
|
||||
Me.Name = "AddPeripherals"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "AddPeripherals"
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.SplitContainer3.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer3.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer3.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel1.PerformLayout()
|
||||
Me.SplitContainer2.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer2.ResumeLayout(False)
|
||||
Me.SplitContainer4.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer4.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer4, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer4.ResumeLayout(False)
|
||||
Me.SplitContainer5.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer5.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer5, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer5.ResumeLayout(False)
|
||||
Me.SplitContainer6.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer6.Panel1.PerformLayout()
|
||||
Me.SplitContainer6.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer6, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer6.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents SplitContainer2 As SplitContainer
|
||||
Friend WithEvents TextBox2 As TextBox
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents TextBox1 As TextBox
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents Cob_FilePath As ComboBox
|
||||
Friend WithEvents SplitContainer3 As SplitContainer
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents Label6 As Label
|
||||
Friend WithEvents ComboBox1 As ComboBox
|
||||
Friend WithEvents Cob_DirPath As ComboBox
|
||||
Friend WithEvents Table_Grid1 As FlexCell.Grid
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents SplitContainer4 As SplitContainer
|
||||
Friend WithEvents Temp_Grid As FlexCell.Grid
|
||||
Friend WithEvents CheckBox3 As CheckBox
|
||||
Friend WithEvents CheckBox2 As CheckBox
|
||||
Friend WithEvents CheckBox1 As CheckBox
|
||||
Friend WithEvents SplitContainer5 As SplitContainer
|
||||
Friend WithEvents Grid1 As FlexCell.Grid
|
||||
Friend WithEvents Label8 As Label
|
||||
Friend WithEvents Label7 As Label
|
||||
Friend WithEvents CheckBox4 As CheckBox
|
||||
Friend WithEvents CheckBox5 As CheckBox
|
||||
Friend WithEvents FdevPort As Label
|
||||
Friend WithEvents FdevPortCom As ComboBox
|
||||
Friend WithEvents Fdevtype As Label
|
||||
Friend WithEvents FdevtypeCom As ComboBox
|
||||
Friend WithEvents FdevAddr As Label
|
||||
Friend WithEvents FdevPortText As ComboBox
|
||||
Friend WithEvents CheckBox6 As CheckBox
|
||||
Friend WithEvents SplitContainer6 As SplitContainer
|
||||
Friend WithEvents Button2 As Button
|
||||
Friend WithEvents TextBox3 As TextBox
|
||||
Friend WithEvents Label9 As Label
|
||||
End Class
|
||||
120
BLV_Studio/Test/GridTest/AddPeripherals.resx
Normal file
120
BLV_Studio/Test/GridTest/AddPeripherals.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>
|
||||
3031
BLV_Studio/Test/GridTest/AddPeripherals.vb
Normal file
3031
BLV_Studio/Test/GridTest/AddPeripherals.vb
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
6
BLV_Studio/Test/GridTest/CompileTable.vb
Normal file
6
BLV_Studio/Test/GridTest/CompileTable.vb
Normal file
@@ -0,0 +1,6 @@
|
||||
Public Class CompileTable
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
3
BLV_Studio/Test/GridTest/CompositeForm.vb
Normal file
3
BLV_Studio/Test/GridTest/CompositeForm.vb
Normal file
@@ -0,0 +1,3 @@
|
||||
Public Class CompositeForm
|
||||
|
||||
End Class
|
||||
47
BLV_Studio/Test/GridTest/DTableConfigie.vb
Normal file
47
BLV_Studio/Test/GridTest/DTableConfigie.vb
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
Public Class DTableConfigie
|
||||
Enum Devtype
|
||||
RCUModel
|
||||
Model_485P
|
||||
Model_485A
|
||||
End Enum
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
94
BLV_Studio/Test/GridTest/DeviceListFrom.Designer.vb
generated
Normal file
94
BLV_Studio/Test/GridTest/DeviceListFrom.Designer.vb
generated
Normal file
@@ -0,0 +1,94 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class DeviceListFrom
|
||||
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.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Table_Grid1 = New FlexCell.Grid()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Label4.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label4.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(442, 26)
|
||||
Me.Label4.TabIndex = 25
|
||||
Me.Label4.Text = "设备列表"
|
||||
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Table_Grid1
|
||||
'
|
||||
Me.Table_Grid1.CheckedImage = Nothing
|
||||
Me.Table_Grid1.Cols = 3
|
||||
Me.Table_Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Table_Grid1.DisplayRowNumber = True
|
||||
Me.Table_Grid1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Table_Grid1.ExtendLastCol = True
|
||||
Me.Table_Grid1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Table_Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Table_Grid1.Location = New System.Drawing.Point(0, 26)
|
||||
Me.Table_Grid1.Name = "Table_Grid1"
|
||||
Me.Table_Grid1.Size = New System.Drawing.Size(442, 433)
|
||||
Me.Table_Grid1.TabIndex = 28
|
||||
Me.Table_Grid1.UncheckedImage = Nothing
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.Location = New System.Drawing.Point(152, 465)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(142, 42)
|
||||
Me.Button3.TabIndex = 30
|
||||
Me.Button3.Text = "删除设备"
|
||||
Me.Button3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Location = New System.Drawing.Point(300, 465)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(142, 42)
|
||||
Me.Button2.TabIndex = 29
|
||||
Me.Button2.Text = "完成"
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'DeviceListFrom
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(442, 519)
|
||||
Me.Controls.Add(Me.Button3)
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.Table_Grid1)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Name = "DeviceListFrom"
|
||||
Me.Text = "DeviceListFrom"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents Table_Grid1 As FlexCell.Grid
|
||||
Friend WithEvents Button3 As Button
|
||||
Friend WithEvents Button2 As Button
|
||||
End Class
|
||||
120
BLV_Studio/Test/GridTest/DeviceListFrom.resx
Normal file
120
BLV_Studio/Test/GridTest/DeviceListFrom.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>
|
||||
115
BLV_Studio/Test/GridTest/DeviceListFrom.vb
Normal file
115
BLV_Studio/Test/GridTest/DeviceListFrom.vb
Normal file
@@ -0,0 +1,115 @@
|
||||
Public Class DeviceListFrom
|
||||
Public G_result As String = String.Empty
|
||||
Private dic As Dictionary(Of String, String)
|
||||
Public Dic_Devicemodel As Dictionary(Of String, DeviceModel)
|
||||
Private Sub DeviceListFrom_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
'nitTable()
|
||||
|
||||
End Sub
|
||||
Public Sub initTable()
|
||||
|
||||
Table_Grid1.Rows = 1
|
||||
Table_Grid1.Cols = 4
|
||||
Table_Grid1.ExtendLastCol = True
|
||||
Table_Grid1.Cell(0, 1).Text = "设备别名"
|
||||
Table_Grid1.Cell(0, 2).Text = "设备地址"
|
||||
Table_Grid1.Cell(0, 3).Text = "设备端口"
|
||||
Table_Grid1.Column(1).Width = 230
|
||||
Table_Grid1.Column(2).Width = 30
|
||||
Table_Grid1.Column(1).Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
Table_Grid1.Column(2).Mask = FlexCell.MaskEnum.Numeric
|
||||
Table_Grid1.Column(3).Locked = True
|
||||
|
||||
End Sub
|
||||
Private isok As Boolean = True
|
||||
Public Sub SetDevnameTotable(devname As String, g_Devicemodel As Dictionary(Of String, DeviceModel))
|
||||
If IsNothing(g_Devicemodel) OrElse g_Devicemodel.Count = 0 Then Return
|
||||
Dic_Devicemodel = g_Devicemodel
|
||||
dic = New Dictionary(Of String, String)
|
||||
initTable()
|
||||
If String.IsNullOrEmpty(devname.Trim) Then Return
|
||||
Dim buff() As String = devname.Trim.Split(",")
|
||||
isok = False
|
||||
If IsNothing(buff) OrElse buff.Length = 0 Then Return
|
||||
For Each index In buff
|
||||
Dim cbuf() As String = index.Trim.Split(vbLf)
|
||||
Dim dbuf() As String = cbuf(2).Split(":")
|
||||
Dim ebuf() As String = cbuf(1).Split(":")
|
||||
Table_Grid1.AddItem("")
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 1).Text = dbuf(0)
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 2).Text = ebuf(1)
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, 3).Text = cbuf(0)
|
||||
dic.Add(Table_Grid1.Rows - 1, index.Trim)
|
||||
Next
|
||||
isok = True
|
||||
End Sub
|
||||
|
||||
Private Sub Table_Grid1_CellChange(Sender As Object, e As FlexCell.Grid.CellChangeEventArgs) Handles Table_Grid1.CellChange
|
||||
If e.Col >0 AndAlso e.Row > 0 Then
|
||||
If isok Then
|
||||
|
||||
Dim olddevname As String = dic.Item(e.Row)
|
||||
Dim devnode As DeviceModel = Dic_Devicemodel.Item(olddevname)
|
||||
Dim vstr() As String = olddevname.Split(vbLf)
|
||||
Dim cbuf() As String = vstr(2).Split(":")
|
||||
Dim dbuf() As String = vstr(1).Split(":")
|
||||
' Dim newdevname As String = $"{Table_Grid1.Cell(e.Row, 1).Text}{vbLf}设备端口:{devnode.Desc.DevInterface }{vbLf}设备地址:{Table_Grid1.Cell(e.Row, 2).Text}"
|
||||
Dim newdevname As String = $"{Table_Grid1.Cell(e.Row, 3).Text}{vbLf }设备地址:{Table_Grid1.Cell(e.Row, 2).Text}{vbLf}{Table_Grid1.Cell(e.Row, 1).Text}"
|
||||
|
||||
If Dic_Devicemodel.ContainsKey(newdevname) Then
|
||||
MsgBox("设备别名重命名失败,该别名已存在!")
|
||||
isok = False
|
||||
Table_Grid1.Cell(e.Row, 1).Text = vstr(0)
|
||||
Table_Grid1.Cell(e.Row, 2).Text = cbuf(1)
|
||||
Table_Grid1.Cell(e.Row, 3).Text = dbuf(1)
|
||||
isok = True
|
||||
Else
|
||||
Dic_Devicemodel.Remove(olddevname)
|
||||
devnode.Name = newdevname
|
||||
SetDevModeAindex(devnode, "拨码地址", Table_Grid1.Cell(e.Row, 2).Text.Trim)
|
||||
Dic_Devicemodel.Add(newdevname, devnode)
|
||||
dic.Item(e.Row) = newdevname
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub SetDevModeAindex(node As DeviceModel, eqstr As String, settext As String)
|
||||
' Dim result As String = String.Empty
|
||||
If Not IsNothing(node) Then
|
||||
For Each index In node.Config
|
||||
For Each aindex In index.Attributes
|
||||
' If aindex.Name.Equals("拨码地址") Then
|
||||
If aindex.Name.Equals(eqstr) Then
|
||||
aindex.Value = settext
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
'Dim newdevname As String = $"{Table_Grid1.Cell(e.Row, 1).Text}{vbLf}设备端口:{devnode.Desc.DevInterface }{vbLf}设备地址:{Table_Grid1.Cell(e.Row, 2).Text}"
|
||||
|
||||
For i = 1 To Table_Grid1.Rows - 1
|
||||
G_result = $"{G_result}{Table_Grid1.Cell(i, 1).Text}{vbLf }设备端口:{Table_Grid1.Cell(i, 3).Text}{vbLf}设备地址:{Table_Grid1.Cell(i, 2).Text},"
|
||||
Next
|
||||
If G_result.Length > 0 Then
|
||||
G_result = G_result.Substring(0, G_result.Length - 1).Trim()
|
||||
End If
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Close()
|
||||
Return
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
If Table_Grid1.ActiveCell.Row > 0 Then
|
||||
Dim i As Integer =Table_Grid1.ActiveCell.Row
|
||||
Dim newdevname As String = $"{Table_Grid1.Cell(i, 3).Text}{vbLf }设备地址:{Table_Grid1.Cell(i, 2).Text}{vbLf}{Table_Grid1.Cell(i, 1).Text}"
|
||||
|
||||
Dic_Devicemodel.Remove(newdevname)
|
||||
Table_Grid1.Row(Table_Grid1.ActiveCell.Row).Delete()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
527
BLV_Studio/Test/GridTest/DrSeverGrid.vb
Normal file
527
BLV_Studio/Test/GridTest/DrSeverGrid.vb
Normal file
@@ -0,0 +1,527 @@
|
||||
Imports System.Text
|
||||
Imports System.Xml
|
||||
Imports BLV_Studio.TableInteraction
|
||||
Imports FlexCell
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class DrSeverGrid
|
||||
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 设备键值对 设备名-设备信息集合 主机=主机名 外设=外设名+播马地址
|
||||
''' </summary>
|
||||
Public Dic_Devicemodel As Dictionary(Of String, DeviceModel)
|
||||
''' <summary>
|
||||
''' 设备动作信息 设备名-动作信息集合
|
||||
''' </summary>
|
||||
Public Dic_ActionConfiguration As List(Of TableRowTag)
|
||||
|
||||
Public Dic_Dgrid As Grid
|
||||
Public Dic_TimeZone As String
|
||||
Public Dic_Bname As String
|
||||
Public Dic_Cname As String
|
||||
Public G_SceneID As Integer
|
||||
Public ColumnAnothername As Dictionary(Of String, String)
|
||||
Sub New(devlList As Dictionary(Of String, DeviceModel), ActionConfiguration As List(Of TableRowTag), Dgrid As Grid, bname As String, Cname As String)
|
||||
Dic_Devicemodel = devlList
|
||||
Dic_ActionConfiguration = ActionConfiguration
|
||||
Dic_Dgrid = Dgrid
|
||||
Dic_Bname = bname
|
||||
Dic_Cname = Cname
|
||||
ColumnAnothername = New Dictionary(Of String, String)
|
||||
'保存----------
|
||||
'保存基类名称
|
||||
'保存设备类对象
|
||||
'保存动作
|
||||
'提交-----
|
||||
'下载-----
|
||||
'解析到类对象
|
||||
'加载设备对象
|
||||
'加载设备对象约束
|
||||
'加载动作
|
||||
End Sub
|
||||
#Region "Save"
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 保存模型信息至Xml文件
|
||||
''' </summary>
|
||||
''' <param name="OuputFullName">xml完整路径</param>
|
||||
''' <returns></returns>
|
||||
Public Function Save(OuputFullName As String) As Boolean
|
||||
Dim xws As New XmlWriterSettings
|
||||
Dim xmlpath As String = OuputFullName.Replace(".blv", ".xml")
|
||||
Try
|
||||
With xws
|
||||
.Indent = True
|
||||
.NewLineOnAttributes = False
|
||||
.Encoding = New UTF8Encoding(False)
|
||||
End With
|
||||
IO.Directory.CreateDirectory(xmlpath.Substring(0, xmlpath.LastIndexOf("\")))
|
||||
Using xw As XmlWriter = XmlWriter.Create(xmlpath, xws)
|
||||
xw.WriteStartDocument()
|
||||
xw.WriteStartElement($"RcuConfig") '创建跟节点
|
||||
|
||||
'新建基类文件名节点
|
||||
xw.WriteStartElement($"BasicClassFilename") '创建表属性节点
|
||||
xw.WriteString(Dic_Bname)
|
||||
xw.WriteEndElement()
|
||||
|
||||
'新建条件文件名节点
|
||||
xw.WriteStartElement($"ConctionFilename") '创建表属性节点
|
||||
xw.WriteString(Dic_Cname)
|
||||
xw.WriteEndElement()
|
||||
|
||||
xw.WriteStartElement($"DevNodes") '创建表属性节点
|
||||
'For Each node In Dic_Devicemodel
|
||||
xw.WriteString($"{JsonConvert.SerializeObject(Dic_Devicemodel)}")
|
||||
'WriteRowNodeToXml(xw, node.Value)
|
||||
' Next
|
||||
xw.WriteEndElement()
|
||||
|
||||
xw.WriteStartElement($"Cols") '创建表属性节点
|
||||
WriteColNodeToXml(xw)
|
||||
xw.WriteEndElement()
|
||||
|
||||
xw.WriteStartElement($"Rows") '创建表属性节点
|
||||
WriteRowNodeToXml(xw)
|
||||
xw.WriteEndElement()
|
||||
|
||||
|
||||
|
||||
xw.WriteEndElement()
|
||||
xw.WriteEndDocument()
|
||||
End Using
|
||||
|
||||
If IO.File.Exists(OuputFullName) Then
|
||||
IO.File.Delete(OuputFullName)
|
||||
End If
|
||||
Rename(xmlpath, OuputFullName)
|
||||
' _isCellChanged = False '复位文件修改标记
|
||||
Return True
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox($"保存文件失败,{ex.Message}")
|
||||
Return False
|
||||
End Try
|
||||
|
||||
End Function
|
||||
Public Sub WriteRowNodeToXml(xw As XmlWriter)
|
||||
Dim row As Integer = 7
|
||||
Dim li As New List(Of Integer)
|
||||
For Each node In Dic_ActionConfiguration
|
||||
xw.WriteStartElement($"DevName")
|
||||
'xw.WriteString($"{node.G_DevModeName}")
|
||||
xw.WriteAttributeString("DevName", $"{node.G_DevModeName}")
|
||||
xw.WriteAttributeString("DataType", $"{node.G_DevNodeName}")
|
||||
xw.WriteAttributeString("Name", $"{node.G_DevNodeIndex }")
|
||||
xw.WriteAttributeString("KeyType", $"{JsonConvert.SerializeObject(node.G_KeyType) }")
|
||||
xw.WriteAttributeString("DicRow", $"{JsonConvert.SerializeObject(node.G_DicRow) }")
|
||||
li.Clear()
|
||||
For Each index In node.G_DicRow.Keys
|
||||
If Dic_Dgrid.Cell(row, index).ForeColor = Color.DarkRed Then
|
||||
li.Add(index)
|
||||
End If
|
||||
Next
|
||||
xw.WriteAttributeString("DicRowCheck", $"{JsonConvert.SerializeObject(li) }")
|
||||
|
||||
xw.WriteAttributeString("Tag", JsonConvert.SerializeObject(Dic_Dgrid.Cell(row, 6).Tag))
|
||||
row += 1
|
||||
|
||||
xw.WriteEndElement()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub WriteColNodeToXml(xw As XmlWriter)
|
||||
Dim fr, lr, fc, lc As Integer
|
||||
For i = 8 To Dic_Dgrid.Cols - 1
|
||||
With Dic_Dgrid.Range(1, i, 1, i)
|
||||
fr = .FirstRow
|
||||
lr = .LastRow
|
||||
fc = .FirstCol
|
||||
lc = .LastCol
|
||||
If String.IsNullOrEmpty(Dic_Dgrid.Cell(fr, fc).Text) Then
|
||||
i = lc
|
||||
Continue For
|
||||
End If
|
||||
xw.WriteStartElement($"DevName")
|
||||
xw.WriteAttributeString("DevName", $"{Dic_Dgrid.Cell(fr, fc).Text }")
|
||||
|
||||
i = lc
|
||||
|
||||
For j = fc To i
|
||||
With Dic_Dgrid.Range(2, j, 2, j)
|
||||
fr = .FirstRow
|
||||
lr = .LastRow
|
||||
fc = .FirstCol
|
||||
lc = .LastCol
|
||||
xw.WriteStartElement($"Function")
|
||||
xw.WriteAttributeString("DataType", $"{Dic_Dgrid.Cell(fr, fc).Text }")
|
||||
xw.WriteAttributeString("Name", $"{Dic_Dgrid.Cell(fr + 1, fc).Text }")
|
||||
|
||||
For cj = fc To lc
|
||||
xw.WriteStartElement($"ID")
|
||||
xw.WriteAttributeString("Val", $"{Dic_Dgrid.Cell(fr + 2, cj).Text }")
|
||||
xw.WriteAttributeString("Name", $"{Dic_Dgrid.Cell(fr + 3, cj).Text }")
|
||||
xw.WriteAttributeString("LockCol", Dic_Dgrid.Column(cj).Visible)
|
||||
|
||||
xw.WriteEndElement()
|
||||
Next
|
||||
xw.WriteEndElement()
|
||||
j = lc
|
||||
End With
|
||||
Next
|
||||
|
||||
|
||||
End With
|
||||
xw.WriteEndElement()
|
||||
Next
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "LoadFile"
|
||||
Public InsertColumn As Integer
|
||||
Public Function LoadFile(OuputFullName As String)
|
||||
|
||||
Dim ts As DateTime = Now
|
||||
Dim st As TimeSpan
|
||||
'解析到类对象
|
||||
Dim xd As New XmlDocument()
|
||||
|
||||
xd.Load(OuputFullName)
|
||||
InsertColumn = 8
|
||||
Dim xe, axe, bxe, cxe As XmlElement
|
||||
Dim nodeList As XmlNodeList = xd.SelectSingleNode($"RcuConfig").ChildNodes
|
||||
|
||||
For Each node As XmlNode In nodeList
|
||||
xe = CType(node, XmlElement)
|
||||
Select Case xe.LocalName
|
||||
Case "TimeZone"
|
||||
Dic_TimeZone = xe.InnerText
|
||||
Dic_Dgrid.Cell(TableRowNumber.FunctionAnotherName, TableColNumber.ServerAttribute).Text = Dic_TimeZone
|
||||
Case "BasicClassFilename"
|
||||
Dic_Bname = xe.InnerText
|
||||
Case "ConctionFilename"
|
||||
Dic_Cname = xe.InnerText
|
||||
Case "DevNodes"
|
||||
Dic_Devicemodel = JsonConvert.DeserializeObject(Of Dictionary(Of String, DeviceModel))(xe.InnerText)
|
||||
Case "Cols"
|
||||
Dim DevName As String = String.Empty
|
||||
Dim DataType As String = String.Empty
|
||||
Dim Name As String = String.Empty
|
||||
ColumnAnothername.Clear()
|
||||
Dim startColumn = 8
|
||||
For Each Index In xe.ChildNodes
|
||||
axe = CType(Index, XmlElement)
|
||||
DevName = axe.Attributes.GetNamedItem("DevName").InnerText
|
||||
|
||||
For Each aIndex In axe.ChildNodes
|
||||
bxe = CType(aIndex, XmlElement)
|
||||
DataType = bxe.Attributes.GetNamedItem("DataType").InnerText
|
||||
Name = bxe.Attributes.GetNamedItem("Name").InnerText
|
||||
|
||||
Dic_Dgrid.InsertCol(InsertColumn, bxe.ChildNodes.Count)
|
||||
|
||||
Dic_Dgrid.Cell(1, startColumn).Text = DevName
|
||||
With Dic_Dgrid.Range(1, startColumn, 1, InsertColumn + bxe.ChildNodes.Count - 1)
|
||||
.Locked = False
|
||||
.Merge()
|
||||
.Locked = True
|
||||
End With
|
||||
|
||||
|
||||
Dic_Dgrid.Cell(3, InsertColumn).Text = Name
|
||||
With Dic_Dgrid.Range(3, InsertColumn, 3, InsertColumn + bxe.ChildNodes.Count - 1)
|
||||
.Locked = False
|
||||
.Merge()
|
||||
.Locked = True
|
||||
End With
|
||||
Dic_Dgrid.Cell(2, InsertColumn).Text = DataType
|
||||
With Dic_Dgrid.Range(2, InsertColumn, 2, InsertColumn + bxe.ChildNodes.Count - 1)
|
||||
.Locked = False
|
||||
.Merge()
|
||||
.Locked = True
|
||||
End With
|
||||
For Each bIndex In bxe.ChildNodes
|
||||
cxe = CType(bIndex, XmlElement)
|
||||
Dic_Dgrid.Column(InsertColumn).Width = 30
|
||||
With Dic_Dgrid.Range(5, InsertColumn, 6, InsertColumn)
|
||||
.Locked = False
|
||||
.WrapText = True
|
||||
.Merge()
|
||||
End With
|
||||
|
||||
Dic_Dgrid.Cell(4, InsertColumn).Text = cxe.Attributes.GetNamedItem("Val").InnerText
|
||||
Dic_Dgrid.Cell(5, InsertColumn).Text = cxe.Attributes.GetNamedItem("Name").InnerText
|
||||
Dic_Dgrid.Column(InsertColumn).Visible = cxe.Attributes.GetNamedItem("LockCol").InnerText
|
||||
|
||||
Dim val As String = $"{DevName }*{Dic_Dgrid.Cell(4, InsertColumn).Text }*{DataType }"
|
||||
Dim key As String = $"{DevName}_{ Dic_Dgrid.Cell(5, InsertColumn).Text}"
|
||||
If ColumnAnothername.ContainsKey(key) Then
|
||||
Else
|
||||
For Each strval In ColumnAnothername
|
||||
If strval.Value.Equals(val) Then
|
||||
ColumnAnothername.Remove(strval.Key)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
ColumnAnothername.Add(key, val)
|
||||
|
||||
|
||||
End If
|
||||
|
||||
InsertColumn += 1
|
||||
Next
|
||||
Next
|
||||
startColumn = InsertColumn
|
||||
Next
|
||||
|
||||
Dic_Dgrid.Column(InsertColumn).Width = 0
|
||||
Dic_Dgrid.Range(1, 8, 5, Dic_Dgrid.Cols - 1).Alignment = AlignmentEnum.CenterCenter
|
||||
'--------------设置列绑定
|
||||
|
||||
Case "Rows"
|
||||
Dic_ActionConfiguration.Clear()
|
||||
Dim rowlockli As New List(Of Integer)
|
||||
Dim DicRowCheckli As New List(Of Integer)
|
||||
For Each Index In xe.ChildNodes
|
||||
axe = CType(Index, XmlElement)
|
||||
Dim rowTag As New TableRowTag
|
||||
rowTag.G_DevModeName = axe.Attributes.GetNamedItem("DevName").InnerText
|
||||
rowTag.G_DevNodeName = axe.Attributes.GetNamedItem("DataType").InnerText
|
||||
rowTag.G_DevNodeIndex = axe.Attributes.GetNamedItem("Name").InnerText
|
||||
rowTag.G_KeyType = JsonConvert.DeserializeObject(Of List(Of String))(axe.Attributes.GetNamedItem("KeyType").InnerText)
|
||||
rowTag.G_DicRow = JsonConvert.DeserializeObject(Of Dictionary(Of Integer, String))(axe.Attributes.GetNamedItem("DicRow").InnerText)
|
||||
If axe.Attributes.Count = 7 Then
|
||||
DicRowCheckli = JsonConvert.DeserializeObject(Of List(Of Integer))(axe.Attributes.GetNamedItem("DicRowCheck").InnerText)
|
||||
End If
|
||||
|
||||
Dic_ActionConfiguration.Add(rowTag)
|
||||
|
||||
Dic_Dgrid.AddItem("")
|
||||
For Each coltxt In rowTag.G_DicRow
|
||||
|
||||
If coltxt.Key = 6 Then
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, coltxt.Key).Tag = JsonConvert.DeserializeObject(Of String)(axe.Attributes.GetNamedItem("Tag").InnerText)
|
||||
Dim celltag As Dictionary(Of String, String) = JsonConvert.DeserializeObject(Of Dictionary(Of String, String))(Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, coltxt.Key).Tag)
|
||||
If Not IsNothing(celltag) AndAlso celltag.ContainsKey("CallRow") AndAlso Not String.IsNullOrEmpty(celltag.Item("CallRow")) Then
|
||||
' Dic_Dgrid.Row(Dic_Dgrid.Rows - 1)
|
||||
rowlockli.Add(Dic_Dgrid.Rows - 1)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If coltxt.Key = 3 Then
|
||||
Dim maxSceneID = CInt(coltxt.Value)
|
||||
If G_SceneID < maxSceneID Then
|
||||
G_SceneID = maxSceneID
|
||||
End If
|
||||
End If
|
||||
If coltxt.Value.Contains("*") Then
|
||||
Dim g_devname As New CtabRange(Dic_Dgrid, 2, coltxt.Key)
|
||||
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, coltxt.Key).Text = EstimateFilag(coltxt.Value, g_devname.devname)
|
||||
Else
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, coltxt.Key).Text = coltxt.Value
|
||||
End If
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, coltxt.Key).ForeColor = Color.Black
|
||||
Next
|
||||
|
||||
Dim rname As String = GetgrdRange(Dic_Dgrid, Dic_Dgrid.Rows - 2, 1, 1)
|
||||
|
||||
If rowTag.G_DevNodeName.Equals("HOSTSERVICE") Then
|
||||
If rname.Equals(rowTag.G_DevNodeName) Then
|
||||
With Dic_Dgrid.Range(Dic_Dgrid.Rows - 2, 1, Dic_Dgrid.Rows - 1, 1)
|
||||
.WrapText = True
|
||||
.Locked = False
|
||||
.Merge()
|
||||
.Locked = True
|
||||
End With
|
||||
Else
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, 1).Text = "HOSTSERVICE"
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
If rname.Equals(rowTag.G_DevModeName) Then
|
||||
With Dic_Dgrid.Range(Dic_Dgrid.Rows - 2, 1, Dic_Dgrid.Rows - 1, 1)
|
||||
.WrapText = True
|
||||
.Locked = False
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, 1).Text = rowTag.G_DevModeName
|
||||
|
||||
.Merge()
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, 1).Text = rowTag.G_DevModeName
|
||||
|
||||
.Locked = True
|
||||
End With
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, 1).Text = rowTag.G_DevModeName
|
||||
|
||||
Else
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, 1).Text = rowTag.G_DevModeName
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If rowTag.G_DevNodeName.Equals("语音") Then
|
||||
Dic_Dgrid.Row(Dic_Dgrid.Rows - 1).Locked = True
|
||||
End If
|
||||
|
||||
For Each cIndex In DicRowCheckli
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, cIndex).BackColor = Color.OrangeRed
|
||||
Dic_Dgrid.Cell(Dic_Dgrid.Rows - 1, cIndex).ForeColor = Color.DarkRed
|
||||
Next
|
||||
|
||||
Next
|
||||
|
||||
For Each index In rowlockli
|
||||
Dic_Dgrid.Row(index).Locked = True
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
Dic_Dgrid.Range(6, 0, Dic_Dgrid.Rows - 1, Dic_Dgrid.Cols - 1).Alignment = AlignmentEnum.CenterCenter
|
||||
Dic_Dgrid.Range(7, 6, Dic_Dgrid.Rows - 1, Dic_Dgrid.Cols - 1).CellType = CellTypeEnum.ComboBox
|
||||
Dic_Dgrid.Range(7, 2, Dic_Dgrid.Rows - 1, 2).CellType = CellTypeEnum.CheckBox
|
||||
G_SceneID = G_SceneID + 1
|
||||
|
||||
Case Else
|
||||
Throw New Exception($"LoadXml untreated localName:{xe.LocalName}")
|
||||
End Select
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Function EstimateFilag(cellstr As String, nodename As String) As String
|
||||
|
||||
If String.IsNullOrEmpty(cellstr) OrElse String.IsNullOrEmpty(nodename) Then Return String.Empty
|
||||
Dim tbuf() As String = cellstr.Split(vbLf)
|
||||
Dim cbuf() As String = tbuf(0).Split(",")
|
||||
If cbuf.Length < 2 Then Return String.Empty
|
||||
Dim buf() As String = cbuf(cbuf.Length - 1).Split("*")
|
||||
Dim result As String = String.Empty
|
||||
Select Case nodename
|
||||
Case "CLED_FRESHAIR"
|
||||
'result = "CLED新风"
|
||||
Case "CLEDFLOORHEAT"
|
||||
'result = $"{buf(3)}"
|
||||
Case "485FloorHeat", "485FreshAir"
|
||||
If buf.Length > 3 Then
|
||||
cbuf = buf(3).Split(" ")
|
||||
result = $"{cbuf(cbuf.Length - 1)}"
|
||||
End If
|
||||
|
||||
'Case
|
||||
'result = $"{buf(3)}"
|
||||
Case "485MUSIC"
|
||||
result = cellstr
|
||||
'Case
|
||||
|
||||
' result = $"{buf(3)}"
|
||||
Case "INFRARED_FORWARD"
|
||||
If buf.Length = 3 Then
|
||||
|
||||
cbuf = buf(2).Split(" ")
|
||||
result = $"{cbuf(cbuf.Length - 1)}"
|
||||
ElseIf buf.Length > 3 Then
|
||||
cbuf = buf(2).Split(" ")
|
||||
result = $"{cbuf(cbuf.Length - 1)}"
|
||||
cbuf = buf(3).Split(" ")
|
||||
'result = $"{cbuf(cbuf.Length - 1)}"
|
||||
result = $"{result}:{cbuf(cbuf.Length - 1)}"
|
||||
End If
|
||||
|
||||
'Case
|
||||
Case "RELAY"
|
||||
|
||||
If buf.Length > 2 Then
|
||||
cbuf = buf(2).Split(" ")
|
||||
result = $"{cbuf(cbuf.Length - 1)}"
|
||||
If result.Equals("开") Then
|
||||
result = Chr(TableColSwitchKeyDate.TurnOn).ToString()
|
||||
ElseIf result.Equals("关") Then
|
||||
result = Chr(TableColSwitchKeyDate.TurnDrown).ToString()
|
||||
End If
|
||||
End If
|
||||
Case "Dimming"
|
||||
|
||||
If buf.Length > 2 Then
|
||||
cbuf = buf(2).Split(" ")
|
||||
result = $"{cbuf(cbuf.Length - 1)}"
|
||||
If result.Equals("80") Then
|
||||
result = Chr(TableColSwitchKeyDate.TurnOn).ToString()
|
||||
ElseIf result.Equals("0") Then
|
||||
result = Chr(TableColSwitchKeyDate.TurnDrown).ToString()
|
||||
End If
|
||||
End If
|
||||
Case "PB_LINE_CONTROL", "PB_STRIP_DEVICE", "PB_LED_DEVICE"
|
||||
result = cellstr
|
||||
If buf.Length > 3 AndAlso tbuf(0).Contains("PB灯带亮度控制") Then
|
||||
cbuf = buf(3).Split(" ")
|
||||
result = $"{cbuf(cbuf.Length - 1)}"
|
||||
If result.Equals("80") Then
|
||||
result = Chr(TableColSwitchKeyDate.TurnOn).ToString()
|
||||
ElseIf result.Equals("0") Then
|
||||
result = Chr(TableColSwitchKeyDate.TurnDrown).ToString()
|
||||
End If
|
||||
End If
|
||||
|
||||
Case "DO", "LIGHT", "DRY_CURTAIN", "RS485_Curtain", "CURTAIN"
|
||||
If buf.Length > 2 Then
|
||||
cbuf = buf(2).Split(" ")
|
||||
result = $"{cbuf(cbuf.Length - 1)}"
|
||||
End If
|
||||
|
||||
Case "MUSIC"
|
||||
result = cellstr
|
||||
'Case
|
||||
' result = $"{buf(2)}"
|
||||
'Case
|
||||
' result = $"{buf(2)}"
|
||||
Case "Temp"
|
||||
If buf.Length > 5 Then
|
||||
'cbuf = buf(3).Split(" ")
|
||||
'result = $"{cbuf(cbuf.Length - 1)}"
|
||||
cbuf = buf(4).Split(" ")
|
||||
result = $"{cbuf(cbuf.Length - 1)}"
|
||||
cbuf = buf(5).Split(" ")
|
||||
result = $"{result}{cbuf(cbuf.Length - 1)}"
|
||||
End If
|
||||
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
Return result
|
||||
End Function
|
||||
|
||||
Public Function GetgrdRange(grd As Grid, r As Integer, c As Integer, selectstr As Integer) As String
|
||||
Dim result As String = String.Empty
|
||||
With grd.Range(r, c, r, c)
|
||||
Select Case selectstr
|
||||
Case 1
|
||||
result = grd.Cell(.FirstRow, .FirstCol).Text
|
||||
Case 2
|
||||
result = .FirstCol
|
||||
Case 3
|
||||
result = .LastCol
|
||||
Case 4
|
||||
result = .FirstRow
|
||||
Case 5
|
||||
result = .LastRow
|
||||
End Select
|
||||
Return result
|
||||
|
||||
End With
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
338
BLV_Studio/Test/GridTest/ExecutionCondition.Designer.vb
generated
Normal file
338
BLV_Studio/Test/GridTest/ExecutionCondition.Designer.vb
generated
Normal file
@@ -0,0 +1,338 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class ExecutionCondition
|
||||
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.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Label7 = New System.Windows.Forms.Label()
|
||||
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.Cob_CarryOutType = New System.Windows.Forms.ComboBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Cob_KeyType = New System.Windows.Forms.ComboBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.SplitContainer4 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Table_Grid1 = New FlexCell.Grid()
|
||||
Me.chushen_Grid = New FlexCell.Grid()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.SplitContainer3 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer2.Panel1.SuspendLayout()
|
||||
Me.SplitContainer2.Panel2.SuspendLayout()
|
||||
Me.SplitContainer2.SuspendLayout()
|
||||
CType(Me.SplitContainer4, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer4.Panel1.SuspendLayout()
|
||||
Me.SplitContainer4.Panel2.SuspendLayout()
|
||||
Me.SplitContainer4.SuspendLayout()
|
||||
CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer3.Panel1.SuspendLayout()
|
||||
Me.SplitContainer3.Panel2.SuspendLayout()
|
||||
Me.SplitContainer3.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label7)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.ComboBox2)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label6)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label5)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.ComboBox1)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Cob_CarryOutType)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label1)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Cob_KeyType)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label2)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.SplitContainer2)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(1204, 622)
|
||||
Me.SplitContainer1.SplitterDistance = 40
|
||||
Me.SplitContainer1.TabIndex = 18
|
||||
'
|
||||
'Label7
|
||||
'
|
||||
Me.Label7.Location = New System.Drawing.Point(710, 3)
|
||||
Me.Label7.Name = "Label7"
|
||||
Me.Label7.Size = New System.Drawing.Size(74, 24)
|
||||
Me.Label7.TabIndex = 28
|
||||
Me.Label7.Text = "Key type:"
|
||||
Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'ComboBox2
|
||||
'
|
||||
Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox2.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox2.FormattingEnabled = True
|
||||
Me.ComboBox2.Location = New System.Drawing.Point(790, 3)
|
||||
Me.ComboBox2.Name = "ComboBox2"
|
||||
Me.ComboBox2.Size = New System.Drawing.Size(121, 24)
|
||||
Me.ComboBox2.TabIndex = 27
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.Location = New System.Drawing.Point(507, 3)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(74, 24)
|
||||
Me.Label6.TabIndex = 26
|
||||
Me.Label6.Text = "Parallel scenario:"
|
||||
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label5.Location = New System.Drawing.Point(917, 5)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(284, 24)
|
||||
Me.Label5.TabIndex = 25
|
||||
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(587, 3)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(121, 24)
|
||||
Me.ComboBox1.TabIndex = 24
|
||||
'
|
||||
'Cob_CarryOutType
|
||||
'
|
||||
Me.Cob_CarryOutType.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Cob_CarryOutType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.Cob_CarryOutType.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Cob_CarryOutType.FormattingEnabled = True
|
||||
Me.Cob_CarryOutType.Location = New System.Drawing.Point(305, 0)
|
||||
Me.Cob_CarryOutType.Name = "Cob_CarryOutType"
|
||||
Me.Cob_CarryOutType.Size = New System.Drawing.Size(196, 29)
|
||||
Me.Cob_CarryOutType.TabIndex = 20
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Label1.Font = New System.Drawing.Font("宋体", 11.0!)
|
||||
Me.Label1.Location = New System.Drawing.Point(230, 0)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(75, 40)
|
||||
Me.Label1.TabIndex = 23
|
||||
Me.Label1.Text = "Execution mode:"
|
||||
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Cob_KeyType
|
||||
'
|
||||
Me.Cob_KeyType.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Cob_KeyType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.Cob_KeyType.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Cob_KeyType.FormattingEnabled = True
|
||||
Me.Cob_KeyType.Location = New System.Drawing.Point(75, 0)
|
||||
Me.Cob_KeyType.Name = "Cob_KeyType"
|
||||
Me.Cob_KeyType.Size = New System.Drawing.Size(155, 29)
|
||||
Me.Cob_KeyType.TabIndex = 22
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Label2.Font = New System.Drawing.Font("宋体", 11.0!)
|
||||
Me.Label2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(75, 40)
|
||||
Me.Label2.TabIndex = 19
|
||||
Me.Label2.Text = "Key type:"
|
||||
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'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.SplitContainer4)
|
||||
'
|
||||
'SplitContainer2.Panel2
|
||||
'
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.Label3)
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.Button1)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(1204, 578)
|
||||
Me.SplitContainer2.SplitterDistance = 505
|
||||
Me.SplitContainer2.TabIndex = 18
|
||||
'
|
||||
'SplitContainer4
|
||||
'
|
||||
Me.SplitContainer4.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer4.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer4.Name = "SplitContainer4"
|
||||
'
|
||||
'SplitContainer4.Panel1
|
||||
'
|
||||
Me.SplitContainer4.Panel1.Controls.Add(Me.Table_Grid1)
|
||||
'
|
||||
'SplitContainer4.Panel2
|
||||
'
|
||||
Me.SplitContainer4.Panel2.Controls.Add(Me.chushen_Grid)
|
||||
Me.SplitContainer4.Size = New System.Drawing.Size(1204, 505)
|
||||
Me.SplitContainer4.SplitterDistance = 360
|
||||
Me.SplitContainer4.TabIndex = 19
|
||||
'
|
||||
'Table_Grid1
|
||||
'
|
||||
Me.Table_Grid1.Cols = 5
|
||||
Me.Table_Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Table_Grid1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Table_Grid1.ExtendLastCol = True
|
||||
Me.Table_Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Table_Grid1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Table_Grid1.MouseWheelSpeed = CType(3, Short)
|
||||
Me.Table_Grid1.Name = "Table_Grid1"
|
||||
Me.Table_Grid1.Size = New System.Drawing.Size(360, 505)
|
||||
Me.Table_Grid1.TabIndex = 17
|
||||
'
|
||||
'chushen_Grid
|
||||
'
|
||||
Me.chushen_Grid.Cols = 5
|
||||
Me.chushen_Grid.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.chushen_Grid.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.chushen_Grid.ExtendLastCol = True
|
||||
Me.chushen_Grid.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.chushen_Grid.Location = New System.Drawing.Point(0, 0)
|
||||
Me.chushen_Grid.MouseWheelSpeed = CType(3, Short)
|
||||
Me.chushen_Grid.Name = "chushen_Grid"
|
||||
Me.chushen_Grid.Size = New System.Drawing.Size(840, 505)
|
||||
Me.chushen_Grid.TabIndex = 18
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Label3.Font = New System.Drawing.Font("宋体", 11.0!)
|
||||
Me.Label3.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(352, 69)
|
||||
Me.Label3.TabIndex = 24
|
||||
Me.Label3.Text = "Execution mode:"
|
||||
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.Button1.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Button1.Location = New System.Drawing.Point(1018, 0)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(186, 69)
|
||||
Me.Button1.TabIndex = 22
|
||||
Me.Button1.Text = "OK"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'SplitContainer3
|
||||
'
|
||||
Me.SplitContainer3.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer3.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer3.Name = "SplitContainer3"
|
||||
Me.SplitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer3.Panel1
|
||||
'
|
||||
Me.SplitContainer3.Panel1.Controls.Add(Me.Label4)
|
||||
'
|
||||
'SplitContainer3.Panel2
|
||||
'
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.SplitContainer1)
|
||||
Me.SplitContainer3.Size = New System.Drawing.Size(1204, 661)
|
||||
Me.SplitContainer3.SplitterDistance = 35
|
||||
Me.SplitContainer3.TabIndex = 19
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Label4.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label4.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(1204, 35)
|
||||
Me.Label4.TabIndex = 24
|
||||
Me.Label4.Text = "Scene attribute"
|
||||
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'ExecutionCondition
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1204, 661)
|
||||
Me.Controls.Add(Me.SplitContainer3)
|
||||
Me.ForeColor = System.Drawing.SystemColors.ControlText
|
||||
Me.Name = "ExecutionCondition"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer2.ResumeLayout(False)
|
||||
Me.SplitContainer4.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer4.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer4, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer4.ResumeLayout(False)
|
||||
Me.SplitContainer3.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer3.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer3.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents Table_Grid1 As FlexCell.Grid
|
||||
Friend WithEvents Cob_CarryOutType As ComboBox
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents Cob_KeyType As ComboBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents SplitContainer2 As SplitContainer
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents SplitContainer3 As SplitContainer
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents chushen_Grid As FlexCell.Grid
|
||||
Friend WithEvents SplitContainer4 As SplitContainer
|
||||
Friend WithEvents ComboBox1 As ComboBox
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents Label6 As Label
|
||||
Friend WithEvents Label7 As Label
|
||||
Friend WithEvents ComboBox2 As ComboBox
|
||||
End Class
|
||||
@@ -0,0 +1,194 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class ExecutionCondition
|
||||
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.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Cob_CarryOutType = New System.Windows.Forms.ComboBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Cob_KeyType = New System.Windows.Forms.ComboBox()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Table_Grid1 = New FlexCell.Grid()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer2.Panel1.SuspendLayout()
|
||||
Me.SplitContainer2.Panel2.SuspendLayout()
|
||||
Me.SplitContainer2.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Cob_CarryOutType)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label1)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Cob_KeyType)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label2)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.SplitContainer2)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(671, 552)
|
||||
Me.SplitContainer1.SplitterDistance = 30
|
||||
Me.SplitContainer1.TabIndex = 18
|
||||
'
|
||||
'Cob_CarryOutType
|
||||
'
|
||||
Me.Cob_CarryOutType.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Cob_CarryOutType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.Cob_CarryOutType.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Cob_CarryOutType.FormattingEnabled = True
|
||||
Me.Cob_CarryOutType.Location = New System.Drawing.Point(305, 0)
|
||||
Me.Cob_CarryOutType.Name = "Cob_CarryOutType"
|
||||
Me.Cob_CarryOutType.Size = New System.Drawing.Size(196, 29)
|
||||
Me.Cob_CarryOutType.TabIndex = 20
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Label1.Font = New System.Drawing.Font("宋体", 11.0!)
|
||||
Me.Label1.Location = New System.Drawing.Point(230, 0)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(75, 30)
|
||||
Me.Label1.TabIndex = 23
|
||||
Me.Label1.Text = "执行方式:"
|
||||
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Cob_KeyType
|
||||
'
|
||||
Me.Cob_KeyType.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Cob_KeyType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.Cob_KeyType.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Cob_KeyType.FormattingEnabled = True
|
||||
Me.Cob_KeyType.Location = New System.Drawing.Point(75, 0)
|
||||
Me.Cob_KeyType.Name = "Cob_KeyType"
|
||||
Me.Cob_KeyType.Size = New System.Drawing.Size(155, 29)
|
||||
Me.Cob_KeyType.TabIndex = 22
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Label2.Font = New System.Drawing.Font("宋体", 11.0!)
|
||||
Me.Label2.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(75, 30)
|
||||
Me.Label2.TabIndex = 19
|
||||
Me.Label2.Text = "按键类型:"
|
||||
Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'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.Table_Grid1)
|
||||
'
|
||||
'SplitContainer2.Panel2
|
||||
'
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.Label3)
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.Button1)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(671, 518)
|
||||
Me.SplitContainer2.SplitterDistance = 455
|
||||
Me.SplitContainer2.TabIndex = 18
|
||||
'
|
||||
'Table_Grid1
|
||||
'
|
||||
Me.Table_Grid1.CheckedImage = Nothing
|
||||
Me.Table_Grid1.Cols = 5
|
||||
Me.Table_Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Table_Grid1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Table_Grid1.ExtendLastCol = True
|
||||
Me.Table_Grid1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Table_Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Table_Grid1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Table_Grid1.Name = "Table_Grid1"
|
||||
Me.Table_Grid1.Size = New System.Drawing.Size(671, 455)
|
||||
Me.Table_Grid1.TabIndex = 17
|
||||
Me.Table_Grid1.UncheckedImage = Nothing
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.Dock = System.Windows.Forms.DockStyle.Left
|
||||
Me.Label3.Font = New System.Drawing.Font("宋体", 11.0!)
|
||||
Me.Label3.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(352, 59)
|
||||
Me.Label3.TabIndex = 24
|
||||
Me.Label3.Text = "执行方式:"
|
||||
Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Dock = System.Windows.Forms.DockStyle.Right
|
||||
Me.Button1.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Button1.Location = New System.Drawing.Point(485, 0)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(186, 59)
|
||||
Me.Button1.TabIndex = 22
|
||||
Me.Button1.Text = "确定"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ExecutionCondition
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(671, 552)
|
||||
Me.Controls.Add(Me.SplitContainer1)
|
||||
Me.Name = "ExecutionCondition"
|
||||
Me.Text = "ExecutionCondition"
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer2.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents Table_Grid1 As FlexCell.Grid
|
||||
Friend WithEvents Cob_CarryOutType As ComboBox
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents Cob_KeyType As ComboBox
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents SplitContainer2 As SplitContainer
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents Label3 As Label
|
||||
End Class
|
||||
120
BLV_Studio/Test/GridTest/ExecutionCondition.resx
Normal file
120
BLV_Studio/Test/GridTest/ExecutionCondition.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>
|
||||
1499
BLV_Studio/Test/GridTest/ExecutionCondition.vb
Normal file
1499
BLV_Studio/Test/GridTest/ExecutionCondition.vb
Normal file
File diff suppressed because it is too large
Load Diff
155
BLV_Studio/Test/GridTest/MusicArrangement.Designer.vb
generated
Normal file
155
BLV_Studio/Test/GridTest/MusicArrangement.Designer.vb
generated
Normal file
@@ -0,0 +1,155 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class MusicArrangement
|
||||
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.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
|
||||
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox3 = New System.Windows.Forms.ComboBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(53, 51)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox1.TabIndex = 0
|
||||
'
|
||||
'ComboBox2
|
||||
'
|
||||
Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox2.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox2.FormattingEnabled = True
|
||||
Me.ComboBox2.Location = New System.Drawing.Point(429, 51)
|
||||
Me.ComboBox2.Name = "ComboBox2"
|
||||
Me.ComboBox2.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox2.TabIndex = 1
|
||||
'
|
||||
'ComboBox3
|
||||
'
|
||||
Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox3.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox3.FormattingEnabled = True
|
||||
Me.ComboBox3.Location = New System.Drawing.Point(245, 51)
|
||||
Me.ComboBox3.Name = "ComboBox3"
|
||||
Me.ComboBox3.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox3.TabIndex = 2
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(429, 109)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(130, 33)
|
||||
Me.Button1.TabIndex = 3
|
||||
Me.Button1.Text = "OK"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TextBox1
|
||||
'
|
||||
Me.TextBox1.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TextBox1.Location = New System.Drawing.Point(53, 111)
|
||||
Me.TextBox1.Name = "TextBox1"
|
||||
Me.TextBox1.ReadOnly = True
|
||||
Me.TextBox1.Size = New System.Drawing.Size(370, 29)
|
||||
Me.TextBox1.TabIndex = 4
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Label1.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(581, 23)
|
||||
Me.Label1.TabIndex = 5
|
||||
Me.Label1.Text = "音乐"
|
||||
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(427, 36)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(53, 12)
|
||||
Me.Label2.TabIndex = 6
|
||||
Me.Label2.Text = "播放内容"
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(51, 36)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(53, 12)
|
||||
Me.Label3.TabIndex = 7
|
||||
Me.Label3.Text = "播放类型"
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.AutoSize = True
|
||||
Me.Label4.Location = New System.Drawing.Point(243, 36)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(53, 12)
|
||||
Me.Label4.TabIndex = 8
|
||||
Me.Label4.Text = "播放条件"
|
||||
'
|
||||
'MusicArrangement
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(581, 160)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.TextBox1)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.ComboBox3)
|
||||
Me.Controls.Add(Me.ComboBox2)
|
||||
Me.Controls.Add(Me.ComboBox1)
|
||||
Me.Name = "MusicArrangement"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Form1"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ComboBox1 As ComboBox
|
||||
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
|
||||
Friend WithEvents ComboBox2 As ComboBox
|
||||
Friend WithEvents ComboBox3 As ComboBox
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents TextBox1 As TextBox
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents Label4 As Label
|
||||
End Class
|
||||
@@ -0,0 +1,105 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class MusicArrangement
|
||||
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.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
|
||||
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox3 = New System.Windows.Forms.ComboBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(53, 51)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox1.TabIndex = 0
|
||||
'
|
||||
'ComboBox2
|
||||
'
|
||||
Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox2.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox2.FormattingEnabled = True
|
||||
Me.ComboBox2.Location = New System.Drawing.Point(429, 51)
|
||||
Me.ComboBox2.Name = "ComboBox2"
|
||||
Me.ComboBox2.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox2.TabIndex = 1
|
||||
'
|
||||
'ComboBox3
|
||||
'
|
||||
Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox3.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox3.FormattingEnabled = True
|
||||
Me.ComboBox3.Location = New System.Drawing.Point(245, 51)
|
||||
Me.ComboBox3.Name = "ComboBox3"
|
||||
Me.ComboBox3.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox3.TabIndex = 2
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(429, 109)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(130, 33)
|
||||
Me.Button1.TabIndex = 3
|
||||
Me.Button1.Text = "OK"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TextBox1
|
||||
'
|
||||
Me.TextBox1.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.TextBox1.Location = New System.Drawing.Point(53, 111)
|
||||
Me.TextBox1.Name = "TextBox1"
|
||||
Me.TextBox1.ReadOnly = True
|
||||
Me.TextBox1.Size = New System.Drawing.Size(370, 29)
|
||||
Me.TextBox1.TabIndex = 4
|
||||
'
|
||||
'MusicArrangement
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(581, 160)
|
||||
Me.Controls.Add(Me.TextBox1)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.ComboBox3)
|
||||
Me.Controls.Add(Me.ComboBox2)
|
||||
Me.Controls.Add(Me.ComboBox1)
|
||||
Me.Name = "MusicArrangement"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "Form1"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ComboBox1 As ComboBox
|
||||
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
|
||||
Friend WithEvents ComboBox2 As ComboBox
|
||||
Friend WithEvents ComboBox3 As ComboBox
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents TextBox1 As TextBox
|
||||
End Class
|
||||
123
BLV_Studio/Test/GridTest/MusicArrangement.resx
Normal file
123
BLV_Studio/Test/GridTest/MusicArrangement.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
186
BLV_Studio/Test/GridTest/MusicArrangement.vb
Normal file
186
BLV_Studio/Test/GridTest/MusicArrangement.vb
Normal file
@@ -0,0 +1,186 @@
|
||||
Public Class MusicArrangement
|
||||
Public basicClass As DeviceObjectClasses
|
||||
Private gMUSICdic As Dictionary(Of String, List(Of String))
|
||||
Private gcMUSICdic As Dictionary(Of String, List(Of String))
|
||||
Public GmusicVal As String = String.Empty
|
||||
Public G_input As String
|
||||
Private Sub MusicArrangement_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
gcMUSICdic = New Dictionary(Of String, List(Of String))
|
||||
gMUSICdic = New Dictionary(Of String, List(Of String))
|
||||
ComboBox1.Items.Clear()
|
||||
For Each basicClassnode In basicClass.DeviceClass
|
||||
If basicClassnode.Name.Equals("MUSIC") Then
|
||||
For Each basicClassnodeMUSIC In basicClassnode.Methods
|
||||
If basicClassnodeMUSIC.Params.Count >= 3 And basicClassnodeMUSIC.Name.IndexOf("播放") = 0 Then
|
||||
ComboBox1.Items.Add(basicClassnodeMUSIC.Params(1).DataRange)
|
||||
Dim li As New List(Of String)
|
||||
li.AddRange(basicClassnodeMUSIC.Params(0).DataRange.Split(","))
|
||||
gcMUSICdic.Add(basicClassnodeMUSIC.Params(1).DataRange, li)
|
||||
|
||||
Dim lic As New List(Of String)
|
||||
|
||||
|
||||
Select Case basicClassnodeMUSIC.Params(2).DataType
|
||||
Case "List"
|
||||
lic.AddRange(basicClassnodeMUSIC.Params(2).DataRange.Split(","))
|
||||
|
||||
Case "Integer"
|
||||
Dim dowmint As Integer = -1
|
||||
Dim upint As Integer = -1
|
||||
Dim intbuf() As String = basicClassnodeMUSIC.Params(2).DataRange.Split(",")
|
||||
Integer.TryParse(intbuf(0), dowmint)
|
||||
Integer.TryParse(intbuf(1), upint)
|
||||
If dowmint = -1 Or upint = -1 Then
|
||||
lic.Add(1)
|
||||
Else
|
||||
For i = dowmint To upint
|
||||
lic.Add(i)
|
||||
Next
|
||||
End If
|
||||
|
||||
End Select
|
||||
gMUSICdic.Add(basicClassnodeMUSIC.Params(1).DataRange, lic)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
ComboBox1.SelectedIndex = 0
|
||||
LoadInputText(G_input)
|
||||
End Sub
|
||||
|
||||
Private Sub LoadInputText(inputstr As String)
|
||||
If String.IsNullOrEmpty(inputstr) Then Return
|
||||
|
||||
Dim buf() As String = inputstr.Split(",")
|
||||
If buf.Length > 0 Then
|
||||
For i As Integer = 0 To ComboBox1.Items.Count - 1
|
||||
If ComboBox1.Items(i).ToString.Contains(buf(0)) Then
|
||||
ComboBox1.SelectedIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If buf.Length > 1 Then
|
||||
For i As Integer = 0 To ComboBox3.Items.Count - 1
|
||||
If ComboBox3.Items(i).ToString.Contains(buf(1)) Then
|
||||
ComboBox3.SelectedIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If buf.Length > 2 Then
|
||||
For i As Integer = 0 To ComboBox2.Items.Count - 1
|
||||
If ComboBox2.Items(i).ToString.Contains(buf(2)) Then
|
||||
ComboBox2.SelectedIndex = i
|
||||
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Shared Function CheckDataIsOk(datastr As String, gbasicClass As DeviceObjectClasses) As Boolean
|
||||
If String.IsNullOrEmpty(datastr) Then Return True
|
||||
Dim buf() As String = datastr.Split(",")
|
||||
If buf.Length <> 3 Then Return False
|
||||
Dim intbuf(2) As Integer
|
||||
If Not (Integer.TryParse(buf(0), intbuf(0)) And Integer.TryParse(buf(1), intbuf(1)) And Integer.TryParse(buf(2), intbuf(2))) Then Return False
|
||||
|
||||
For Each basicClassnode In gbasicClass.DeviceClass
|
||||
If basicClassnode.Name.Equals("MUSIC") Then
|
||||
For Each basicClassnodeMUSIC In basicClassnode.Methods
|
||||
If basicClassnodeMUSIC.Params.Count >= 3 And basicClassnodeMUSIC.Name.IndexOf("播放") = 0 Then
|
||||
|
||||
|
||||
If basicClassnodeMUSIC.Params(1).DataRange.IndexOf(intbuf(0).ToString) = 0 Then
|
||||
Dim abuf() As String = basicClassnodeMUSIC.Params(0).DataRange.Split(",")
|
||||
For Each astr In abuf
|
||||
If astr.IndexOf(intbuf(1).ToString) = 0 Then
|
||||
Select Case basicClassnodeMUSIC.Params(2).DataType
|
||||
Case "List"
|
||||
Dim aintbuf() As String = basicClassnodeMUSIC.Params(2).DataRange.Split(",")
|
||||
For Each bbuf In aintbuf
|
||||
If bbuf.IndexOf(intbuf(0).ToString) = 0 Then Return True
|
||||
Next
|
||||
Return False
|
||||
|
||||
Case "Integer"
|
||||
Dim aintbuf() As String = basicClassnodeMUSIC.Params(2).DataRange.Split(",")
|
||||
Dim aup, adown As Integer
|
||||
If Not (Integer.TryParse(aintbuf(0), adown) And Integer.TryParse(aintbuf(1), aup)) Then Return False
|
||||
|
||||
If adown <= intbuf(2) And intbuf(2) <= aup Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
End Select
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
Return False
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Close()
|
||||
Return
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
|
||||
ComboBox3.Items.Clear()
|
||||
ComboBox3.Items.AddRange(gcMUSICdic.Item(ComboBox1.Text).ToArray)
|
||||
ComboBox3.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.SelectedIndexChanged
|
||||
ComboBox2.Items.Clear()
|
||||
ComboBox2.Items.AddRange(gMUSICdic.Item(ComboBox1.Text).ToArray)
|
||||
ComboBox2.SelectedIndex = 0
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
|
||||
Dim strbuf() As String = ComboBox1.Text.Split(" ")
|
||||
Dim name As String = String.Empty
|
||||
Dim kval As String = String.Empty
|
||||
If strbuf.Length > 1 Then
|
||||
name = $"{name}{ strbuf(0).Trim},"
|
||||
kval = $"{kval}{ strbuf(1).Trim},"
|
||||
Else
|
||||
name = $"{name}{ strbuf(0).Trim},"
|
||||
kval = $"{kval}{ strbuf(0).Trim}"
|
||||
End If
|
||||
strbuf = ComboBox3.Text.Split(" ")
|
||||
If strbuf.Length > 1 Then
|
||||
name = $"{name}{ strbuf(0).Trim},"
|
||||
kval = $"{kval}{ strbuf(1).Trim},"
|
||||
|
||||
Else
|
||||
name = $"{name}{ strbuf(0).Trim},"
|
||||
kval = $"{kval}{ strbuf(0).Trim}"
|
||||
End If
|
||||
strbuf = ComboBox2.Text.Split(" ")
|
||||
If strbuf.Length > 1 Then
|
||||
name = $"{name}{ strbuf(0).Trim}"
|
||||
kval = $"{kval}{ strbuf(1).Trim}"
|
||||
Else
|
||||
name = $"{name}{ strbuf(0).Trim}"
|
||||
kval = $"{kval}{ strbuf(0).Trim}"
|
||||
|
||||
End If
|
||||
|
||||
TextBox1.Text = $"{kval }{vbCrLf }({name})"
|
||||
GmusicVal = name
|
||||
End Sub
|
||||
End Class
|
||||
37
BLV_Studio/Test/GridTest/MusicConfigt.Designer.vb
generated
Normal file
37
BLV_Studio/Test/GridTest/MusicConfigt.Designer.vb
generated
Normal file
@@ -0,0 +1,37 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class MusicConfigt
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form 重写 Dispose,以清理组件列表。
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Windows 窗体设计器所必需的
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'注意: 以下过程是 Windows 窗体设计器所必需的
|
||||
'可以使用 Windows 窗体设计器修改它。
|
||||
'不要使用代码编辑器修改它。
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'MusicConfigt
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(899, 658)
|
||||
Me.Name = "MusicConfigt"
|
||||
Me.Text = "MusicConfigt"
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
120
BLV_Studio/Test/GridTest/MusicConfigt.resx
Normal file
120
BLV_Studio/Test/GridTest/MusicConfigt.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>
|
||||
3
BLV_Studio/Test/GridTest/MusicConfigt.vb
Normal file
3
BLV_Studio/Test/GridTest/MusicConfigt.vb
Normal file
@@ -0,0 +1,3 @@
|
||||
Public Class MusicConfigt
|
||||
|
||||
End Class
|
||||
440
BLV_Studio/Test/GridTest/PowerSupply.Designer.vb
generated
Normal file
440
BLV_Studio/Test/GridTest/PowerSupply.Designer.vb
generated
Normal file
@@ -0,0 +1,440 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class PowerSupply
|
||||
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.SplitContainer1 = New System.Windows.Forms.SplitContainer()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.CheckBox5 = New System.Windows.Forms.CheckBox()
|
||||
Me.Button4 = New System.Windows.Forms.Button()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.TextBox1 = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.CheckBox3 = New System.Windows.Forms.CheckBox()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.CheckBox2 = New System.Windows.Forms.CheckBox()
|
||||
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
|
||||
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
|
||||
Me.SplitContainer3 = New System.Windows.Forms.SplitContainer()
|
||||
Me.PortTable = New FlexCell.Grid()
|
||||
Me.Button5 = New System.Windows.Forms.Button()
|
||||
Me.Button6 = New System.Windows.Forms.Button()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.NR_ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.NR_TextBox2 = New System.Windows.Forms.TextBox()
|
||||
Me.NR_label3 = New System.Windows.Forms.Label()
|
||||
Me.CheckBox4 = New System.Windows.Forms.CheckBox()
|
||||
Me.Button7 = New System.Windows.Forms.Button()
|
||||
Me.Button8 = New System.Windows.Forms.Button()
|
||||
Me.Button9 = New System.Windows.Forms.Button()
|
||||
Me.Button10 = New System.Windows.Forms.Button()
|
||||
Me.IfGrid = New FlexCell.Grid()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
Me.SplitContainer1.SuspendLayout()
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer2.Panel1.SuspendLayout()
|
||||
Me.SplitContainer2.Panel2.SuspendLayout()
|
||||
Me.SplitContainer2.SuspendLayout()
|
||||
CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer3.Panel1.SuspendLayout()
|
||||
Me.SplitContainer3.Panel2.SuspendLayout()
|
||||
Me.SplitContainer3.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'SplitContainer1
|
||||
'
|
||||
Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer1.Name = "SplitContainer1"
|
||||
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
|
||||
'
|
||||
'SplitContainer1.Panel1
|
||||
'
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label4)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.CheckBox5)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Button4)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label2)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.TextBox1)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Label1)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.CheckBox3)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.Button1)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.CheckBox2)
|
||||
Me.SplitContainer1.Panel1.Controls.Add(Me.CheckBox1)
|
||||
'
|
||||
'SplitContainer1.Panel2
|
||||
'
|
||||
Me.SplitContainer1.Panel2.Controls.Add(Me.SplitContainer2)
|
||||
Me.SplitContainer1.Size = New System.Drawing.Size(1260, 739)
|
||||
Me.SplitContainer1.SplitterDistance = 78
|
||||
Me.SplitContainer1.TabIndex = 1
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label4.ForeColor = System.Drawing.Color.Red
|
||||
Me.Label4.Location = New System.Drawing.Point(12, 10)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(895, 23)
|
||||
Me.Label4.TabIndex = 53
|
||||
Me.Label4.Text = "Note: The door magnet must be selected in the configuration of the door magnet lo" &
|
||||
"op"
|
||||
'
|
||||
'CheckBox5
|
||||
'
|
||||
Me.CheckBox5.AutoSize = True
|
||||
Me.CheckBox5.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox5.Location = New System.Drawing.Point(16, 43)
|
||||
Me.CheckBox5.Name = "CheckBox5"
|
||||
Me.CheckBox5.Size = New System.Drawing.Size(359, 25)
|
||||
Me.CheckBox5.TabIndex = 52
|
||||
Me.CheckBox5.Text = "Enable the power supply button"
|
||||
Me.CheckBox5.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button4
|
||||
'
|
||||
Me.Button4.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Button4.Location = New System.Drawing.Point(636, 34)
|
||||
Me.Button4.Name = "Button4"
|
||||
Me.Button4.Size = New System.Drawing.Size(125, 37)
|
||||
Me.Button4.TabIndex = 6
|
||||
Me.Button4.Text = "Cancel"
|
||||
Me.Button4.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Enabled = False
|
||||
Me.Label2.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label2.Location = New System.Drawing.Point(206, 81)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(40, 16)
|
||||
Me.Label2.TabIndex = 5
|
||||
Me.Label2.Text = "秒分"
|
||||
'
|
||||
'TextBox1
|
||||
'
|
||||
Me.TextBox1.Enabled = False
|
||||
Me.TextBox1.Location = New System.Drawing.Point(152, 80)
|
||||
Me.TextBox1.Name = "TextBox1"
|
||||
Me.TextBox1.Size = New System.Drawing.Size(48, 21)
|
||||
Me.TextBox1.TabIndex = 4
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Enabled = False
|
||||
Me.Label1.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label1.Location = New System.Drawing.Point(34, 81)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(112, 16)
|
||||
Me.Label1.TabIndex = 0
|
||||
Me.Label1.Text = "关门:关闭取电"
|
||||
'
|
||||
'CheckBox3
|
||||
'
|
||||
Me.CheckBox3.AutoSize = True
|
||||
Me.CheckBox3.Enabled = False
|
||||
Me.CheckBox3.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox3.Location = New System.Drawing.Point(36, 43)
|
||||
Me.CheckBox3.Name = "CheckBox3"
|
||||
Me.CheckBox3.Size = New System.Drawing.Size(440, 25)
|
||||
Me.CheckBox3.TabIndex = 3
|
||||
Me.CheckBox3.Text = "取电时还原上次拔卡场景 (仅限出租状态中)"
|
||||
Me.CheckBox3.UseVisualStyleBackColor = True
|
||||
Me.CheckBox3.Visible = False
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Button1.Location = New System.Drawing.Point(770, 35)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(125, 37)
|
||||
Me.Button1.TabIndex = 2
|
||||
Me.Button1.Text = "OK"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CheckBox2
|
||||
'
|
||||
Me.CheckBox2.AutoSize = True
|
||||
Me.CheckBox2.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox2.Location = New System.Drawing.Point(194, 12)
|
||||
Me.CheckBox2.Name = "CheckBox2"
|
||||
Me.CheckBox2.Size = New System.Drawing.Size(113, 25)
|
||||
Me.CheckBox2.TabIndex = 1
|
||||
Me.CheckBox2.Text = "有卡取电"
|
||||
Me.CheckBox2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'CheckBox1
|
||||
'
|
||||
Me.CheckBox1.AutoSize = True
|
||||
Me.CheckBox1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox1.Location = New System.Drawing.Point(36, 12)
|
||||
Me.CheckBox1.Name = "CheckBox1"
|
||||
Me.CheckBox1.Size = New System.Drawing.Size(113, 25)
|
||||
Me.CheckBox1.TabIndex = 0
|
||||
Me.CheckBox1.Text = "无卡取电"
|
||||
Me.CheckBox1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'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.SplitContainer3)
|
||||
'
|
||||
'SplitContainer2.Panel2
|
||||
'
|
||||
Me.SplitContainer2.Panel2.Controls.Add(Me.IfGrid)
|
||||
Me.SplitContainer2.Size = New System.Drawing.Size(1260, 657)
|
||||
Me.SplitContainer2.SplitterDistance = 216
|
||||
Me.SplitContainer2.TabIndex = 0
|
||||
'
|
||||
'SplitContainer3
|
||||
'
|
||||
Me.SplitContainer3.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.SplitContainer3.Location = New System.Drawing.Point(0, 0)
|
||||
Me.SplitContainer3.Name = "SplitContainer3"
|
||||
'
|
||||
'SplitContainer3.Panel1
|
||||
'
|
||||
Me.SplitContainer3.Panel1.Controls.Add(Me.PortTable)
|
||||
'
|
||||
'SplitContainer3.Panel2
|
||||
'
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.Button5)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.Button6)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.Button3)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.Button2)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.NR_ComboBox1)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.NR_TextBox2)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.NR_label3)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.CheckBox4)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.Button7)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.Button8)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.Button9)
|
||||
Me.SplitContainer3.Panel2.Controls.Add(Me.Button10)
|
||||
Me.SplitContainer3.Size = New System.Drawing.Size(1260, 216)
|
||||
Me.SplitContainer3.SplitterDistance = 754
|
||||
Me.SplitContainer3.TabIndex = 0
|
||||
'
|
||||
'PortTable
|
||||
'
|
||||
Me.PortTable.CheckedImage = Nothing
|
||||
Me.PortTable.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.PortTable.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.PortTable.ExtendLastCol = True
|
||||
Me.PortTable.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.PortTable.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.PortTable.Location = New System.Drawing.Point(0, 0)
|
||||
Me.PortTable.Name = "PortTable"
|
||||
Me.PortTable.Size = New System.Drawing.Size(754, 216)
|
||||
Me.PortTable.TabIndex = 1
|
||||
Me.PortTable.UncheckedImage = Nothing
|
||||
'
|
||||
'Button5
|
||||
'
|
||||
Me.Button5.Location = New System.Drawing.Point(287, 114)
|
||||
Me.Button5.Name = "Button5"
|
||||
Me.Button5.Size = New System.Drawing.Size(171, 46)
|
||||
Me.Button5.TabIndex = 3
|
||||
Me.Button5.Text = "Add condition group"
|
||||
Me.Button5.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button6
|
||||
'
|
||||
Me.Button6.Location = New System.Drawing.Point(21, 114)
|
||||
Me.Button6.Name = "Button6"
|
||||
Me.Button6.Size = New System.Drawing.Size(187, 46)
|
||||
Me.Button6.TabIndex = 2
|
||||
Me.Button6.Text = "Delete condition group" & Global.Microsoft.VisualBasic.ChrW(10)
|
||||
Me.Button6.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.Location = New System.Drawing.Point(287, 166)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(171, 38)
|
||||
Me.Button3.TabIndex = 1
|
||||
Me.Button3.Text = "Add condition"
|
||||
Me.Button3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Location = New System.Drawing.Point(21, 166)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(187, 38)
|
||||
Me.Button2.TabIndex = 0
|
||||
Me.Button2.Text = "Delete condition"
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'NR_ComboBox1
|
||||
'
|
||||
Me.NR_ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.NR_ComboBox1.Enabled = False
|
||||
Me.NR_ComboBox1.FormattingEnabled = True
|
||||
Me.NR_ComboBox1.Items.AddRange(New Object() {"秒", "分", "时"})
|
||||
Me.NR_ComboBox1.Location = New System.Drawing.Point(239, 42)
|
||||
Me.NR_ComboBox1.Name = "NR_ComboBox1"
|
||||
Me.NR_ComboBox1.Size = New System.Drawing.Size(41, 20)
|
||||
Me.NR_ComboBox1.TabIndex = 7
|
||||
'
|
||||
'NR_TextBox2
|
||||
'
|
||||
Me.NR_TextBox2.Enabled = False
|
||||
Me.NR_TextBox2.Location = New System.Drawing.Point(133, 41)
|
||||
Me.NR_TextBox2.MaxLength = 3
|
||||
Me.NR_TextBox2.Name = "NR_TextBox2"
|
||||
Me.NR_TextBox2.Size = New System.Drawing.Size(100, 21)
|
||||
Me.NR_TextBox2.TabIndex = 6
|
||||
Me.NR_TextBox2.Text = "30"
|
||||
'
|
||||
'NR_label3
|
||||
'
|
||||
Me.NR_label3.Enabled = False
|
||||
Me.NR_label3.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.NR_label3.Location = New System.Drawing.Point(3, 39)
|
||||
Me.NR_label3.Name = "NR_label3"
|
||||
Me.NR_label3.Size = New System.Drawing.Size(137, 23)
|
||||
Me.NR_label3.TabIndex = 5
|
||||
Me.NR_label3.Text = "Unmanned duration"
|
||||
Me.NR_label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||
'
|
||||
'CheckBox4
|
||||
'
|
||||
Me.CheckBox4.Font = New System.Drawing.Font("宋体", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.CheckBox4.Location = New System.Drawing.Point(2, 15)
|
||||
Me.CheckBox4.Name = "CheckBox4"
|
||||
Me.CheckBox4.Size = New System.Drawing.Size(355, 20)
|
||||
Me.CheckBox4.TabIndex = 4
|
||||
Me.CheckBox4.Text = "Whether continuous is enabled is unknown"
|
||||
Me.CheckBox4.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button7
|
||||
'
|
||||
Me.Button7.Location = New System.Drawing.Point(133, 137)
|
||||
Me.Button7.Name = "Button7"
|
||||
Me.Button7.Size = New System.Drawing.Size(75, 23)
|
||||
Me.Button7.TabIndex = 3
|
||||
Me.Button7.Text = "添加条件组"
|
||||
Me.Button7.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button8
|
||||
'
|
||||
Me.Button8.Location = New System.Drawing.Point(21, 137)
|
||||
Me.Button8.Name = "Button8"
|
||||
Me.Button8.Size = New System.Drawing.Size(75, 23)
|
||||
Me.Button8.TabIndex = 2
|
||||
Me.Button8.Text = "删除条件组"
|
||||
Me.Button8.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button9
|
||||
'
|
||||
Me.Button9.Location = New System.Drawing.Point(133, 171)
|
||||
Me.Button9.Name = "Button9"
|
||||
Me.Button9.Size = New System.Drawing.Size(75, 23)
|
||||
Me.Button9.TabIndex = 1
|
||||
Me.Button9.Text = "添加条件"
|
||||
Me.Button9.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Button10
|
||||
'
|
||||
Me.Button10.Location = New System.Drawing.Point(21, 171)
|
||||
Me.Button10.Name = "Button10"
|
||||
Me.Button10.Size = New System.Drawing.Size(75, 23)
|
||||
Me.Button10.TabIndex = 0
|
||||
Me.Button10.Text = "删除条件"
|
||||
Me.Button10.UseVisualStyleBackColor = True
|
||||
'
|
||||
'IfGrid
|
||||
'
|
||||
Me.IfGrid.CheckedImage = Nothing
|
||||
Me.IfGrid.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.IfGrid.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.IfGrid.ExtendLastCol = True
|
||||
Me.IfGrid.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.IfGrid.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.IfGrid.Location = New System.Drawing.Point(0, 0)
|
||||
Me.IfGrid.Name = "IfGrid"
|
||||
Me.IfGrid.Size = New System.Drawing.Size(1260, 437)
|
||||
Me.IfGrid.TabIndex = 1
|
||||
Me.IfGrid.UncheckedImage = Nothing
|
||||
'
|
||||
'PowerSupply
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1260, 739)
|
||||
Me.Controls.Add(Me.SplitContainer1)
|
||||
Me.Name = "PowerSupply"
|
||||
Me.Text = "无卡取电"
|
||||
Me.SplitContainer1.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer1.Panel1.PerformLayout()
|
||||
Me.SplitContainer1.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer2.Panel2.ResumeLayout(False)
|
||||
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer2.ResumeLayout(False)
|
||||
Me.SplitContainer3.Panel1.ResumeLayout(False)
|
||||
Me.SplitContainer3.Panel2.ResumeLayout(False)
|
||||
Me.SplitContainer3.Panel2.PerformLayout()
|
||||
CType(Me.SplitContainer3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.SplitContainer3.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents SplitContainer1 As SplitContainer
|
||||
Friend WithEvents CheckBox2 As CheckBox
|
||||
Friend WithEvents CheckBox1 As CheckBox
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents CheckBox3 As CheckBox
|
||||
Friend WithEvents TextBox1 As TextBox
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents SplitContainer2 As SplitContainer
|
||||
Friend WithEvents IfGrid As FlexCell.Grid
|
||||
Friend WithEvents SplitContainer3 As SplitContainer
|
||||
Friend WithEvents PortTable As FlexCell.Grid
|
||||
Protected WithEvents Button3 As Button
|
||||
Friend WithEvents Button2 As Button
|
||||
Friend WithEvents Button4 As Button
|
||||
Protected WithEvents Button5 As Button
|
||||
Friend WithEvents Button6 As Button
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents CheckBox5 As CheckBox
|
||||
Friend WithEvents NR_ComboBox1 As ComboBox
|
||||
Friend WithEvents NR_TextBox2 As TextBox
|
||||
Friend WithEvents NR_label3 As Label
|
||||
Friend WithEvents CheckBox4 As CheckBox
|
||||
Protected WithEvents Button7 As Button
|
||||
Friend WithEvents Button8 As Button
|
||||
Protected WithEvents Button9 As Button
|
||||
Friend WithEvents Button10 As Button
|
||||
End Class
|
||||
120
BLV_Studio/Test/GridTest/PowerSupply.resx
Normal file
120
BLV_Studio/Test/GridTest/PowerSupply.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>
|
||||
1289
BLV_Studio/Test/GridTest/PowerSupply.vb
Normal file
1289
BLV_Studio/Test/GridTest/PowerSupply.vb
Normal file
File diff suppressed because it is too large
Load Diff
438
BLV_Studio/Test/GridTest/ReportingScenario.vb
Normal file
438
BLV_Studio/Test/GridTest/ReportingScenario.vb
Normal file
@@ -0,0 +1,438 @@
|
||||
Imports FlexCell
|
||||
Public Class ReportingScenario
|
||||
|
||||
|
||||
|
||||
Sub New(_UserName As String, _HotleID As String, _RoomTypeID As String, filename As String, Version As String, grd As FlexCell.Grid, Devicemodel As Dictionary(Of String, DeviceModel), ActionConfiguration As List(Of TableRowTag))
|
||||
UserName = _UserName
|
||||
RoomTypeID = _RoomTypeID
|
||||
HotleID = _HotleID
|
||||
DevColList = New List(Of MTableSet)
|
||||
' DevRowList = New List(Of MTableSet)
|
||||
ConfigurationName = filename
|
||||
ConfigurationVersion = Version
|
||||
Tgrd = grd
|
||||
TDevicemodel = Devicemodel
|
||||
'Runing(grd, Devicemodel, ActionConfiguration)
|
||||
|
||||
End Sub
|
||||
'配置名称
|
||||
Public ConfigurationName As String
|
||||
'配置版本
|
||||
Public ConfigurationVersion As String
|
||||
Public HotleID As String
|
||||
Public RoomTypeID As String
|
||||
Public UserName As String
|
||||
Public Tgrd As FlexCell.Grid
|
||||
Public DevColList As List(Of MTableSet)
|
||||
Public TDevicemodel As Dictionary(Of String, DeviceModel)
|
||||
'列集合
|
||||
'{
|
||||
' 设备名
|
||||
' 设备节点集合
|
||||
' { 节点类型
|
||||
' 节点名
|
||||
' 节点下属回路集合 键值对 k:回路 v : 回路别名
|
||||
|
||||
' }
|
||||
|
||||
''}
|
||||
Public DevRowList As List(Of MTableSet)
|
||||
'行集合
|
||||
'{
|
||||
' 设备名
|
||||
'' 设备节点集合
|
||||
'' { 节点类型
|
||||
'' 节点名
|
||||
'' 节点下属回路集合 键值对 k:回路 v : 回路别名
|
||||
|
||||
'' }
|
||||
'}
|
||||
|
||||
|
||||
|
||||
#Region "数据处理"
|
||||
Public Function getDateDisposeRuning() As List(Of MDevNodeMessage)
|
||||
Return DateDisposeRuning(Tgrd, TDevicemodel)
|
||||
End Function
|
||||
Public Function DateDisposeRuning(_grd As FlexCell.Grid, _Devicemodel As Dictionary(Of String, DeviceModel)) As List(Of MDevNodeMessage)
|
||||
If IsNothing(_grd) Then Return Nothing
|
||||
Dim ACtabRange As CtabRange
|
||||
Dim rt As New RoomTypeConfig(RoomTypeID)
|
||||
Dim ot As String = "1"
|
||||
Dim result As New List(Of MDevNodeMessage)
|
||||
Dim dic As New Dictionary(Of String, MDevNodeMessage)
|
||||
Dim NodeLoopname As String
|
||||
Dim NCtabRange As CtabRange
|
||||
Dim NodeLoop As String = String.Empty
|
||||
For Each Dev In _Devicemodel '遍历设备
|
||||
|
||||
For Each DevNode In Dev.Value.Nodes '遍历设备下属子节点
|
||||
Dim devAddr As String = GetActionDeviceAddr(Dev.Value, DevNode.Name).ToString
|
||||
If DevNode.Interface.Equals("DO") OrElse DevNode.Interface.Equals("LIGHT") Then '判断是否为输出设备
|
||||
If DevNode.DEV_TYPE_DATA.Equals("4") Then '服务设备节点特殊处理
|
||||
|
||||
For ni As Integer = 0 To 14
|
||||
NodeLoopname = DevNode.Nodes.Item(ni).Name
|
||||
NodeLoop = DevNode.Nodes.Item(ni).LoopAddr
|
||||
NodeLoop = $"{DevNode.DEV_TYPE_DATA.PadLeft(3, "0")}{devAddr.PadLeft(3, "0")}{NodeLoop.PadLeft(3, "0")}"
|
||||
If dic.ContainsKey(NodeLoop) Then Continue For
|
||||
ot = Dev.Value.Name
|
||||
ot = ot.Replace(vbLf, "").Replace(vbCr, "").Replace(":", "").Replace("\", "").Replace("/", "").Replace("|", "").Replace("'", "").Replace("'", "").Replace("?", "").Replace("!", "").Replace("`", "")
|
||||
Dim datenode As New MDevNodeMessage(result.Count, NodeLoop, ot, NodeLoopname, DevNode.DEV_TYPE_DATA, rt)
|
||||
dic.Add(NodeLoop, datenode)
|
||||
result.Add(datenode)
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
For ri As Integer = TableInteraction.TableRowNumber.Max To _grd.Rows - 1 ' 遍历每行找到服务起始行
|
||||
ACtabRange = New CtabRange(_grd, ri, TableInteraction.TableColNumber.DeviceName)
|
||||
If ACtabRange.devname.Equals("HOSTSERVICE") Then '找到服务集合
|
||||
|
||||
For cj As Integer = ACtabRange.fr To ACtabRange.lr
|
||||
NodeLoopname = _grd.Cell(cj, TableInteraction.TableColNumber.KeyName).Text.Replace(vbLf, "").Replace(vbCr, "").Replace(":", "").Replace("\", "").Replace("/", "").Replace("|", "").Replace("'", "").Replace("'", "").Replace("?", "").Replace("!", "").Replace("`", "")
|
||||
|
||||
NodeLoop = _grd.Cell(cj, TableInteraction.TableColNumber.KeyVal).Text
|
||||
NodeLoop = $"{DevNode.DEV_TYPE_DATA.PadLeft(3, "0")}{devAddr.PadLeft(3, "0")}{NodeLoop.PadLeft(3, "0")}"
|
||||
If dic.ContainsKey(NodeLoop) Then Continue For
|
||||
ot = Dev.Value.Name
|
||||
ot = ot.Replace(vbLf, "").Replace(vbCr, "").Replace(":", "").Replace("\", "").Replace("/", "").Replace("|", "").Replace("'", "").Replace("'", "").Replace("?", "").Replace("!", "").Replace("`", "")
|
||||
Dim datenode As New MDevNodeMessage(result.Count, NodeLoop, ot, NodeLoopname, DevNode.DEV_TYPE_DATA, rt)
|
||||
dic.Add(NodeLoop, datenode)
|
||||
result.Add(datenode)
|
||||
Next
|
||||
End If
|
||||
|
||||
Next
|
||||
Exit For '完成遍历退出服务输出的处理
|
||||
Else '正常输出节点
|
||||
For i As Integer = TableInteraction.TableColNumber.InsertColumn To _grd.Cols - 2
|
||||
ACtabRange = New CtabRange(_grd, TableInteraction.TableRowNumber.DeviceName, i)
|
||||
If ACtabRange.devname.Equals(Dev.Key) Then '在表格找到对应设备
|
||||
For j As Integer = ACtabRange.fc To ACtabRange.lc '遍历设备下属节点集合
|
||||
NCtabRange = New CtabRange(_grd, TableInteraction.TableRowNumber.FunctionName, j)
|
||||
If NCtabRange.devname.ToUpper.Equals("LIGHT") Then
|
||||
NCtabRange.devname = "DO"
|
||||
End If
|
||||
If NCtabRange.devname.ToUpper.Equals("DRY_CURTAIN") Then
|
||||
NCtabRange.devname = "CURTAIN"
|
||||
End If
|
||||
If DevNode.Name.ToUpper.Equals(NCtabRange.devname.ToUpper) Then '找到当前设备的当前节点
|
||||
For k = NCtabRange.fc To NCtabRange.lc '遍历当前节点下属回路集合
|
||||
If _grd.Column(k).Visible = True Then '过滤隐藏的回路
|
||||
NodeLoopname = _grd.Cell(TableInteraction.TableRowNumber.FunctionChildNodeAnother, k).Text.Replace(vbLf, "").Replace(vbCr, "").Replace(":", "").Replace("\", "").Replace("/", "").Replace("|", "").Replace("'", "").Replace("'", "").Replace("?", "").Replace("!", "").Replace("`", "")
|
||||
If DevNode.Nodes.Count = 1 Then
|
||||
NodeLoop = 0
|
||||
Else
|
||||
NodeLoop = _grd.Cell(TableInteraction.TableRowNumber.FunctionChildNodeID, k).Text
|
||||
End If
|
||||
|
||||
NodeLoop = $"{DevNode.DEV_TYPE_DATA.PadLeft(3, "0")}{devAddr.PadLeft(3, "0")}{NodeLoop.PadLeft(3, "0")}"
|
||||
If dic.ContainsKey(NodeLoop) Then Continue For
|
||||
ot = Dev.Value.Name
|
||||
ot = ot.Replace(vbLf, "").Replace(vbCr, "").Replace(":", "").Replace("\", "").Replace("/", "").Replace("|", "").Replace("'", "").Replace("'", "").Replace("`", "").Replace("?", "").Replace("!", "").Replace(" ", "")
|
||||
Dim datenode As New MDevNodeMessage(result.Count, NodeLoop, ot, NodeLoopname, DevNode.DEV_TYPE_DATA, rt)
|
||||
dic.Add(NodeLoop, datenode)
|
||||
result.Add(datenode)
|
||||
End If
|
||||
Next
|
||||
Exit For
|
||||
End If
|
||||
j = NCtabRange.lc
|
||||
Next
|
||||
Exit For
|
||||
End If
|
||||
i = ACtabRange.lc
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Return result
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
'Public Sub Runing(_grd As FlexCell.Grid, _Devicemodel As Dictionary(Of String, DeviceModel), _ActionConfiguration As List(Of TableRowTag))
|
||||
|
||||
' If IsNothing(_grd) Then Return
|
||||
' Dim nodename As String = String.Empty
|
||||
|
||||
' Dim ACtabRange As CtabRange
|
||||
' Dim NCtabRange As CtabRange
|
||||
' Dim CdevMode As DeviceModel
|
||||
' Dim CdevModeNode As DeviceChildNodeClass
|
||||
' Dim AnotherName As String = String.Empty
|
||||
' Dim Result As String = String.Empty
|
||||
' Dim NodeLoop As String = String.Empty
|
||||
' Dim NodeLoopname As String = String.Empty
|
||||
' Dim scene As String = String.Empty
|
||||
' For i As Integer = TableInteraction.TableColNumber.InsertColumn To _grd.Cols - 2
|
||||
' ACtabRange = New CtabRange(_grd, TableInteraction.TableRowNumber.DeviceName, i)
|
||||
' '遍历设备
|
||||
' If Not String.IsNullOrEmpty(ACtabRange.devname) AndAlso _Devicemodel.ContainsKey(ACtabRange.devname) Then
|
||||
' CdevMode = _Devicemodel.Item(ACtabRange.devname)
|
||||
' Dim nMTableSet As New MTableSet(ACtabRange.devname)
|
||||
' DevColList.Add(nMTableSet)
|
||||
' '遍历设备节点
|
||||
' For j As Integer = ACtabRange.fc To ACtabRange.lc
|
||||
' NCtabRange = New CtabRange(_grd, TableInteraction.TableRowNumber.FunctionName, j)
|
||||
' CdevModeNode = Nothing
|
||||
' For Each index In CdevMode.Nodes
|
||||
' If index.Name.Equals(NCtabRange.devname) Then
|
||||
' CdevModeNode = index
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' If Not IsNothing(CdevModeNode) Then
|
||||
' Result = CdevModeNode.DEV_TYPE_DATA.PadLeft(3, "0")
|
||||
|
||||
' Dim Mdnm As New MDevNodeMessage(CdevModeNode.Name, Result)
|
||||
' nMTableSet.DevNode.Add(Mdnm)
|
||||
' '遍历遍历设备节点下属回路
|
||||
' For k = NCtabRange.fc To NCtabRange.lc
|
||||
' If _grd.Column(k).Visible = True Then
|
||||
' Dim dic As New Dictionary(Of String, String)
|
||||
' NodeLoop = _grd.Cell(TableInteraction.TableRowNumber.FunctionChildNodeID, k).Text
|
||||
' NodeLoopname = _grd.Cell(TableInteraction.TableRowNumber.FunctionChildNodeAnother, k).Text
|
||||
' If Mdnm.DevNodeDic.ContainsKey(NodeLoop) Then
|
||||
' Continue For
|
||||
' Else
|
||||
' dic.Add("回路别名", NodeLoopname)
|
||||
' Mdnm.DevNodeDic.Add(NodeLoop, dic)
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
' j = NCtabRange.lc
|
||||
' Next
|
||||
|
||||
' End If
|
||||
' i = ACtabRange.lc
|
||||
' Next
|
||||
' Dim rowtag As TableRowTag
|
||||
' For i As Integer = TableInteraction.TableRowNumber.Max To _grd.Rows - 1
|
||||
' ACtabRange = New CtabRange(_grd, i, TableInteraction.TableColNumber.DeviceName)
|
||||
' If ACtabRange.devname.Equals("HOSTSERVICE") Then
|
||||
' ACtabRange.devname = _Devicemodel.Keys(0)
|
||||
' End If
|
||||
|
||||
' If Not String.IsNullOrEmpty(ACtabRange.devname) AndAlso (_Devicemodel.ContainsKey(ACtabRange.devname)) Then
|
||||
' CdevMode = _Devicemodel.Item(ACtabRange.devname)
|
||||
' Dim nMTableSet As New MTableSet(ACtabRange.devname)
|
||||
' DevRowList.Add(nMTableSet)
|
||||
' '遍历设备
|
||||
' For j As Integer = ACtabRange.fr To ACtabRange.lr
|
||||
|
||||
' If j >= TableInteraction.TableRowNumber.Max AndAlso (i - TableInteraction.TableRowNumber.Max < _ActionConfiguration.Count) Then
|
||||
' rowtag = _ActionConfiguration.Item(j - TableInteraction.TableRowNumber.Max)
|
||||
' CdevModeNode = Nothing
|
||||
' For Each index In CdevMode.Nodes
|
||||
' If index.Name.Equals(rowtag.G_DevNodeName) Then
|
||||
' CdevModeNode = index
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' If Not IsNothing(CdevModeNode) Then
|
||||
' Result = CdevModeNode.DEV_TYPE_DATA.PadLeft(3, "0")
|
||||
' NodeLoop = _grd.Cell(j, TableInteraction.TableColNumber.KeyVal).Text
|
||||
' Dim Tisbol As Boolean = True
|
||||
' For Each Tindex In nMTableSet.DevNode
|
||||
' If Tindex.DevNodeName.Equals(CdevModeNode.Name) AndAlso Tindex.DevNodeDic.ContainsKey(NodeLoop) Then
|
||||
' Tisbol = False
|
||||
' Continue For
|
||||
' End If
|
||||
' Next
|
||||
' If Tisbol = False Then Continue For
|
||||
|
||||
' Dim Mdnm As New MDevNodeMessage(CdevModeNode.Name, Result)
|
||||
' nMTableSet.DevNode.Add(Mdnm)
|
||||
' '遍历遍历设备节点下属回路
|
||||
|
||||
' If _grd.Row(j).Visible = True Then
|
||||
' Dim dic As New Dictionary(Of String, String)
|
||||
|
||||
' NodeLoopname = _grd.Cell(j, TableInteraction.TableColNumber.KeyName).Text
|
||||
' scene = _grd.Cell(j, TableInteraction.TableColNumber.SceneID).Text
|
||||
' If Mdnm.DevNodeDic.ContainsKey(NodeLoop) Then
|
||||
' Continue For
|
||||
' Else
|
||||
' dic.Add("回路别名", NodeLoopname)
|
||||
' dic.Add("场景号", scene)
|
||||
' Mdnm.DevNodeDic.Add(NodeLoop, dic)
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
' End If
|
||||
' i = ACtabRange.lr
|
||||
' Next
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
'Public Sub Runing(_grd As FlexCell.Grid, _Devicemodel As Dictionary(Of String, DeviceModel), _ActionConfiguration As List(Of TableRowTag))
|
||||
' If IsNothing(_grd) Then Return
|
||||
' Dim ACtabRange As CtabRange
|
||||
' Dim NCtabRange As CtabRange
|
||||
' Dim NodeLoopname As String
|
||||
' Dim NodeLoop As String = String.Empty
|
||||
' For Each Dev In _Devicemodel '遍历设备
|
||||
' Dim nMTableSet As New MTableSet(Dev.Key)
|
||||
' DevColList.Add(nMTableSet)
|
||||
' For Each DevNode In Dev.Value.Nodes '遍历设备下属子节点
|
||||
' If DevNode.Interface.Equals("DO") Then '判断是否为输出设备
|
||||
' If DevNode.DEV_TYPE_DATA.Equals("4") Then '服务设备节点特殊处理
|
||||
' For ri As Integer = TableInteraction.TableRowNumber.Max To _grd.Rows - 1 ' 遍历每行找到服务起始行
|
||||
' ACtabRange = New CtabRange(_grd, ri, TableInteraction.TableColNumber.DeviceName)
|
||||
' If ACtabRange.devname.Equals("HOSTSERVICE") Then '找到服务集合
|
||||
' Dim devAddr As String = GetActionDeviceAddr(Dev.Value, DevNode.Name).ToString
|
||||
' Dim devnodename As String = TableInteraction.GetAnotherName(DevNode.Name)
|
||||
' Dim MDevNode As New MDevNodeMessage(devAddr, devnodename, DevNode.DEV_TYPE_DATA)
|
||||
' nMTableSet.DevNode.Add(MDevNode)
|
||||
' For cj As Integer = ACtabRange.fr To ACtabRange.lr '遍历服务集合
|
||||
' NodeLoopname = _grd.Cell(cj, TableInteraction.TableColNumber.KeyName).Text
|
||||
' NodeLoop = _grd.Cell(cj, TableInteraction.TableColNumber.KeyVal).Text
|
||||
' If MDevNode.DevNodeDic.ContainsKey(NodeLoop) Then
|
||||
' Continue For
|
||||
' Else
|
||||
' Dim dic As New Dictionary(Of String, String)
|
||||
' dic.Add("回路别名", NodeLoopname)
|
||||
' dic.Add("回路地址", NodeLoop)
|
||||
' MDevNode.DevNodeDic.Add(NodeLoop, dic)
|
||||
' End If
|
||||
|
||||
|
||||
' Next
|
||||
' Exit For '完成遍历退出服务输出的处理
|
||||
' End If
|
||||
' Next
|
||||
' Else '正常输出节点
|
||||
' For i As Integer = TableInteraction.TableColNumber.InsertColumn To _grd.Cols - 2
|
||||
' ACtabRange = New CtabRange(_grd, TableInteraction.TableRowNumber.DeviceName, i)
|
||||
' If ACtabRange.devname.Equals(Dev.Key) Then '在表格找到对应设备
|
||||
' For j As Integer = ACtabRange.fc To ACtabRange.lc '遍历设备下属节点集合
|
||||
' NCtabRange = New CtabRange(_grd, TableInteraction.TableRowNumber.FunctionName, j)
|
||||
' If DevNode.Name.Equals(NCtabRange.devname) Then '找到当前设备的当前节点
|
||||
' Dim devAddr As String = GetActionDeviceAddr(Dev.Value, DevNode.Name).ToString
|
||||
' Dim devnodename As String = TableInteraction.GetAnotherName(DevNode.Name)
|
||||
' Dim MDevNode As New MDevNodeMessage(devAddr, devnodename, DevNode.DEV_TYPE_DATA)
|
||||
' nMTableSet.DevNode.Add(MDevNode)
|
||||
' For k = NCtabRange.fc To NCtabRange.lc '遍历当前节点下属回路集合
|
||||
' NodeLoopname = String.Empty
|
||||
' If _grd.Column(k).Visible = True Then '过滤隐藏的回路
|
||||
' NodeLoopname = _grd.Cell(TableInteraction.TableRowNumber.FunctionChildNodeAnother, k).Text
|
||||
' NodeLoop = _grd.Cell(TableInteraction.TableRowNumber.FunctionChildNodeID, k).Text
|
||||
' Dim dic As New Dictionary(Of String, String)
|
||||
' dic.Add("回路别名", NodeLoopname)
|
||||
' dic.Add("回路地址", NodeLoop)
|
||||
' MDevNode.DevNodeDic.Add(NodeLoop, dic)
|
||||
|
||||
|
||||
' End If
|
||||
' Next
|
||||
|
||||
|
||||
' Exit For
|
||||
' End If
|
||||
' j = NCtabRange.lc
|
||||
' Next
|
||||
' Exit For
|
||||
' End If
|
||||
' i = ACtabRange.lc
|
||||
' Next
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
' Next
|
||||
|
||||
|
||||
|
||||
|
||||
'End Sub
|
||||
|
||||
Private Function GetActionDeviceAddr(Dev As DeviceModel, DevNodeName As String) As Integer
|
||||
|
||||
For Each index In Dev.Config
|
||||
|
||||
If index.Name.Equals($"{DevNodeName }设备组信息") Then
|
||||
For Each node In index.Attributes
|
||||
If node.Name.Equals("DeviceAddr") Then
|
||||
Return CInt(node.DataDefault)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
If index.Name.Equals($"设备存在") Then
|
||||
For Each node In index.Attributes
|
||||
If node.Name.Equals("拨码地址") Then
|
||||
Return CInt(node.Value)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
Return -1
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MTableSet
|
||||
|
||||
Public Sub New(name As String)
|
||||
DevNode = New List(Of MDevNodeMessage)
|
||||
DevName = name
|
||||
End Sub
|
||||
' 设备名
|
||||
Public DevName As String
|
||||
' 设备下所有输出节点
|
||||
Public DevNode As List(Of MDevNodeMessage)
|
||||
End Class
|
||||
Public Class MDevNodeMessage
|
||||
Public Sub New(addr As String, NodeName As String, NodeType As String)
|
||||
|
||||
End Sub
|
||||
Public Sub New(yid As Integer, Ma As String, ol As String, Nm As String, Ty As String, RTy As RoomTypeConfig)
|
||||
ID = yid
|
||||
ModalAddress = Ma
|
||||
outlet = ol
|
||||
Name = Nm
|
||||
Type = Ty
|
||||
RoomType = RTy
|
||||
End Sub
|
||||
|
||||
'序号
|
||||
Dim ID As Integer
|
||||
' 设备地址
|
||||
Public ModalAddress As String
|
||||
'设备输出节点名
|
||||
Public outlet As String
|
||||
'设备输出节点类型
|
||||
Public Name As String
|
||||
'设备输出节点下所有回路和相关信息
|
||||
Public Type As String
|
||||
Public RoomType As RoomTypeConfig
|
||||
End Class
|
||||
Public Class RoomTypeConfig
|
||||
Sub New(tID As String)
|
||||
ID = tID
|
||||
End Sub
|
||||
Public ID As String
|
||||
|
||||
End Class
|
||||
3
BLV_Studio/Test/GridTest/RuleChecking.vb
Normal file
3
BLV_Studio/Test/GridTest/RuleChecking.vb
Normal file
@@ -0,0 +1,3 @@
|
||||
Public Class RuleChecking
|
||||
|
||||
End Class
|
||||
3
BLV_Studio/Test/GridTest/RuleDetection.vb
Normal file
3
BLV_Studio/Test/GridTest/RuleDetection.vb
Normal file
@@ -0,0 +1,3 @@
|
||||
Public Class RuleDetection
|
||||
|
||||
End Class
|
||||
230
BLV_Studio/Test/GridTest/ServiceAttribute.Designer.vb
generated
Normal file
230
BLV_Studio/Test/GridTest/ServiceAttribute.Designer.vb
generated
Normal file
@@ -0,0 +1,230 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class ServiceAttribute
|
||||
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.Button1 = New System.Windows.Forms.Button()
|
||||
Me.ComboBox3 = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.ComboBox4 = New System.Windows.Forms.ComboBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.Label6 = New System.Windows.Forms.Label()
|
||||
Me.Button2 = New System.Windows.Forms.Button()
|
||||
Me.Table_Grid1 = New FlexCell.Grid()
|
||||
Me.Button3 = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(486, 433)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(142, 33)
|
||||
Me.Button1.TabIndex = 8
|
||||
Me.Button1.Text = "OK"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ComboBox3
|
||||
'
|
||||
Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox3.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox3.FormattingEnabled = True
|
||||
Me.ComboBox3.Location = New System.Drawing.Point(12, 50)
|
||||
Me.ComboBox3.Name = "ComboBox3"
|
||||
Me.ComboBox3.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox3.TabIndex = 7
|
||||
Me.ComboBox3.Visible = False
|
||||
'
|
||||
'ComboBox2
|
||||
'
|
||||
Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox2.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox2.FormattingEnabled = True
|
||||
Me.ComboBox2.Location = New System.Drawing.Point(198, 50)
|
||||
Me.ComboBox2.Name = "ComboBox2"
|
||||
Me.ComboBox2.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox2.TabIndex = 6
|
||||
Me.ComboBox2.Visible = False
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(427, 50)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(201, 29)
|
||||
Me.ComboBox1.TabIndex = 5
|
||||
Me.ComboBox1.Visible = False
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(199, 35)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label3.TabIndex = 12
|
||||
Me.Label3.Text = "打开方式:"
|
||||
Me.Label3.Visible = False
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(332, 35)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label2.TabIndex = 11
|
||||
Me.Label2.Text = "服务类型:"
|
||||
Me.Label2.Visible = False
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(10, 35)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label1.TabIndex = 10
|
||||
Me.Label1.Text = "延时时间:"
|
||||
Me.Label1.Visible = False
|
||||
'
|
||||
'ComboBox4
|
||||
'
|
||||
Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox4.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox4.FormattingEnabled = True
|
||||
Me.ComboBox4.Location = New System.Drawing.Point(148, 50)
|
||||
Me.ComboBox4.Name = "ComboBox4"
|
||||
Me.ComboBox4.Size = New System.Drawing.Size(44, 29)
|
||||
Me.ComboBox4.TabIndex = 13
|
||||
Me.ComboBox4.Visible = False
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Label4.Location = New System.Drawing.Point(12, 94)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(363, 33)
|
||||
Me.Label4.TabIndex = 14
|
||||
Me.Label4.Text = "延时时间:"
|
||||
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
Me.Label4.Visible = False
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Location = New System.Drawing.Point(146, 35)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(35, 12)
|
||||
Me.Label5.TabIndex = 15
|
||||
Me.Label5.Text = "单位:"
|
||||
Me.Label5.Visible = False
|
||||
'
|
||||
'Label6
|
||||
'
|
||||
Me.Label6.Dock = System.Windows.Forms.DockStyle.Top
|
||||
Me.Label6.Font = New System.Drawing.Font("宋体", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Label6.Location = New System.Drawing.Point(0, 0)
|
||||
Me.Label6.Name = "Label6"
|
||||
Me.Label6.Size = New System.Drawing.Size(656, 33)
|
||||
Me.Label6.TabIndex = 16
|
||||
Me.Label6.Text = "Service attribute"
|
||||
Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Button2
|
||||
'
|
||||
Me.Button2.Location = New System.Drawing.Point(486, 36)
|
||||
Me.Button2.Name = "Button2"
|
||||
Me.Button2.Size = New System.Drawing.Size(142, 33)
|
||||
Me.Button2.TabIndex = 17
|
||||
Me.Button2.Text = "Add service"
|
||||
Me.Button2.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Table_Grid1
|
||||
'
|
||||
Me.Table_Grid1.CheckedImage = Nothing
|
||||
Me.Table_Grid1.Cols = 5
|
||||
Me.Table_Grid1.CommentWindowWidth = CType(100, Short)
|
||||
Me.Table_Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Table_Grid1.DisplayRowNumber = True
|
||||
Me.Table_Grid1.ExtendLastCol = True
|
||||
Me.Table_Grid1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Table_Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Table_Grid1.Location = New System.Drawing.Point(12, 36)
|
||||
Me.Table_Grid1.Name = "Table_Grid1"
|
||||
Me.Table_Grid1.Size = New System.Drawing.Size(468, 430)
|
||||
Me.Table_Grid1.TabIndex = 18
|
||||
Me.Table_Grid1.UncheckedImage = Nothing
|
||||
'
|
||||
'Button3
|
||||
'
|
||||
Me.Button3.Location = New System.Drawing.Point(486, 75)
|
||||
Me.Button3.Name = "Button3"
|
||||
Me.Button3.Size = New System.Drawing.Size(142, 33)
|
||||
Me.Button3.TabIndex = 19
|
||||
Me.Button3.Text = "Delete service"
|
||||
Me.Button3.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ServiceAttribute
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(656, 517)
|
||||
Me.Controls.Add(Me.Button3)
|
||||
Me.Controls.Add(Me.Table_Grid1)
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.Label6)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.ComboBox4)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.ComboBox3)
|
||||
Me.Controls.Add(Me.ComboBox2)
|
||||
Me.Controls.Add(Me.ComboBox1)
|
||||
Me.Name = "ServiceAttribute"
|
||||
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||
Me.Text = "ServiceAttribute"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents ComboBox3 As ComboBox
|
||||
Friend WithEvents ComboBox2 As ComboBox
|
||||
Friend WithEvents ComboBox1 As ComboBox
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents ComboBox4 As ComboBox
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents Label6 As Label
|
||||
Friend WithEvents Button2 As Button
|
||||
Friend WithEvents Table_Grid1 As FlexCell.Grid
|
||||
Friend WithEvents Button3 As Button
|
||||
End Class
|
||||
@@ -0,0 +1,151 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class ServiceAttribute
|
||||
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.Button1 = New System.Windows.Forms.Button()
|
||||
Me.ComboBox3 = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
|
||||
Me.ComboBox1 = New System.Windows.Forms.ComboBox()
|
||||
Me.Label3 = New System.Windows.Forms.Label()
|
||||
Me.Label2 = New System.Windows.Forms.Label()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.ComboBox4 = New System.Windows.Forms.ComboBox()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
Me.Button1.Location = New System.Drawing.Point(395, 117)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(142, 33)
|
||||
Me.Button1.TabIndex = 8
|
||||
Me.Button1.Text = "OK"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ComboBox3
|
||||
'
|
||||
Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox3.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox3.FormattingEnabled = True
|
||||
Me.ComboBox3.Location = New System.Drawing.Point(357, 40)
|
||||
Me.ComboBox3.Name = "ComboBox3"
|
||||
Me.ComboBox3.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox3.TabIndex = 7
|
||||
'
|
||||
'ComboBox2
|
||||
'
|
||||
Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox2.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox2.FormattingEnabled = True
|
||||
Me.ComboBox2.Location = New System.Drawing.Point(194, 40)
|
||||
Me.ComboBox2.Name = "ComboBox2"
|
||||
Me.ComboBox2.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox2.TabIndex = 6
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(31, 40)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(130, 29)
|
||||
Me.ComboBox1.TabIndex = 5
|
||||
'
|
||||
'Label3
|
||||
'
|
||||
Me.Label3.AutoSize = True
|
||||
Me.Label3.Location = New System.Drawing.Point(195, 25)
|
||||
Me.Label3.Name = "Label3"
|
||||
Me.Label3.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label3.TabIndex = 12
|
||||
Me.Label3.Text = "打开方式:"
|
||||
'
|
||||
'Label2
|
||||
'
|
||||
Me.Label2.AutoSize = True
|
||||
Me.Label2.Location = New System.Drawing.Point(29, 25)
|
||||
Me.Label2.Name = "Label2"
|
||||
Me.Label2.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label2.TabIndex = 11
|
||||
Me.Label2.Text = "服务类型:"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(355, 25)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(59, 12)
|
||||
Me.Label1.TabIndex = 10
|
||||
Me.Label1.Text = "延时时间:"
|
||||
'
|
||||
'ComboBox4
|
||||
'
|
||||
Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
|
||||
Me.ComboBox4.Font = New System.Drawing.Font("宋体", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ComboBox4.FormattingEnabled = True
|
||||
Me.ComboBox4.Location = New System.Drawing.Point(493, 40)
|
||||
Me.ComboBox4.Name = "ComboBox4"
|
||||
Me.ComboBox4.Size = New System.Drawing.Size(44, 29)
|
||||
Me.ComboBox4.TabIndex = 13
|
||||
'
|
||||
'Label4
|
||||
'
|
||||
Me.Label4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
|
||||
Me.Label4.Location = New System.Drawing.Point(31, 117)
|
||||
Me.Label4.Name = "Label4"
|
||||
Me.Label4.Size = New System.Drawing.Size(293, 33)
|
||||
Me.Label4.TabIndex = 14
|
||||
Me.Label4.Text = "延时时间:"
|
||||
Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'ServiceAttribute
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(560, 183)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.ComboBox4)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.ComboBox3)
|
||||
Me.Controls.Add(Me.ComboBox2)
|
||||
Me.Controls.Add(Me.ComboBox1)
|
||||
Me.Name = "ServiceAttribute"
|
||||
Me.Text = "ServiceAttribute"
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents ComboBox3 As ComboBox
|
||||
Friend WithEvents ComboBox2 As ComboBox
|
||||
Friend WithEvents ComboBox1 As ComboBox
|
||||
Friend WithEvents Label3 As Label
|
||||
Friend WithEvents Label2 As Label
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents ComboBox4 As ComboBox
|
||||
Friend WithEvents Label4 As Label
|
||||
End Class
|
||||
120
BLV_Studio/Test/GridTest/ServiceAttribute.resx
Normal file
120
BLV_Studio/Test/GridTest/ServiceAttribute.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>
|
||||
398
BLV_Studio/Test/GridTest/ServiceAttribute.vb
Normal file
398
BLV_Studio/Test/GridTest/ServiceAttribute.vb
Normal file
@@ -0,0 +1,398 @@
|
||||
Imports System.ComponentModel
|
||||
Imports BLV_Studio.EnumExtend
|
||||
Imports FlexCell
|
||||
|
||||
Public Class ServiceAttribute
|
||||
|
||||
|
||||
Public G_hostNode As DeviceChildNodeClass
|
||||
|
||||
Public G_input As String
|
||||
|
||||
Private g_dicComboBox1 As Dictionary(Of String, String)
|
||||
|
||||
Public G_result As String
|
||||
Enum STcolname
|
||||
<Description("Input number")>
|
||||
行号 = 0
|
||||
<Description("Device alias")>
|
||||
延时
|
||||
<Description("backlight")>
|
||||
单位
|
||||
<Description("Open mode")>
|
||||
打开方式
|
||||
<Description("Service type")>
|
||||
服务类型
|
||||
<Description("Display service")>
|
||||
显示服务
|
||||
max
|
||||
End Enum
|
||||
|
||||
|
||||
|
||||
|
||||
Private Dic_1, Dic_2, Dic_3, Dic_4 As List(Of String)
|
||||
Private Sub ServiceAttribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
InitTable()
|
||||
If IsNothing(G_hostNode) Then
|
||||
MsgBox("未选择主机,请先选择主机再进行配置!")
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.Close()
|
||||
Return
|
||||
End If
|
||||
'服务方式
|
||||
Dic_1 = New List(Of String)
|
||||
'执行方式
|
||||
Dic_2 = New List(Of String)
|
||||
'时间
|
||||
Dic_3 = New List(Of String)
|
||||
'单位
|
||||
Dic_4 = New List(Of String)
|
||||
|
||||
For Each node In G_hostNode.Nodes
|
||||
Dic_1.Add($"{node.LoopAddr}:{node.Name }")
|
||||
Next
|
||||
Dic_2.AddRange({"2:close", "1:open"})
|
||||
For i = 0 To 255
|
||||
Dic_3.Add(i)
|
||||
Next
|
||||
Dic_4.AddRange({"ms", "s", "m", "H", "Day"})
|
||||
LoadInputText(G_input)
|
||||
|
||||
End Sub
|
||||
Public Shared Function CheckDataIsOk(datastr As String, hostNode As DeviceChildNodeClass) As Boolean
|
||||
If String.IsNullOrEmpty(datastr) Then Return True
|
||||
Dim buff() As String = datastr.Split(vbLf)
|
||||
Dim isok As Boolean
|
||||
For Each index In buff
|
||||
isok = False
|
||||
|
||||
Dim buf() As String = index.Split(",")
|
||||
If buf.Length <> 5 Then Return False
|
||||
Dim intbuf(3) As Integer
|
||||
If Not (Integer.TryParse(buf(0), intbuf(0)) And Integer.TryParse(buf(1), intbuf(1)) And Integer.TryParse(buf(2), intbuf(2)) And Integer.TryParse(buf(3), intbuf(3))) Then Return False
|
||||
If IsNothing(hostNode) Then Return False
|
||||
For Each node In hostNode.Nodes
|
||||
If node.LoopAddr.Equals(intbuf(0).ToString) Then
|
||||
isok = True
|
||||
If intbuf(1) = 2 OrElse intbuf(1) = 1 Then
|
||||
If intbuf(2) >= 0 OrElse intbuf(2) <= 255 Then
|
||||
If intbuf(3) >= 1 OrElse intbuf(3) <= 5 Then
|
||||
Exit For
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
|
||||
Next
|
||||
If isok Then
|
||||
Continue For
|
||||
End If
|
||||
Return False
|
||||
Next
|
||||
|
||||
Return True
|
||||
End Function
|
||||
Public Shared Function Getservername(datastr As String, hostNode As DeviceChildNodeClass) As String
|
||||
Dim result As String = String.Empty
|
||||
For Each node In hostNode.Nodes
|
||||
If node.LoopAddr.Equals(datastr) Then
|
||||
Return node.Name
|
||||
End If
|
||||
Next
|
||||
Return result
|
||||
End Function
|
||||
Private Sub LoadInputText(inputstr As String)
|
||||
If String.IsNullOrEmpty(inputstr) Then Return
|
||||
Dim buff() As String = inputstr.Split(vbLf)
|
||||
Dim C1, C2, C3, C4 As String
|
||||
|
||||
For Each index In buff
|
||||
C1 = String.Empty
|
||||
C2 = String.Empty
|
||||
C3 = String.Empty
|
||||
C4 = String.Empty
|
||||
Table_Grid1.AddItem("")
|
||||
|
||||
|
||||
Dim buf() As String = index.Split(",")
|
||||
If buf.Length > 0 Then
|
||||
For i As Integer = 0 To Dic_1.Count - 1
|
||||
If Dic_1(i).ToString.Contains(buf(0)) Then
|
||||
C1 = Dic_1(i)
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, STcolname.服务类型).Text = C1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If buf.Length > 1 Then
|
||||
For i As Integer = 0 To Dic_2.Count - 1
|
||||
If Dic_2(i).ToString.Contains(buf(1)) Then
|
||||
C2 = Dic_2(i)
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, STcolname.打开方式).Text = C2
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If buf.Length > 2 Then
|
||||
For i As Integer = 0 To Dic_3.Count - 1
|
||||
If Dic_3(i).ToString.Contains(buf(2)) Then
|
||||
C3 = Dic_3(i)
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, STcolname.延时).Text = C3
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If buf.Length > 3 Then
|
||||
Dim cbuf As String = FGetDelayUnit(buf(3))
|
||||
For i As Integer = 0 To Dic_4.Count - 1
|
||||
If Dic_4(i).ToString.Equals(cbuf) Then
|
||||
C4 = cbuf
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, STcolname.单位).Text = C4
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(C1) OrElse String.IsNullOrEmpty(C2) OrElse String.IsNullOrEmpty(C3) OrElse String.IsNullOrEmpty(C4) Then
|
||||
If String.IsNullOrEmpty(C1) Then
|
||||
Table_Grid1.Range(Table_Grid1.Rows - 1, STcolname.服务类型, Table_Grid1.Rows - 1, STcolname.服务类型).BackColor = Color.OrangeRed
|
||||
ElseIf String.IsNullOrEmpty(C2) Then
|
||||
Table_Grid1.Range(Table_Grid1.Rows - 1, STcolname.打开方式, Table_Grid1.Rows - 1, STcolname.打开方式).BackColor = Color.OrangeRed
|
||||
ElseIf String.IsNullOrEmpty(C3) Then
|
||||
Table_Grid1.Range(Table_Grid1.Rows - 1, STcolname.延时, Table_Grid1.Rows - 1, STcolname.延时).BackColor = Color.OrangeRed
|
||||
ElseIf String.IsNullOrEmpty(C4) Then
|
||||
Table_Grid1.Range(Table_Grid1.Rows - 1, STcolname.单位, Table_Grid1.Rows - 1, STcolname.单位).BackColor = Color.OrangeRed
|
||||
End If
|
||||
Continue For
|
||||
Else
|
||||
Table_Grid1.Range(Table_Grid1.Rows - 1, 0, Table_Grid1.Rows - 1, STcolname.服务类型).BackColor = Color.White
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function showSelectedIndexVal(c1 As String, c2 As String, c3 As String, c4 As String, c5 As String) As String
|
||||
Dim reslit As String = String.Empty
|
||||
Dim strbuf1() As String = c1.Split(":")
|
||||
Dim strbuf2() As String = c2.Split(":")
|
||||
Dim t As String = GetDelayUnit(c4)
|
||||
reslit = $"{strbuf1(0)},{strbuf2(0)},{c3},{t},{c5}"
|
||||
Return reslit
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
G_result = String.Empty
|
||||
Dim indexstr As String = String.Empty
|
||||
Dim C1, C2, C3, C5, C4 As String
|
||||
For i = 1 To Table_Grid1.Rows - 1
|
||||
C1 = Table_Grid1.Cell(i, STcolname.服务类型).Text.Trim
|
||||
C2 = Table_Grid1.Cell(i, STcolname.打开方式).Text.Trim
|
||||
C3 = Table_Grid1.Cell(i, STcolname.延时).Text.Trim
|
||||
C4 = Table_Grid1.Cell(i, STcolname.单位).Text.Trim
|
||||
C5 = Table_Grid1.Cell(i, STcolname.显示服务).Text.Trim
|
||||
If String.IsNullOrEmpty(C1) OrElse String.IsNullOrEmpty(C2) OrElse String.IsNullOrEmpty(C3) OrElse String.IsNullOrEmpty(C4) Then
|
||||
MsgBox($"添加服务数据异常,行号:{i}")
|
||||
If String.IsNullOrEmpty(C1) Then
|
||||
Table_Grid1.Range(i, STcolname.服务类型, i, STcolname.服务类型).BackColor = Color.OrangeRed
|
||||
|
||||
End If
|
||||
If String.IsNullOrEmpty(C2) Then
|
||||
Table_Grid1.Range(i, STcolname.打开方式, i, STcolname.打开方式).BackColor = Color.OrangeRed
|
||||
End If
|
||||
If String.IsNullOrEmpty(C3) Then
|
||||
Table_Grid1.Range(i, STcolname.延时, i, STcolname.延时).BackColor = Color.OrangeRed
|
||||
End If
|
||||
If String.IsNullOrEmpty(C4) Then
|
||||
Table_Grid1.Range(i, STcolname.单位, i, STcolname.单位).BackColor = Color.OrangeRed
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
indexstr = showSelectedIndexVal(C1, C2, C3, C4, C5)
|
||||
G_result = $"{G_result}{vbLf }{indexstr}"
|
||||
Next
|
||||
G_result = G_result.Trim
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Close()
|
||||
Return
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Function GetDelayUnit(str As String) As String
|
||||
Dim result As Integer
|
||||
Select Case str
|
||||
Case "ms"
|
||||
result = 1
|
||||
Case "s"
|
||||
result = 2
|
||||
Case "m"
|
||||
result = 3
|
||||
Case "H"
|
||||
result = 4
|
||||
Case "Day"
|
||||
result = 5
|
||||
Case Else
|
||||
result = 1
|
||||
End Select
|
||||
|
||||
Return result.ToString
|
||||
End Function
|
||||
Private Function FGetDelayUnit(str As String) As String
|
||||
Dim result As String = String.Empty
|
||||
Select Case str
|
||||
Case "1"
|
||||
result = "ms"
|
||||
Case "2"
|
||||
result = "s"
|
||||
Case "3"
|
||||
result = "m"
|
||||
Case "4"
|
||||
result = "H"
|
||||
Case "5"
|
||||
result = "Day"
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
|
||||
Return result.ToString
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
Table_Grid1.AddItem("")
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, STcolname.延时).Text = "0"
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, STcolname.单位).Text = "ms"
|
||||
Table_Grid1.Cell(Table_Grid1.Rows - 1, STcolname.打开方式).Text = "1:Open"
|
||||
End Sub
|
||||
|
||||
Private Sub Table_Grid1_CellChange(Sender As Object, e As Grid.CellChangeEventArgs) Handles Table_Grid1.CellChange
|
||||
If e.Row > 0 Then
|
||||
|
||||
If e.Col = STcolname.延时 Then
|
||||
If String.IsNullOrEmpty(Table_Grid1.Cell(e.Row, e.Col).Text) Then
|
||||
Table_Grid1.Cell(e.Row, e.Col).Text = 0
|
||||
Return
|
||||
End If
|
||||
For Each node In Dic_3
|
||||
If node.Equals(Table_Grid1.Cell(e.Row, e.Col).Text) Then
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
Table_Grid1.Cell(e.Row, e.Col).Text = 0
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If String.IsNullOrEmpty(Table_Grid1.Cell(e.Row, e.Col).Text) Then Return
|
||||
Table_Grid1.Cell(e.Row, e.Col).BackColor = Color.White
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub InitTable()
|
||||
Table_Grid1.Rows = 1
|
||||
Table_Grid1.Cols = STcolname.max
|
||||
Table_Grid1.ExtendLastCol = True
|
||||
For i = 0 To STcolname.max - 1
|
||||
Dim colorValue As STcolname = CType([Enum].Parse(GetType(STcolname), i), STcolname)
|
||||
Table_Grid1.Cell(0, i).Text = EnumExtender.GetEnumDescription(colorValue) ' [Enum].GetName(GetType(STcolname), i)
|
||||
Select Case i
|
||||
Case STcolname.行号
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 50
|
||||
'.Visible = True
|
||||
.Locked = True
|
||||
End With
|
||||
Case STcolname.延时
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 50
|
||||
.Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
.CellType = CellTypeEnum.ComboBox
|
||||
End With
|
||||
'Table_Grid1.ComboBox(i).Locked = True
|
||||
Case STcolname.单位
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 50
|
||||
.Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
.CellType = CellTypeEnum.ComboBox
|
||||
End With
|
||||
Table_Grid1.ComboBox(i).Locked = True
|
||||
Case STcolname.打开方式
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 80
|
||||
.Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
.CellType = CellTypeEnum.ComboBox
|
||||
End With
|
||||
Table_Grid1.ComboBox(i).Locked = True
|
||||
Case STcolname.服务类型
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 180
|
||||
.Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
.CellType = CellTypeEnum.ComboBox
|
||||
End With
|
||||
Table_Grid1.ComboBox(i).Locked = True
|
||||
Case STcolname.显示服务
|
||||
With Table_Grid1.Column(i)
|
||||
.Width = 30
|
||||
.Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
.CellType = CellTypeEnum.CheckBox
|
||||
End With
|
||||
|
||||
Case Else
|
||||
Exit For
|
||||
End Select
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
|
||||
If Table_Grid1.ActiveCell.Row > 0 Then
|
||||
Table_Grid1.Row(Table_Grid1.ActiveCell.Row).Delete()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Table_Grid1_ComboDropDown(Sender As Object, e As Grid.ComboDropDownEventArgs) Handles Table_Grid1.ComboDropDown
|
||||
If e.Row > 0 Then
|
||||
Table_Grid1.ComboBox(e.Col).Items.Clear()
|
||||
|
||||
Select Case e.Col
|
||||
Case STcolname.行号
|
||||
Return
|
||||
Case STcolname.延时
|
||||
Table_Grid1.ComboBox(e.Col).Items.AddRange(Dic_3.ToArray)
|
||||
Case STcolname.单位
|
||||
Table_Grid1.ComboBox(e.Col).Items.AddRange(Dic_4.ToArray)
|
||||
Case STcolname.打开方式
|
||||
Table_Grid1.ComboBox(e.Col).Items.AddRange(Dic_2.ToArray)
|
||||
Case STcolname.服务类型
|
||||
Table_Grid1.ComboBox(e.Col).Items.AddRange(Dic_1.ToArray)
|
||||
Case Else
|
||||
|
||||
End Select
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,223 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class ServiceAttribute
|
||||
|
||||
|
||||
Public G_hostNode As DeviceChildNodeClass
|
||||
|
||||
Public G_input As String
|
||||
|
||||
Private g_dicComboBox1 As Dictionary(Of String, String)
|
||||
Public G_result As String
|
||||
Private Sub ServiceAttribute_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
g_dicComboBox1 = New Dictionary(Of String, String)
|
||||
ComboBox1.Items.Clear() 'SelectedIndex+1
|
||||
|
||||
ComboBox2.Items.Clear()
|
||||
ComboBox3.Items.Clear()
|
||||
ComboBox4.Items.Clear() 'SelectedIndex+1
|
||||
|
||||
If Not IsNothing(G_hostNode) Then
|
||||
For Each node In G_hostNode.Nodes
|
||||
ComboBox1.Items.Add($"{node.LoopAddr}:{node.Name }")
|
||||
Next
|
||||
ComboBox1.SelectedIndex = 0
|
||||
Else
|
||||
MsgBox("为选择主机,请先选择主机再进行配置!")
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.Close()
|
||||
Return
|
||||
End If
|
||||
ComboBox2.Items.AddRange({"2:关闭", "1:打开"})
|
||||
ComboBox2.SelectedIndex = 1
|
||||
For i = 0 To 255
|
||||
ComboBox3.Items.Add(i)
|
||||
Next
|
||||
ComboBox3.SelectedIndex = 2
|
||||
ComboBox4.Items.AddRange({"ms", "s", "m", "h", "d"})
|
||||
ComboBox4.SelectedIndex = 0
|
||||
|
||||
|
||||
LoadInputText(G_input)
|
||||
|
||||
|
||||
|
||||
isloadok = True
|
||||
GetG_Result()
|
||||
End Sub
|
||||
Public Shared Function CheckDataIsOk(datastr As String, hostNode As DeviceChildNodeClass) As Boolean
|
||||
If String.IsNullOrEmpty(datastr) Then Return True
|
||||
Dim buf() As String = datastr.Split(",")
|
||||
If buf.Length <> 4 Then Return False
|
||||
Dim intbuf(3) As Integer
|
||||
If Not (Integer.TryParse(buf(0), intbuf(0)) And Integer.TryParse(buf(1), intbuf(1)) And Integer.TryParse(buf(2), intbuf(2)) And Integer.TryParse(buf(3), intbuf(3))) Then Return False
|
||||
If IsNothing(hostNode) Then Return False
|
||||
For Each node In hostNode.Nodes
|
||||
If node.LoopAddr.Equals(intbuf(0).ToString) Then
|
||||
|
||||
If intbuf(1) = 2 OrElse intbuf(1) = 1 Then
|
||||
If intbuf(2) >= 0 OrElse intbuf(2) <= 255 Then
|
||||
If intbuf(3) >= 1 OrElse intbuf(3) <= 5 Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
Public Shared Function Getservername(datastr As String, hostNode As DeviceChildNodeClass) As String
|
||||
Dim result As String = String.Empty
|
||||
For Each node In hostNode.Nodes
|
||||
If node.LoopAddr.Equals(datastr) Then
|
||||
Return node.Name
|
||||
End If
|
||||
Next
|
||||
Return result
|
||||
End Function
|
||||
Private Sub LoadInputText(inputstr As String)
|
||||
If String.IsNullOrEmpty(inputstr) Then Return
|
||||
|
||||
Dim buf() As String = inputstr.Split(",")
|
||||
If buf.Length > 0 Then
|
||||
For i As Integer = 0 To ComboBox1.Items.Count - 1
|
||||
If ComboBox1.Items(i).ToString.Contains(buf(0)) Then
|
||||
ComboBox1.SelectedIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If buf.Length > 1 Then
|
||||
For i As Integer = 0 To ComboBox2.Items.Count - 1
|
||||
If ComboBox2.Items(i).ToString.Contains(buf(1)) Then
|
||||
ComboBox2.SelectedIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If buf.Length > 2 Then
|
||||
For i As Integer = 0 To ComboBox3.Items.Count - 1
|
||||
If ComboBox3.Items(i).ToString.Contains(buf(2)) Then
|
||||
ComboBox3.SelectedIndex = i
|
||||
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If buf.Length > 3 Then
|
||||
Dim cbuf As String = FGetDelayUnit(buf(3))
|
||||
For i As Integer = 0 To ComboBox4.Items.Count - 1
|
||||
If ComboBox4.Items(i).ToString.Equals(cbuf) Then
|
||||
ComboBox4.SelectedIndex = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Public Sub showSelectedIndexVal()
|
||||
Dim strbuf() As String = ComboBox1.Text.Split(":")
|
||||
Dim name As String = String.Empty
|
||||
Dim kval As String = String.Empty
|
||||
If strbuf.Length > 1 Then
|
||||
name = $"{name}{ strbuf(0).Trim}," '1,
|
||||
kval = $"{kval}{ strbuf(1).Trim}," '服务,
|
||||
Else
|
||||
name = $"{name}{ strbuf(0).Trim}," ',
|
||||
kval = $"{kval}{ strbuf(0).Trim}" '
|
||||
End If
|
||||
strbuf = ComboBox2.Text.Split(" ")
|
||||
If strbuf.Length > 1 Then
|
||||
name = $"{name}{ strbuf(0).Trim},"
|
||||
kval = $"{kval}{ strbuf(1).Trim},"
|
||||
Else
|
||||
name = $"{name}{ strbuf(0).Trim},"
|
||||
kval = $"{kval}{ strbuf(0).Trim}"
|
||||
|
||||
End If
|
||||
|
||||
name = $"{name}{ComboBox3.Text}"
|
||||
kval = $"{kval}{ComboBox3.Text}"
|
||||
|
||||
name = $"{name}{ComboBox4.SelectedIndex + 1}"
|
||||
kval = $"{kval}{ComboBox4.Text}"
|
||||
'TextBox1.Text = $"{kval }:{name}"
|
||||
G_result = name
|
||||
End Sub
|
||||
|
||||
Public Sub Addg_dicComboBox1Inten(name As String)
|
||||
If g_dicComboBox1.ContainsKey(name) Then
|
||||
g_dicComboBox1.Item(name) = ComboBox1.Text
|
||||
Else
|
||||
g_dicComboBox1.Add(name, ComboBox1.Text)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private isloadok As Boolean = False
|
||||
Public Sub GetG_Result()
|
||||
If isloadok Then
|
||||
G_result = String.Empty
|
||||
Dim strbuf() As String = ComboBox1.Text.Trim.Split(":")
|
||||
Dim kettypebuf() As String = ComboBox2.Text.Trim.Split(":")
|
||||
G_result = $"{strbuf(0)},{kettypebuf(0)},{ComboBox3.Text },{GetDelayUnit(ComboBox4.Text)}"
|
||||
Label4.Text = $"{strbuf(1)},{kettypebuf(1)},延时,延时单位 {vbCrLf }({G_result})"
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Close()
|
||||
Return
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Function GetDelayUnit(str As String) As String
|
||||
Dim result As Integer
|
||||
Select Case str
|
||||
Case "ms"
|
||||
result = 1
|
||||
Case "s"
|
||||
result = 2
|
||||
Case "m"
|
||||
result = 3
|
||||
Case "h"
|
||||
result = 4
|
||||
Case "d"
|
||||
result = 5
|
||||
Case Else
|
||||
result = 1
|
||||
End Select
|
||||
|
||||
Return result.ToString
|
||||
End Function
|
||||
Private Function FGetDelayUnit(str As String) As String
|
||||
Dim result As String
|
||||
Select Case str
|
||||
Case "1"
|
||||
result = "ms"
|
||||
Case "2"
|
||||
result = "s"
|
||||
Case "3"
|
||||
result = "m"
|
||||
Case "4"
|
||||
result = "h"
|
||||
Case "5"
|
||||
result = "d"
|
||||
Case Else
|
||||
result = "ms"
|
||||
End Select
|
||||
|
||||
Return result.ToString
|
||||
End Function
|
||||
|
||||
Private Sub ComboBox1_TextChanged(sender As Object, e As EventArgs) Handles ComboBox4.TextChanged, ComboBox3.TextChanged, ComboBox2.TextChanged, ComboBox1.TextChanged
|
||||
GetG_Result()
|
||||
End Sub
|
||||
End Class
|
||||
7035
BLV_Studio/Test/GridTest/TableInteraction.vb
Normal file
7035
BLV_Studio/Test/GridTest/TableInteraction.vb
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
61
BLV_Studio/Test/GridTest/TableRowTag.vb
Normal file
61
BLV_Studio/Test/GridTest/TableRowTag.vb
Normal file
@@ -0,0 +1,61 @@
|
||||
Public Class TableRowTag
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 行数据集合
|
||||
''' </summary>
|
||||
Public G_DicRow As Dictionary(Of Integer, String)
|
||||
''' <summary>
|
||||
''' 设备模型名
|
||||
''' </summary>
|
||||
Public G_DevModeName As String
|
||||
Public G_DevNodeName As String
|
||||
Public G_DevNodeIndex As Integer
|
||||
''' <summary>
|
||||
''' 按键来类型
|
||||
''' </summary>
|
||||
Public G_KeyType As List(Of String)
|
||||
|
||||
|
||||
Sub New()
|
||||
G_DicRow = New Dictionary(Of Integer, String)
|
||||
G_KeyType = New List(Of String)
|
||||
End Sub
|
||||
|
||||
#Region "写入修改部分"
|
||||
|
||||
Public Sub Set_G_Attributes(devtypeName As String, gDeviceObjectClasses As DeviceObjectClasses)
|
||||
For Each anode In gDeviceObjectClasses.DeviceClass
|
||||
If anode.Name.Equals(devtypeName) Then
|
||||
For Each node In anode.Events
|
||||
G_KeyType.Add($"{node.DataValue } {node.Name }")
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
Public Sub Set_G_Attributes(devtypeName As String, gDeviceObjectClasses As DeviceObjectClasses, index As String)
|
||||
For Each anode In gDeviceObjectClasses.DeviceClass
|
||||
If anode.Name.Equals(devtypeName) Then
|
||||
For Each node In anode.Events
|
||||
If index.Contains(node.DataValue) Then
|
||||
G_KeyType.Add($"{node.DataValue } {node.Name }")
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "读取使用部分(不改动内存)"
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
Public Class TableRowRcuMode
|
||||
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,62 @@
|
||||
Public Class TableRowTag
|
||||
|
||||
Public G_DeviceObjectType As TableRowRcuMode
|
||||
Public G_TableRow As Integer
|
||||
''' <summary>
|
||||
''' 行数据集合
|
||||
''' </summary>
|
||||
Public G_DicRow As Dictionary(Of Integer, String)
|
||||
''' <summary>
|
||||
''' 设备模型名
|
||||
''' </summary>
|
||||
Public G_DevModeName As String
|
||||
Public G_DevNodeName As String
|
||||
Public G_DevNodeIndex As Integer
|
||||
''' <summary>
|
||||
''' 按键来类型
|
||||
''' </summary>
|
||||
Public G_KeyType As List(Of String)
|
||||
|
||||
|
||||
Sub New()
|
||||
G_DicRow = New Dictionary(Of Integer, String)
|
||||
G_KeyType = New List(Of String)
|
||||
End Sub
|
||||
|
||||
#Region "写入修改部分"
|
||||
|
||||
Public Sub Set_G_Attributes(devtypeName As String, gDeviceObjectClasses As DeviceObjectClasses)
|
||||
For Each anode In gDeviceObjectClasses.DeviceClass
|
||||
If anode.Name.Equals(devtypeName) Then
|
||||
For Each node In anode.Events
|
||||
G_KeyType.Add($"{node.DataValue } {node.Name }")
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
Public Sub Set_G_Attributes(devtypeName As String, gDeviceObjectClasses As DeviceObjectClasses, index As String)
|
||||
For Each anode In gDeviceObjectClasses.DeviceClass
|
||||
If anode.Name.Equals(devtypeName) Then
|
||||
For Each node In anode.Events
|
||||
If index.Contains(node.DataValue) Then
|
||||
G_KeyType.Add($"{node.DataValue } {node.Name }")
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "读取使用部分(不改动内存)"
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
Public Class TableRowRcuMode
|
||||
|
||||
|
||||
End Class
|
||||
27
BLV_Studio/Test/GridTest/TableServer.vb
Normal file
27
BLV_Studio/Test/GridTest/TableServer.vb
Normal file
@@ -0,0 +1,27 @@
|
||||
Public Class TableServer
|
||||
Private ServerRow As Integer
|
||||
Private Invokecnt As Integer
|
||||
|
||||
Sub New(addr As Integer)
|
||||
ServerRow = addr
|
||||
Invokecnt = 1
|
||||
End Sub
|
||||
|
||||
Public Sub AddRow(addrow As Integer)
|
||||
ServerRow = ServerRow + 1
|
||||
End Sub
|
||||
Public Sub DelRow(addrow As Integer)
|
||||
If ServerRow > addrow Then
|
||||
ServerRow = ServerRow - 1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CallingBase()
|
||||
Invokecnt = Invokecnt + 1
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
49
BLV_Studio/Test/NetworkHelp.vb
Normal file
49
BLV_Studio/Test/NetworkHelp.vb
Normal file
@@ -0,0 +1,49 @@
|
||||
Imports System.Collections.Generic
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports System.Linq
|
||||
Imports System.Text
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Windows.Forms
|
||||
Imports System.Management
|
||||
|
||||
Public Class NetworkHelp
|
||||
|
||||
|
||||
Public Shared Sub SetNetworkAdapter()
|
||||
Dim inPar As ManagementBaseObject = Nothing
|
||||
Dim outPar As ManagementBaseObject = Nothing
|
||||
Dim mc As ManagementClass = New ManagementClass("Win32_NetworkAdapterConfiguration")
|
||||
Dim moc As ManagementObjectCollection = mc.GetInstances()
|
||||
|
||||
For Each mo As ManagementObject In moc
|
||||
If Not CBool(mo("IPEnabled")) Then Continue For
|
||||
inPar = mo.GetMethodParameters("EnableStatic")
|
||||
inPar("IPAddress") = New String() {"192.168.1.10"}
|
||||
inPar("SubnetMask") = New String() {"255.255.0.0"}
|
||||
outPar = mo.InvokeMethod("EnableStatic", inPar, Nothing)
|
||||
inPar = mo.GetMethodParameters("SetGateways")
|
||||
inPar("DefaultIPGateway") = New String() {"172.17.123.254"}
|
||||
outPar = mo.InvokeMethod("SetGateways", inPar, Nothing)
|
||||
inPar = mo.GetMethodParameters("SetDNSServerSearchOrder")
|
||||
inPar("DNSServerSearchOrder") = New String() {"114.114.114.114", "202.97.224.69"}
|
||||
outPar = mo.InvokeMethod("SetDNSServerSearchOrder", inPar, Nothing)
|
||||
Exit For
|
||||
Next
|
||||
End Sub
|
||||
Public Shared Sub button2_Click()
|
||||
Dim mc As ManagementClass = New ManagementClass("Win32_NetworkAdapterConfiguration")
|
||||
Dim moc As ManagementObjectCollection = mc.GetInstances()
|
||||
|
||||
For Each mo As ManagementObject In moc
|
||||
If Not CBool(mo("IPEnabled")) Then Continue For
|
||||
mo.InvokeMethod("SetDNSServerSearchOrder", Nothing)
|
||||
mo.InvokeMethod("EnableStatic", Nothing)
|
||||
mo.InvokeMethod("SetGateways", Nothing)
|
||||
mo.InvokeMethod("EnableDHCP", Nothing)
|
||||
Exit For
|
||||
Next
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
53
BLV_Studio/Test/ParameterTesting.vb
Normal file
53
BLV_Studio/Test/ParameterTesting.vb
Normal file
@@ -0,0 +1,53 @@
|
||||
Public Class ParameterTesting
|
||||
|
||||
|
||||
|
||||
|
||||
Public Enum ParType
|
||||
''' <summary>
|
||||
''' 无检测
|
||||
''' </summary>
|
||||
none = 1
|
||||
|
||||
End Enum
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Shared Function ParameterTest(parval As String, party As ParType) As Boolean
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
1376
BLV_Studio/Test/TableCompile.vb
Normal file
1376
BLV_Studio/Test/TableCompile.vb
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
202
BLV_Studio/Test/TestForm1.designer.vb
generated
Normal file
202
BLV_Studio/Test/TestForm1.designer.vb
generated
Normal file
@@ -0,0 +1,202 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class TestForm1
|
||||
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(TestForm1))
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.ToolStripComboBox1 = New System.Windows.Forms.ToolStripComboBox()
|
||||
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripComboBox2 = New System.Windows.Forms.ToolStripComboBox()
|
||||
Me.ToolStripButton3 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton6 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton5 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton4 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton7 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton8 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton9 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton10 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.Grid1 = New FlexCell.Grid()
|
||||
Me.ToolStrip1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'ToolStrip1
|
||||
'
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripComboBox1, Me.ToolStripButton1, Me.ToolStripComboBox2, Me.ToolStripButton3, Me.ToolStripButton6, Me.ToolStripButton5, Me.ToolStripButton2, Me.ToolStripButton4, Me.ToolStripButton7, Me.ToolStripButton8, Me.ToolStripButton9, Me.ToolStripButton10})
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(1375, 25)
|
||||
Me.ToolStrip1.TabIndex = 0
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'ToolStripComboBox1
|
||||
'
|
||||
Me.ToolStripComboBox1.AutoSize = False
|
||||
Me.ToolStripComboBox1.Name = "ToolStripComboBox1"
|
||||
Me.ToolStripComboBox1.Size = New System.Drawing.Size(250, 25)
|
||||
'
|
||||
'ToolStripButton1
|
||||
'
|
||||
Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton1.Image = CType(resources.GetObject("ToolStripButton1.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton1.Name = "ToolStripButton1"
|
||||
Me.ToolStripButton1.Size = New System.Drawing.Size(60, 22)
|
||||
Me.ToolStripButton1.Text = "添加模块"
|
||||
'
|
||||
'ToolStripComboBox2
|
||||
'
|
||||
Me.ToolStripComboBox2.Name = "ToolStripComboBox2"
|
||||
Me.ToolStripComboBox2.Size = New System.Drawing.Size(221, 25)
|
||||
'
|
||||
'ToolStripButton3
|
||||
'
|
||||
Me.ToolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton3.Image = CType(resources.GetObject("ToolStripButton3.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton3.Name = "ToolStripButton3"
|
||||
Me.ToolStripButton3.Size = New System.Drawing.Size(60, 22)
|
||||
Me.ToolStripButton3.Text = "添加按键"
|
||||
Me.ToolStripButton3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
'
|
||||
'ToolStripButton6
|
||||
'
|
||||
Me.ToolStripButton6.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton6.Image = CType(resources.GetObject("ToolStripButton6.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton6.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton6.Name = "ToolStripButton6"
|
||||
Me.ToolStripButton6.Size = New System.Drawing.Size(72, 22)
|
||||
Me.ToolStripButton6.Text = "新建逻辑表"
|
||||
Me.ToolStripButton6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
'
|
||||
'ToolStripButton5
|
||||
'
|
||||
Me.ToolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton5.Image = CType(resources.GetObject("ToolStripButton5.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton5.Name = "ToolStripButton5"
|
||||
Me.ToolStripButton5.Size = New System.Drawing.Size(72, 22)
|
||||
Me.ToolStripButton5.Text = "保存逻辑表"
|
||||
Me.ToolStripButton5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
'
|
||||
'ToolStripButton2
|
||||
'
|
||||
Me.ToolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton2.Image = CType(resources.GetObject("ToolStripButton2.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton2.Name = "ToolStripButton2"
|
||||
Me.ToolStripButton2.Size = New System.Drawing.Size(72, 22)
|
||||
Me.ToolStripButton2.Text = "导出逻辑表"
|
||||
Me.ToolStripButton2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
'
|
||||
'ToolStripButton4
|
||||
'
|
||||
Me.ToolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton4.Image = CType(resources.GetObject("ToolStripButton4.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton4.Name = "ToolStripButton4"
|
||||
Me.ToolStripButton4.Size = New System.Drawing.Size(72, 22)
|
||||
Me.ToolStripButton4.Text = "导入逻辑表"
|
||||
Me.ToolStripButton4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
|
||||
'
|
||||
'ToolStripButton7
|
||||
'
|
||||
Me.ToolStripButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton7.Image = CType(resources.GetObject("ToolStripButton7.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton7.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton7.Name = "ToolStripButton7"
|
||||
Me.ToolStripButton7.Size = New System.Drawing.Size(84, 22)
|
||||
Me.ToolStripButton7.Text = "删除选中模块"
|
||||
'
|
||||
'ToolStripButton8
|
||||
'
|
||||
Me.ToolStripButton8.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton8.Image = CType(resources.GetObject("ToolStripButton8.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton8.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton8.Name = "ToolStripButton8"
|
||||
Me.ToolStripButton8.Size = New System.Drawing.Size(60, 22)
|
||||
Me.ToolStripButton8.Text = "删除回撤"
|
||||
'
|
||||
'ToolStripButton9
|
||||
'
|
||||
Me.ToolStripButton9.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton9.Image = CType(resources.GetObject("ToolStripButton9.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton9.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton9.Name = "ToolStripButton9"
|
||||
Me.ToolStripButton9.Size = New System.Drawing.Size(36, 22)
|
||||
Me.ToolStripButton9.Text = "编译"
|
||||
'
|
||||
'ToolStripButton10
|
||||
'
|
||||
Me.ToolStripButton10.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
|
||||
Me.ToolStripButton10.Image = CType(resources.GetObject("ToolStripButton10.Image"), System.Drawing.Image)
|
||||
Me.ToolStripButton10.ImageTransparentColor = System.Drawing.Color.Magenta
|
||||
Me.ToolStripButton10.Name = "ToolStripButton10"
|
||||
Me.ToolStripButton10.Size = New System.Drawing.Size(23, 22)
|
||||
Me.ToolStripButton10.Text = "ToolStripButton10"
|
||||
'
|
||||
'Grid1
|
||||
'
|
||||
Me.Grid1.CheckedImage = Nothing
|
||||
Me.Grid1.DefaultFont = New System.Drawing.Font("宋体", 9.0!)
|
||||
Me.Grid1.Dock = System.Windows.Forms.DockStyle.Fill
|
||||
Me.Grid1.ExtendLastCol = True
|
||||
Me.Grid1.Font = New System.Drawing.Font("宋体", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.Grid1.GridColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
|
||||
Me.Grid1.Location = New System.Drawing.Point(0, 25)
|
||||
Me.Grid1.Name = "Grid1"
|
||||
Me.Grid1.Size = New System.Drawing.Size(1375, 629)
|
||||
Me.Grid1.TabIndex = 1
|
||||
Me.Grid1.UncheckedImage = Nothing
|
||||
'
|
||||
'TestForm1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1375, 654)
|
||||
Me.Controls.Add(Me.Grid1)
|
||||
Me.Controls.Add(Me.ToolStrip1)
|
||||
Me.Name = "TestForm1"
|
||||
Me.Text = "Form1"
|
||||
Me.ToolStrip1.ResumeLayout(False)
|
||||
Me.ToolStrip1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents ToolStrip1 As ToolStrip
|
||||
Friend WithEvents Grid1 As FlexCell.Grid
|
||||
Friend WithEvents ToolStripComboBox1 As ToolStripComboBox
|
||||
Friend WithEvents ToolStripButton1 As ToolStripButton
|
||||
Friend WithEvents ToolStripComboBox2 As ToolStripComboBox
|
||||
Friend WithEvents ToolStripButton3 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton6 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton5 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton4 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton2 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton7 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton8 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton9 As ToolStripButton
|
||||
Friend WithEvents ToolStripButton10 As ToolStripButton
|
||||
End Class
|
||||
274
BLV_Studio/Test/TestForm1.resx
Normal file
274
BLV_Studio/Test/TestForm1.resx
Normal file
@@ -0,0 +1,274 @@
|
||||
<?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="ToolStripButton1.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="ToolStripButton3.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="ToolStripButton6.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="ToolStripButton5.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="ToolStripButton2.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="ToolStripButton4.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="ToolStripButton7.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="ToolStripButton8.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="ToolStripButton9.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="ToolStripButton10.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>
|
||||
833
BLV_Studio/Test/TestForm1.vb
Normal file
833
BLV_Studio/Test/TestForm1.vb
Normal file
@@ -0,0 +1,833 @@
|
||||
Imports System.Text
|
||||
Imports BLV_Studio.GridModel.DeviceEventModel
|
||||
Imports FlexCell
|
||||
|
||||
Public Class TestForm1
|
||||
|
||||
Enum ComboDropDownON
|
||||
LightingCircuit = 1
|
||||
LightingCircuit0
|
||||
LightingCircuit1
|
||||
LightingCircuit2
|
||||
KeyDev
|
||||
max
|
||||
End Enum
|
||||
Enum ComboDropDownCol
|
||||
devFile = 1
|
||||
Keyval
|
||||
keyName
|
||||
music
|
||||
空改1
|
||||
空改2
|
||||
空改3
|
||||
空改4
|
||||
max
|
||||
End Enum
|
||||
|
||||
Enum CellDrop
|
||||
|
||||
TurnOn = -24116
|
||||
TurnDrown = -23592
|
||||
表示先开后关 = -24080
|
||||
代表先关后开 = -24075
|
||||
'代表调光上 = -23637
|
||||
'代表调光下降 = -23635
|
||||
|
||||
End Enum
|
||||
Public configInfo As ConfigInfoStuct
|
||||
Public basicClass As DeviceObjectClasses
|
||||
Private Sub TestForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
|
||||
Dim tmpRcuModelFile As String
|
||||
Using dlg As New OpenFileDialog
|
||||
dlg.InitialDirectory = HostDevFNP
|
||||
dlg.Title = "请选择 RCU 模型文件!"
|
||||
dlg.Filter = "RCU模型信息(*.xml)|*.xml"
|
||||
If dlg.ShowDialog <> DialogResult.OK Then
|
||||
MsgBox("未选择 RCU 模型文件!")
|
||||
Me.Close()
|
||||
Return
|
||||
End If
|
||||
tmpRcuModelFile = dlg.FileName
|
||||
End Using
|
||||
initGrid1()
|
||||
DevModeInserfilag = 0
|
||||
DeviceModuleDic = New Dictionary(Of String, DeviceModel)
|
||||
SwitchConfig = New Dictionary(Of String, Dictionary(Of Integer, String))
|
||||
DeleteDevmodedic = New List(Of DeleteDevmodeclass)
|
||||
AddHostDeviceModule(tmpRcuModelFile)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public DevModeInserfilag As Integer = 0
|
||||
Public Sub initGrid1()
|
||||
Grid1.NewFile()
|
||||
Grid1.Cols = ComboDropDownCol.max
|
||||
Grid1.Rows = 1
|
||||
Grid1.Column(0).Visible = False
|
||||
Grid1.Row(0).Visible = False
|
||||
Grid1.AddItem("")
|
||||
Grid1.AddItem("")
|
||||
Grid1.AddItem("")
|
||||
Grid1.AddItem("")
|
||||
Grid1.Row(ComboDropDownON.LightingCircuit2).Height = 50
|
||||
With Grid1.Range(ComboDropDownON.LightingCircuit, 1, ComboDropDownON.LightingCircuit2, 8)
|
||||
.Merge()
|
||||
.Alignment = AlignmentEnum.CenterCenter
|
||||
End With
|
||||
With Grid1.Cell(ComboDropDownON.LightingCircuit, 1)
|
||||
.Text = "灯光回路"
|
||||
.Locked = True
|
||||
End With
|
||||
|
||||
Grid1.AddItem("")
|
||||
Grid1.Cell(ComboDropDownON.KeyDev, ComboDropDownCol.devFile).Text = "设备地址"
|
||||
Grid1.Cell(ComboDropDownON.KeyDev, ComboDropDownCol.Keyval).Text = "键值"
|
||||
Grid1.Cell(ComboDropDownON.KeyDev, ComboDropDownCol.keyName).Text = "按键名称"
|
||||
Grid1.Cell(ComboDropDownON.KeyDev, ComboDropDownCol.music).Text = "是否需要提示音"
|
||||
Grid1.Cell(ComboDropDownON.KeyDev, ComboDropDownCol.空改1).Text = "是否需要服务调用"
|
||||
Grid1.Cell(ComboDropDownON.KeyDev, ComboDropDownCol.空改2).Text = "取电有效"
|
||||
Grid1.Cell(ComboDropDownON.KeyDev, ComboDropDownCol.空改3).Text = "起夜模式"
|
||||
Grid1.Cell(ComboDropDownON.KeyDev, ComboDropDownCol.空改4).Text = "总开模式"
|
||||
Grid1.Row(ComboDropDownON.KeyDev).Locked = True
|
||||
|
||||
Grid1.Column(2).Locked = True
|
||||
Grid1.FrozenRows = ComboDropDownON.max - 1
|
||||
Grid1.FrozenCols = ComboDropDownCol.max - 1
|
||||
|
||||
'Grid1.Column(3).Locked = True
|
||||
'Grid1.Column(4).Locked = True
|
||||
|
||||
End Sub
|
||||
Public HostDevFNP As String = "C:\BLV_Studio\Data\Model\RCUModel\"
|
||||
Private Sub Grid1_ComboDropDown(Sender As Object, e As Grid.ComboDropDownEventArgs) Handles Grid1.ComboDropDown
|
||||
Grid1.ComboBox(0).Items.Clear()
|
||||
Select Case e.Row
|
||||
'Case ComboDropDownON.HostDev
|
||||
' For Each HostDevFN In IO.Directory.GetFiles(HostDevFNP)
|
||||
' Grid1.ComboBox(0).Items.Add(HostDevFN.Substring(HostDevFNP.Length, HostDevFN.Length - HostDevFNP.Length - 4))
|
||||
' Next
|
||||
Case >= ComboDropDownON.max
|
||||
|
||||
|
||||
|
||||
Console.WriteLine()
|
||||
If Grid1.Cell(ComboDropDownON.LightingCircuit0, Grid1.ActiveCell.Col).Text.Equals("MUSIC") Then
|
||||
Dim fromshow As New MusicArrangement
|
||||
fromshow.basicClass = basicClass
|
||||
If fromshow.ShowDialog() <> DialogResult.OK Then Return
|
||||
Grid1.Cell(Grid1.ActiveCell.Row, Grid1.ActiveCell.Col).Text = fromshow.GmusicVal
|
||||
|
||||
Else
|
||||
For Each index In [Enum].GetValues(GetType(CellDrop))
|
||||
Grid1.ComboBox(0).Items.Add(Chr(index))
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Grid1_CellChange(Sender As Object, e As Grid.CellChangeEventArgs) Handles Grid1.CellChange
|
||||
Select Case e.Row
|
||||
'Case ComboDropDownON.HostDev
|
||||
' If e.Col > 1 Then
|
||||
' SwitchConfig.Clear()
|
||||
' AddHostDeviceModule(HostDevFNP & Grid1.Cell(e.Row, e.Col).Text & ".xml")
|
||||
' End If
|
||||
Case ComboDropDownON.LightingCircuit2
|
||||
If e.Col > 4 And IsRelayflag Then
|
||||
SetRELAYAnotherName(e.Row, e.Col)
|
||||
End If
|
||||
Case > ComboDropDownON.KeyDev
|
||||
If e.Col = 3 And IsRelayflag Then
|
||||
SetkeypadAnotherName(e.Row, e.Col)
|
||||
ElseIf e.Col > 4 And IsRelayflag Then
|
||||
Dim crow As Integer = -1
|
||||
|
||||
Integer.TryParse(Grid1.Cell(e.Row, 2).Text, crow)
|
||||
|
||||
|
||||
Dim keystr As String = Grid1.Cell(e.Row - (crow - 1), 1).Text
|
||||
keystr = $"{keystr}:{crow.ToString }"
|
||||
Dim dic As Dictionary(Of Integer, String) = SwitchConfig.Item(keystr)
|
||||
If dic.ContainsKey(e.Col) And Not String.IsNullOrEmpty(Grid1.Cell(e.Row, e.Col).Text) Then
|
||||
dic.Item(e.Col) = Grid1.Cell(e.Row, e.Col).Text
|
||||
Else
|
||||
dic.Add(e.Col, Grid1.Cell(e.Row, e.Col).Text)
|
||||
End If
|
||||
|
||||
End If
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub SetRELAYAnotherName(r As Integer, c As Integer)
|
||||
Dim place As Integer = c - 4
|
||||
For Each moduStr In DeviceModuleDic
|
||||
For Each ModuleFre In moduStr.Value.Nodes
|
||||
If ModuleFre.Name.Equals("RELAY") Then
|
||||
If ModuleFre.Nodes.Count < place Then
|
||||
place = place - ModuleFre.Nodes.Count
|
||||
Else
|
||||
ModuleFre.Nodes(place - 1).Name = Grid1.Cell(r, c).Text
|
||||
Exit Sub
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Next
|
||||
End Sub
|
||||
Public Sub SetkeypadAnotherName(r As Integer, c As Integer)
|
||||
Dim place As Integer = r - ComboDropDownON.KeyDev
|
||||
For Each moduStr In DeviceModuleDic
|
||||
For Each ModuleFre In moduStr.Value.Nodes
|
||||
If ModuleFre.Name.Equals("DI") Then
|
||||
If ModuleFre.Nodes.Count < place Then
|
||||
place = place - ModuleFre.Nodes.Count
|
||||
Else
|
||||
If IsRelayflag Then
|
||||
ModuleFre.Nodes(place - 1).Name = Grid1.Cell(r, c).Text
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Public DeviceModuleDic As Dictionary(Of String, DeviceModel)
|
||||
Public Sub AddHostDeviceModule(HostDevicefile As String)
|
||||
Try
|
||||
Dim model As DeviceModel = LoadModelFromXml(HostDevicefile)
|
||||
SwitchConfig.Clear()
|
||||
If DeviceModuleDic.ContainsKey("HostDevice") Then
|
||||
DeviceModuleDic.Item("HostDevice") = model
|
||||
Else
|
||||
DeviceModuleDic.Add("HostDevice", model)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("添加主机失败!")
|
||||
Return
|
||||
End Try
|
||||
ShowRelay()
|
||||
|
||||
'For Each inten In model.Nodes
|
||||
' If inten.Name.Equals("RELAY") Then
|
||||
' Dim hotel = New TreeNode(inten.Name)
|
||||
' For Each Cindten In inten.Nodes
|
||||
' Dim hotelc As New TreeNode(Cindten.Name)
|
||||
' hotel.Nodes.Add(hotelc)
|
||||
' Next
|
||||
' DeviceModuleDic.Nodes.Add(hotel)
|
||||
' Return
|
||||
' Else
|
||||
' Continue For
|
||||
' End If
|
||||
'Next
|
||||
|
||||
End Sub
|
||||
Public Function LoadModelFromXml(path As String) As DeviceModel
|
||||
Return BXmlSerializer.DeserializeFormXml(Of DeviceModel)(path)
|
||||
End Function
|
||||
Public DevModel As String = "C:\BLV_Studio\Data\Model\485Model\"
|
||||
Private Sub ToolStripComboBox1_DropDown(sender As Object, e As EventArgs) Handles ToolStripComboBox1.DropDown
|
||||
ToolStripComboBox1.Items.Clear()
|
||||
For Each HostDevFN In IO.Directory.GetFiles(DevModel)
|
||||
ToolStripComboBox1.Items.Add(HostDevFN.Substring(DevModel.Length, HostDevFN.Length - DevModel.Length - 4))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click
|
||||
Dim model As DeviceModel
|
||||
Try
|
||||
model = LoadModelFromXml(DevModel & ToolStripComboBox1.Text & ".xml")
|
||||
If DeviceModuleDic.ContainsKey("HostDevice") Then
|
||||
If model.Desc.DevInterface.Equals("RS485Polling") Then
|
||||
|
||||
'If DeviceModuleDic.ContainsKey(ToolStripComboBox1.Text) Then
|
||||
'DeviceModuleDic.Item("HostDevice") = model
|
||||
Dim number As Integer = ModuleFrequency(ToolStripComboBox1.Text)
|
||||
'DeviceModuleDic.Add($"{ToolStripComboBox1.Text}_{number}", model)
|
||||
Dim strindex As String = GetindexNumber(ToolStripComboBox1.Text, number)
|
||||
DeviceModuleDic = DeviceModuleDicDiinsertion(DeviceModuleDic, DevModeInserfilag, strindex, model)
|
||||
'Else
|
||||
' ' DeviceModuleDic.Add(ToolStripComboBox1.Text, model)
|
||||
' DeviceModuleDic = DeviceModuleDicDiinsertion(DeviceModuleDic, DevModeInserfilag, $"{ToolStripComboBox1.Text}", model)
|
||||
'End If
|
||||
DevModeInserfilag = DevModeInserfilag + 1
|
||||
Else
|
||||
MsgBox($"添加外设模块失败!")
|
||||
Return
|
||||
End If
|
||||
Else
|
||||
MsgBox($"未添加主机!")
|
||||
Return
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox($"加载设备模型错误,{ex.Message}")
|
||||
Return
|
||||
End Try
|
||||
ShowRelay()
|
||||
End Sub
|
||||
|
||||
Public Function GetindexNumber(str As String, index As Integer) As String
|
||||
Dim result As String
|
||||
If DeviceModuleDic.ContainsKey($"{str}:{index}") Then
|
||||
index = index + 1
|
||||
result = GetindexNumber(str, index)
|
||||
Else
|
||||
result = $"{str}:{index}"
|
||||
End If
|
||||
Return result
|
||||
End Function
|
||||
Public Function ModuleFrequency(hfreq As String) As Integer
|
||||
Dim result As Integer = 1
|
||||
Dim str As String = String.Empty
|
||||
Dim strbuff() As String
|
||||
Dim index As Integer = -1
|
||||
For Each moduStr In DeviceModuleDic.Keys
|
||||
If moduStr.Contains(hfreq) Then
|
||||
result = result + 1
|
||||
str = moduStr
|
||||
End If
|
||||
|
||||
Next
|
||||
If str.Length > 0 Then
|
||||
strbuff = str.Split(":")
|
||||
If strbuff.Length > 1 Then
|
||||
Integer.TryParse(strbuff(1), index)
|
||||
End If
|
||||
If index > result Then result = index + 1
|
||||
End If
|
||||
|
||||
Return result
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public IsRelayflag As Boolean
|
||||
Public Sub ShowRelay()
|
||||
Dim Startid As Integer = ComboDropDownCol.max
|
||||
Grid1.Cols = ComboDropDownCol.max
|
||||
IsRelayflag = False
|
||||
Dim demoindex As Integer = Startid
|
||||
|
||||
Dim g_Dimming As DeviceChildNodeClass
|
||||
Dim g_RELAY As DeviceChildNodeClass
|
||||
Dim g_DO As DeviceChildNodeClass
|
||||
Dim g_MUSIC As DeviceChildNodeClass
|
||||
|
||||
For Each moduStr In DeviceModuleDic
|
||||
g_Dimming = Nothing
|
||||
g_RELAY = Nothing
|
||||
g_DO = Nothing
|
||||
g_MUSIC = Nothing
|
||||
For Each ModuleFre In moduStr.Value.Nodes
|
||||
' If ModuleFre.Name.Equals("Dimming") OrElse ModuleFre.Name.Equals("RELAY") OrElse ModuleFre.Name.Equals("DO") Then
|
||||
|
||||
'添加继电器列
|
||||
'Grid1.Cols = demoindex + ModuleFre.Nodes.Count
|
||||
'Grid1.Cell(ComboDropDownON.LightingCircuit0, demoindex).Text = ModuleFre.Name
|
||||
'Grid1.Range(ComboDropDownON.LightingCircuit0, demoindex, ComboDropDownON.LightingCircuit0, demoindex + ModuleFre.Nodes.Count - 1).Merge()
|
||||
'Grid1.Range(ComboDropDownON.LightingCircuit, demoindex, ComboDropDownON.LightingCircuit, demoindex + ModuleFre.Nodes.Count - 1).Locked = False
|
||||
'Grid1.Range(ComboDropDownON.LightingCircuit, demoindex, ComboDropDownON.LightingCircuit, demoindex + ModuleFre.Nodes.Count - 1).Merge()
|
||||
'Grid1.Range(ComboDropDownON.LightingCircuit, demoindex, ComboDropDownON.LightingCircuit, demoindex + ModuleFre.Nodes.Count - 1).Locked = True
|
||||
'If moduStr.Key.Equals("HostDevice") Then
|
||||
' Grid1.Cell(ComboDropDownON.LightingCircuit, Startid).Text = moduStr.Value.Name
|
||||
'Else
|
||||
' Grid1.Cell(ComboDropDownON.LightingCircuit, Startid).Text = moduStr.Key
|
||||
'End If
|
||||
|
||||
|
||||
'Grid1.Range(ComboDropDownON.LightingCircuit1, demoindex, ComboDropDownON.LightingCircuit1, demoindex + ModuleFre.Nodes.Count - 1).Locked = True
|
||||
'Grid1.Range(ComboDropDownON.LightingCircuit, Startid, ComboDropDownON.LightingCircuit0, Startid + ModuleFre.Nodes.Count - 1).Alignment = AlignmentEnum.CenterCenter
|
||||
'For i As Integer = 0 To ModuleFre.Nodes.Count - 1
|
||||
' Grid1.Cell(ComboDropDownON.LightingCircuit1, demoindex + i).Text = (i + 1).ToString
|
||||
' Console.WriteLine($"{ModuleFre.Name}_R:{ComboDropDownON.LightingCircuit1.ToString }_C:{Startid + i}_{(i + 1).ToString}")
|
||||
' Grid1.Cell(ComboDropDownON.LightingCircuit2, demoindex + i).Text = ModuleFre.Nodes(i).Name
|
||||
'Next
|
||||
'demoindex = demoindex + ModuleFre.Nodes.Count
|
||||
' End If
|
||||
If ModuleFre.Name.Equals("Dimming") Then
|
||||
g_Dimming = ModuleFre
|
||||
ElseIf ModuleFre.Name.Equals("RELAY") Then
|
||||
g_RELAY = ModuleFre
|
||||
ElseIf ModuleFre.Name.Equals("DO") Then
|
||||
g_DO = ModuleFre
|
||||
ElseIf ModuleFre.Name.Equals("MUSIC") Then
|
||||
g_MUSIC = ModuleFre
|
||||
End If
|
||||
|
||||
Next
|
||||
AddColumnConfig(g_DO, demoindex, Startid, moduStr)
|
||||
AddColumnConfig(g_RELAY, demoindex, Startid, moduStr)
|
||||
AddColumnConfig(g_Dimming, demoindex, Startid, moduStr)
|
||||
AddColumnConfig(g_MUSIC, demoindex, Startid, moduStr)
|
||||
Startid = demoindex
|
||||
Next
|
||||
ShowSwitch()
|
||||
IsRelayflag = True
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub AddColumnConfig(ModuleFre As DeviceChildNodeClass, ByRef demoindex As Integer, Startid As Integer, moduStr As KeyValuePair(Of String, DeviceModel))
|
||||
'添加继电器列
|
||||
If IsNothing(ModuleFre) OrElse ModuleFre.Nodes.Count = 0 Then Return
|
||||
Grid1.Cols = demoindex + ModuleFre.Nodes.Count
|
||||
Grid1.Cell(ComboDropDownON.LightingCircuit0, demoindex).Text = ModuleFre.Name
|
||||
Grid1.Range(ComboDropDownON.LightingCircuit0, demoindex, ComboDropDownON.LightingCircuit0, demoindex + ModuleFre.Nodes.Count - 1).Merge()
|
||||
Grid1.Range(ComboDropDownON.LightingCircuit, Startid, ComboDropDownON.LightingCircuit, demoindex + ModuleFre.Nodes.Count - 1).Locked = False
|
||||
Grid1.Range(ComboDropDownON.LightingCircuit, Startid, ComboDropDownON.LightingCircuit, demoindex + ModuleFre.Nodes.Count - 1).Merge()
|
||||
Grid1.Range(ComboDropDownON.LightingCircuit, Startid, ComboDropDownON.LightingCircuit, demoindex + ModuleFre.Nodes.Count - 1).Locked = True
|
||||
If moduStr.Key.Equals("HostDevice") Then
|
||||
Grid1.Cell(ComboDropDownON.LightingCircuit, Startid).Text = moduStr.Value.Name
|
||||
Else
|
||||
Grid1.Cell(ComboDropDownON.LightingCircuit, Startid).Text = moduStr.Key
|
||||
End If
|
||||
|
||||
|
||||
Grid1.Range(ComboDropDownON.LightingCircuit1, demoindex, ComboDropDownON.LightingCircuit1, demoindex + ModuleFre.Nodes.Count - 1).Locked = True
|
||||
Grid1.Range(ComboDropDownON.LightingCircuit, Startid, ComboDropDownON.LightingCircuit2, Startid + ModuleFre.Nodes.Count - 1).Alignment = AlignmentEnum.CenterCenter
|
||||
For i As Integer = 0 To ModuleFre.Nodes.Count - 1
|
||||
Grid1.Cell(ComboDropDownON.LightingCircuit1, demoindex + i).Text = (i + 1).ToString
|
||||
Console.WriteLine($"{ModuleFre.Name}_R:{ComboDropDownON.LightingCircuit1.ToString }_C:{Startid + i}_{(i + 1).ToString}")
|
||||
Grid1.Cell(ComboDropDownON.LightingCircuit2, demoindex + i).Text = ModuleFre.Nodes(i).Name
|
||||
Grid1.Cell(ComboDropDownON.LightingCircuit2, demoindex + i).Orientation = TextOrientationEnum.Vertical
|
||||
|
||||
Next
|
||||
demoindex = demoindex + ModuleFre.Nodes.Count
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public SwitchConfig As Dictionary(Of String, Dictionary(Of Integer, String))
|
||||
Public Sub ShowSwitch()
|
||||
IsRelayflag = False
|
||||
Grid1.AutoRedraw = False
|
||||
Dim rdilenma As String
|
||||
For moduStr As Integer = ComboDropDownON.max To Grid1.Rows - 1
|
||||
Grid1.Row(Grid1.Rows - 1).Delete()
|
||||
Next
|
||||
'SwitchConfig.Clear()
|
||||
Dim rowid As Integer = Grid1.Rows
|
||||
For Each moduStr In DeviceModuleDic
|
||||
|
||||
For Each ModuleFre In moduStr.Value.Nodes
|
||||
If ModuleFre.Name.Equals("DI") Then
|
||||
'添加继电器列
|
||||
|
||||
For i As Integer = 0 To ModuleFre.Nodes.Count - 1
|
||||
Grid1.AddItem("")
|
||||
If i = 0 Then
|
||||
If moduStr.Key.Equals("HostDevice") Then
|
||||
Grid1.Cell(rowid, ComboDropDownCol.devFile).Text = moduStr.Value.Name
|
||||
Else
|
||||
Grid1.Cell(rowid, ComboDropDownCol.devFile).Text = moduStr.Key
|
||||
End If
|
||||
rdilenma = Grid1.Cell(rowid, 1).Text
|
||||
End If
|
||||
|
||||
If Not SwitchConfig.ContainsKey($"{rdilenma}:{i + 1}") Then
|
||||
Dim dic As New Dictionary(Of Integer, String)
|
||||
dic.Add(ComboDropDownCol.music, Chr(CellDrop.TurnOn))
|
||||
dic.Add(ComboDropDownCol.空改2, Chr(CellDrop.TurnOn))
|
||||
SwitchConfig.Add($"{rdilenma}:{i + 1}", dic)
|
||||
End If
|
||||
|
||||
Grid1.Cell(rowid + i, ComboDropDownCol.Keyval).Text = (i + 1).ToString
|
||||
Grid1.Cell(rowid + i, ComboDropDownCol.keyName).Text = ModuleFre.Nodes(i).Name
|
||||
|
||||
Grid1.Cell(rowid + i, ComboDropDownCol.music).Text = Chr(CellDrop.TurnOn)
|
||||
Grid1.Cell(rowid + i, ComboDropDownCol.空改2).Text = Chr(CellDrop.TurnOn)
|
||||
Next
|
||||
|
||||
Grid1.Cell(rowid, 1).WrapText = True
|
||||
Grid1.Range(rowid, 1, Grid1.Rows - 1, ComboDropDownCol.devFile).Merge()
|
||||
Grid1.Range(rowid, 1, Grid1.Rows - 1, ComboDropDownCol.devFile).Locked = True
|
||||
rowid = Grid1.Rows
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
Next
|
||||
Grid1.Range(ComboDropDownON.max, ComboDropDownCol.music, Grid1.Rows - 1, Grid1.Cols - 1).Alignment = AlignmentEnum.CenterCenter
|
||||
Grid1.Range(ComboDropDownON.max, ComboDropDownCol.music, Grid1.Rows - 1, Grid1.Cols - 1).CellType = CellTypeEnum.ComboBox
|
||||
|
||||
SetGrid1RowTxt()
|
||||
Grid1.AutoRedraw = True
|
||||
Grid1.Refresh()
|
||||
IsRelayflag = True
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub SetGrid1RowTxt()
|
||||
Dim rfilename As String
|
||||
Dim keystr As String
|
||||
Dim dic As Dictionary(Of Integer, String)
|
||||
For i As Integer = ComboDropDownON.max To Grid1.Rows - 1
|
||||
If Grid1.Cell(i, 2).Text.Equals("1") Then
|
||||
rfilename = Grid1.Cell(i, 1).Text
|
||||
End If
|
||||
keystr = $"{rfilename}:{Grid1.Cell(i, 2).Text}"
|
||||
dic = SwitchConfig.Item(keystr)
|
||||
For Each node In dic
|
||||
Grid1.Cell(i, node.Key).Text = node.Value
|
||||
Next
|
||||
|
||||
Next
|
||||
|
||||
|
||||
'For Each inten In SwitchConfig
|
||||
' For Each node In inten.Value
|
||||
' Grid1.Cell(inten.Key, node.Key).Text = node.Value
|
||||
' Next
|
||||
'Next
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripComboBox2_DropDown(sender As Object, e As EventArgs) Handles ToolStripComboBox2.DropDown
|
||||
ToolStripComboBox2.Items.Clear()
|
||||
For Each HostDevFN In IO.Directory.GetFiles(DevModel)
|
||||
ToolStripComboBox2.Items.Add(HostDevFN.Substring(DevModel.Length, HostDevFN.Length - DevModel.Length - 4))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles ToolStripButton3.Click
|
||||
Dim model As DeviceModel
|
||||
Try
|
||||
model = LoadModelFromXml(DevModel & ToolStripComboBox2.Text & ".xml")
|
||||
If DeviceModuleDic.ContainsKey("HostDevice") Then
|
||||
If model.Desc.DevInterface.Equals("RS485Active") Then
|
||||
|
||||
'If DeviceModuleDic.ContainsKey(ToolStripComboBox2.Text) Then
|
||||
'DeviceModuleDic.Item("HostDevice") = model
|
||||
Dim number As Integer = ModuleFrequency(ToolStripComboBox2.Text)
|
||||
Dim strindex As String = GetindexNumber(ToolStripComboBox2.Text, number)
|
||||
DeviceModuleDic.Add(strindex, model)
|
||||
|
||||
Dim dic As New Dictionary(Of String, String)
|
||||
|
||||
'Else
|
||||
' DeviceModuleDic.Add(ToolStripComboBox2.Text, model)
|
||||
'End If
|
||||
|
||||
Else
|
||||
MsgBox($"添加外设模块失败!")
|
||||
Return
|
||||
End If
|
||||
Else
|
||||
MsgBox($"未添加主机!")
|
||||
Return
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox($"加载设备模型错误,{ex.Message}")
|
||||
Return
|
||||
End Try
|
||||
ShowSwitch()
|
||||
End Sub
|
||||
Public Function DeviceModuleDicDiinsertion(dic As Dictionary(Of String, DeviceModel), index As Integer, kstr As String, model As DeviceModel) As Dictionary(Of String, DeviceModel)
|
||||
Dim result As New Dictionary(Of String, DeviceModel)
|
||||
For i As Integer = 0 To dic.Count - 1
|
||||
result.Add(dic.Keys(i), dic.Values(i))
|
||||
If i = index Then
|
||||
result.Add(kstr, model)
|
||||
End If
|
||||
Next
|
||||
Return result
|
||||
End Function
|
||||
Public Function UpdataModuleDicDiinsertion(dic As Dictionary(Of String, DeviceModel)) As Dictionary(Of String, DeviceModel)
|
||||
Dim result As New Dictionary(Of String, DeviceModel)
|
||||
For i As Integer = 0 To dic.Count - 1
|
||||
result.Add(dic.Keys(i), dic.Values(i))
|
||||
Next
|
||||
Return result
|
||||
End Function
|
||||
|
||||
Private Function SetKeyValuePair() As KeyValuePair(Of Integer, String)
|
||||
Dim intKey As Integer = 1
|
||||
Dim strValue As String = "My value"
|
||||
Dim kvp As KeyValuePair(Of Integer, String) = New KeyValuePair(Of Integer, String)(intKey, strValue)
|
||||
Return kvp
|
||||
End Function
|
||||
Private Sub ToolStripButton6_Click(sender As Object, e As EventArgs) Handles ToolStripButton6.Click
|
||||
TestForm1_Load(Nothing, Nothing)
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton5_Click(sender As Object, e As EventArgs) Handles ToolStripButton5.Click
|
||||
If String.IsNullOrEmpty(ShipmentFile) Then
|
||||
ToolStripButton2_Click_1(Nothing, Nothing)
|
||||
Else
|
||||
If IO.File.Exists(ShipmentFile) Then
|
||||
If MsgBox("已存在同名文件是否覆盖?", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
|
||||
Grid1.SaveFile($"{ShipmentFile}")
|
||||
DeleteDevmodedic.Clear()
|
||||
MsgBox($"保存完成:{ShipmentFile}")
|
||||
End If
|
||||
Else
|
||||
Grid1.SaveFile($"{ShipmentFile}")
|
||||
DeleteDevmodedic.Clear()
|
||||
MsgBox($"保存完成:{ShipmentFile}")
|
||||
End If
|
||||
|
||||
End If
|
||||
' IO.Directory.CreateDirectory($"{Application.StartupPath}\Table\")
|
||||
'Grid1.ExportToCSV($"{Application.StartupPath}\Table\{Date.Now.ToString("yyyyMMddHHmmssfff")}.csv", False, False)
|
||||
|
||||
|
||||
End Sub
|
||||
Public ShipmentFile As String
|
||||
Private Sub ToolStripButton4_Click(sender As Object, e As EventArgs) Handles ToolStripButton4.Click
|
||||
Using dlg As New OpenFileDialog
|
||||
dlg.InitialDirectory = Application.StartupPath
|
||||
dlg.Title = "请选择文件!"
|
||||
dlg.Filter = "逻辑表(*.flx)|*.flx"
|
||||
If dlg.ShowDialog <> DialogResult.OK Then Return
|
||||
DeviceModuleDic.Clear()
|
||||
ShipmentFile = dlg.FileName
|
||||
If Not Grid1.OpenFile(ShipmentFile) Then
|
||||
MsgBox("文件损坏,打开失败!")
|
||||
Else
|
||||
UploadDeviceModuleDic()
|
||||
DeleteDevmodedic.Clear()
|
||||
End If
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub UploadDeviceModuleDic()
|
||||
Dim intlabel As Integer = ComboDropDownON.max
|
||||
Dim col As Integer = 5
|
||||
Dim HostDevicefile As String
|
||||
Dim model As DeviceModel
|
||||
Dim kval As KeyValuePair(Of Integer, Integer)
|
||||
DeviceModuleDic.Clear()
|
||||
SwitchConfig.Clear()
|
||||
DevModeInserfilag = 0
|
||||
Dim filenaem() As String
|
||||
While True
|
||||
If intlabel < Grid1.Rows - 1 Then
|
||||
filenaem = Grid1.Cell(intlabel, 1).Text.Split(":")
|
||||
HostDevicefile = DevModel & filenaem(0) & ".xml"
|
||||
If IO.File.Exists(HostDevicefile) Then
|
||||
model = LoadModelFromXml(HostDevicefile)
|
||||
kval = Analysismodel(model, intlabel, col)
|
||||
DeviceModuleDic.Add(Grid1.Cell(intlabel, 1).Text, model)
|
||||
|
||||
Else
|
||||
'HostDevicefile = $"{HostDevFNP}{Grid1.Cell(intlabel, 1).Text}.xml"
|
||||
HostDevicefile = HostDevFNP & Grid1.Cell(intlabel, 1).Text.Replace("_", "-") & ".xml"
|
||||
|
||||
If IO.File.Exists(HostDevicefile) Then
|
||||
model = LoadModelFromXml(HostDevicefile)
|
||||
kval = Analysismodel(model, intlabel, col)
|
||||
DeviceModuleDic.Add(Grid1.Cell(intlabel, 1).Text, model)
|
||||
Else
|
||||
MsgBox($"加载失败!未找到文件{Grid1.Cell(intlabel, 1).Text}.xml")
|
||||
TestForm1_Load(Nothing, Nothing)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
intlabel = kval.Key
|
||||
col = kval.Value
|
||||
End While
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function Analysismodel(model As DeviceModel, row As Integer, col As Integer) As KeyValuePair(Of Integer, Integer)
|
||||
Dim filename As String = Grid1.Cell(row, 1).Text
|
||||
Dim keystr As String
|
||||
For Each inten In model.Nodes
|
||||
If inten.Name.Equals("RELAY") Then
|
||||
For Each node In inten.Nodes
|
||||
node.Name = Grid1.Cell(ComboDropDownON.LightingCircuit2, col).Text
|
||||
col = col + 1
|
||||
Next
|
||||
End If
|
||||
If inten.Name.Equals("DI") Then
|
||||
For Each node In inten.Nodes
|
||||
node.Name = Grid1.Cell(row, 3).Text
|
||||
'添加行数据
|
||||
Dim dic As New Dictionary(Of Integer, String)
|
||||
|
||||
For i As Integer = 5 To Grid1.Cols - 1
|
||||
If Grid1.Cell(row, i).Text.Length > 0 Then
|
||||
dic.Add(i, Grid1.Cell(row, i).Text)
|
||||
End If
|
||||
Next
|
||||
keystr = $"{filename}:{Grid1.Cell(row, 2).Text}"
|
||||
SwitchConfig.Add(keystr, dic)
|
||||
|
||||
row = row + 1
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Dim ndic As New Dictionary(Of Integer, Integer)
|
||||
ndic.Add(row, col)
|
||||
For Each inten In ndic
|
||||
Return inten
|
||||
Next
|
||||
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub ToolStripButton2_Click_1(sender As Object, e As EventArgs) Handles ToolStripButton2.Click
|
||||
Using dlg As New SaveFileDialog
|
||||
|
||||
|
||||
With dlg
|
||||
.InitialDirectory = Application.StartupPath
|
||||
.RestoreDirectory = True
|
||||
.OverwritePrompt = True
|
||||
.AddExtension = True
|
||||
.DefaultExt = ".xml"
|
||||
.Title = "保存文件"
|
||||
.Filter = $"逻辑文件(*.flx)|*.flx"
|
||||
End With
|
||||
If dlg.ShowDialog <> DialogResult.OK Then Return
|
||||
|
||||
Grid1.SaveFile($"{ dlg.FileName }")
|
||||
MsgBox($"文件保存完成:{dlg.FileName}")
|
||||
End Using
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Public DeleteDevmodedic As List(Of DeleteDevmodeclass)
|
||||
Private Sub ToolStripButton7_Click(sender As Object, e As EventArgs) Handles ToolStripButton7.Click
|
||||
Dim Deletenode As DeleteDevmodeclass
|
||||
Dim crow As Integer = -1
|
||||
Integer.TryParse(Grid1.Cell(Grid1.ActiveCell.Row, 2).Text, crow)
|
||||
|
||||
Dim filestr As String = Grid1.Cell(Grid1.ActiveCell.Row - crow + 1, 1).Text
|
||||
Dim rownode As String
|
||||
If DeviceModuleDic.ContainsKey(filestr) Then
|
||||
|
||||
Dim Ctrldeletenode As New DeleteDevmodeclass(DeepCopyHelper.DeepCopy(SwitchConfig), DeepCopyHelper.DictionaryCopy(DeviceModuleDic), DevModeInserfilag)
|
||||
|
||||
|
||||
|
||||
DeleteDevmodedic.Add(Ctrldeletenode)
|
||||
If DeviceModuleDic.Item(filestr).Desc.DevInterface.Equals("RS485Polling") Then
|
||||
DevModeInserfilag = DevModeInserfilag - 1
|
||||
End If
|
||||
For Each node In DeviceModuleDic.Item(filestr).Nodes
|
||||
If node.Name.Equals("DI") Then
|
||||
For i As Integer = 0 To node.Nodes.Count - 1
|
||||
rownode = $"{filestr}:{i + 1}"
|
||||
If SwitchConfig.ContainsKey(rownode) Then
|
||||
SwitchConfig.Remove(rownode)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
Next
|
||||
DeviceModuleDic.Remove(filestr)
|
||||
|
||||
DeviceModuleDic = UpdataModuleDicDiinsertion(DeviceModuleDic)
|
||||
End If
|
||||
|
||||
|
||||
ShowRelay()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton8_Click(sender As Object, e As EventArgs) Handles ToolStripButton8.Click
|
||||
If DeleteDevmodedic.Count > 0 Then
|
||||
Dim linode As DeleteDevmodeclass = DeleteDevmodedic.Item(DeleteDevmodedic.Count - 1)
|
||||
SwitchConfig = linode.G_SwitchConfig
|
||||
DeviceModuleDic = linode.G_DeviceModuleDic
|
||||
DevModeInserfilag = linode.G_DevModeInserfilag
|
||||
DeleteDevmodedic.RemoveAt(DeleteDevmodedic.Count - 1)
|
||||
ShowRelay()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ToolStripButton9_Click(sender As Object, e As EventArgs) Handles ToolStripButton9.Click
|
||||
Dim lst As New List(Of Byte())
|
||||
|
||||
Dim newTableCompile As New TableCompile
|
||||
Dim configInfoLst As New List(Of Byte())
|
||||
' 编译配置信息
|
||||
Dim tmpInfo() As Byte = newTableCompile.FillConfigInfo(configInfo, DeviceModuleDic.Item("HostDevice").Name).ToArray
|
||||
configInfoLst.Add(tmpInfo)
|
||||
lst.AddRange(configInfoLst.ToArray)
|
||||
|
||||
'编译设备存在
|
||||
Dim deviceExistsDatas As List(Of Byte())
|
||||
Dim OutDevlist As New List(Of Byte)
|
||||
deviceExistsDatas = newTableCompile.FillDeviceExistsData(DeviceModuleDic, SwitchConfig)
|
||||
lst.AddRange(deviceExistsDatas.ToArray)
|
||||
'获取编译的设备动作
|
||||
Dim actibuf As List(Of Byte()) = newTableCompile.FillDeviceObject(DeviceModuleDic, SwitchConfig, Grid1)
|
||||
For Each buf In actibuf
|
||||
lst.Add(buf)
|
||||
Next
|
||||
|
||||
Dim frames As List(Of Byte()) = newTableCompile.FillDataFrames(lst)
|
||||
|
||||
|
||||
|
||||
'编译设备对象动作数据
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Dim filename As String = "C:\Users\Administrator\Desktop\Processform\test.dat"
|
||||
If IO.File.Exists(filename) Then IO.File.Delete(filename)
|
||||
Using steam As New IO.FileStream(filename, IO.FileMode.OpenOrCreate)
|
||||
For Each frame As Byte() In frames
|
||||
steam.Write(frame, 0, frame.Length)
|
||||
Console.WriteLine($"Length:{frame.Length:D4} Data:{BitConverter.ToString(frame).Replace("-", " ")}")
|
||||
Next
|
||||
steam.Flush()
|
||||
steam.Close()
|
||||
End Using
|
||||
Dim filebuff() As Byte = IO.File.ReadAllBytes(filename)
|
||||
Dim ismod As Integer = filebuff.Length Mod 4
|
||||
Dim buff As New List(Of Byte)
|
||||
buff.AddRange(filebuff)
|
||||
For isnum As Integer = 1 To (4 - ismod)
|
||||
buff.Add(0)
|
||||
Next
|
||||
IO.File.WriteAllBytes(filename, buff.ToArray)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
Public Class DeleteDevmodeclass
|
||||
Public G_SwitchConfig As Dictionary(Of String, Dictionary(Of Integer, String))
|
||||
Public G_DeviceModuleDic As Dictionary(Of String, DeviceModel)
|
||||
Public G_DevModeInserfilag As Integer
|
||||
Sub New(SwitchConfig As Dictionary(Of String, Dictionary(Of Integer, String)), DeviceModuleDic As Dictionary(Of String, DeviceModel), DevModeInserfilag As Integer)
|
||||
G_SwitchConfig = SwitchConfig
|
||||
G_DeviceModuleDic = DeviceModuleDic
|
||||
G_DevModeInserfilag = DevModeInserfilag
|
||||
End Sub
|
||||
End Class
|
||||
71
BLV_Studio/Test/XmlSerializer.vb
Normal file
71
BLV_Studio/Test/XmlSerializer.vb
Normal file
@@ -0,0 +1,71 @@
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
Imports System.Xml
|
||||
|
||||
Public Class XmlSerializer
|
||||
''' <summary>
|
||||
''' 将类对象序列化为xml文件
|
||||
''' </summary>
|
||||
''' <param name="path"></param>
|
||||
''' <param name="srcObject"></param>
|
||||
Public Shared Sub SerializeToXml(path As String, srcObject As Object)
|
||||
Dim serializer As New Xml.Serialization.XmlSerializer(srcObject.GetType)
|
||||
Dim xmlString As String = String.Empty
|
||||
|
||||
Using writer As New StringUTF8Writer()
|
||||
|
||||
serializer.Serialize(writer, srcObject)
|
||||
xmlString = writer.ToString()
|
||||
End Using
|
||||
|
||||
Using ws As New StreamWriter(path)
|
||||
ws.Write(xmlString)
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' 将类对象序列化为xml文件
|
||||
''' </summary>
|
||||
''' <param name="path"></param>
|
||||
''' <param name="srcObject"></param>
|
||||
Public Shared Sub SerializeToXml(Of T)(path As String, srcObject As T)
|
||||
Dim serializer As New Xml.Serialization.XmlSerializer(GetType(T))
|
||||
Dim xmlString As String
|
||||
|
||||
|
||||
Using writer As New StringUTF8Writer()
|
||||
serializer.Serialize(writer, srcObject)
|
||||
xmlString = writer.ToString()
|
||||
End Using
|
||||
|
||||
Using ws As New StreamWriter(path)
|
||||
ws.Write(xmlString)
|
||||
End Using
|
||||
End Sub
|
||||
|
||||
|
||||
''' <summary>
|
||||
''' 从Xml文件中反序列化成指定类
|
||||
''' </summary>
|
||||
''' <typeparam name="T"></typeparam>
|
||||
''' <param name="path"></param>
|
||||
''' <returns></returns>
|
||||
Public Shared Function DeserializeFormXml(Of T)(path As String) As T
|
||||
Dim serializer As New Xml.Serialization.XmlSerializer(GetType(T))
|
||||
|
||||
Using reader As New StreamReader(path)
|
||||
Return CType(serializer.Deserialize(reader), T)
|
||||
End Using
|
||||
End Function
|
||||
|
||||
|
||||
Public Class StringUTF8Writer
|
||||
Inherits StringWriter
|
||||
|
||||
Public Overrides ReadOnly Property Encoding As Encoding
|
||||
Get
|
||||
Return Encoding.UTF8
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Class
|
||||
Reference in New Issue
Block a user