初始化项目

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

View File

@@ -0,0 +1,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

View File

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

View File

@@ -0,0 +1,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, tbuf0)
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.ComboBox2.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 buf2 + 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(buf2 + 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(buf2 + 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
.Column2.Locked = True
.SelectionMode = SelectionModeEnum.ByCell
End With
End Sub
End Class

View 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

View File

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

View File

@@ -0,0 +1,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

View 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

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
Public Class CompileTable
End Class

View File

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

View File

@@ -0,0 +1,47 @@

Public Class DTableConfigie
Enum Devtype
RCUModel
Model_485P
Model_485A
End Enum
End Class

View 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

View File

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

View File

@@ -0,0 +1,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

View 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

View 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

View File

@@ -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

View File

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

File diff suppressed because it is too large Load Diff

View 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

View File

@@ -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

View File

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

View 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(buf0) 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(buf1) 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(buf2) 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 <= intbuf2 And intbuf2 <= 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}{ strbuf0.Trim},"
kval = $"{kval}{ strbuf1.Trim},"
Else
name = $"{name}{ strbuf0.Trim},"
kval = $"{kval}{ strbuf0.Trim}"
End If
strbuf = ComboBox3.Text.Split(" ")
If strbuf.Length > 1 Then
name = $"{name}{ strbuf0.Trim},"
kval = $"{kval}{ strbuf1.Trim},"
Else
name = $"{name}{ strbuf0.Trim},"
kval = $"{kval}{ strbuf0.Trim}"
End If
strbuf = ComboBox2.Text.Split(" ")
If strbuf.Length > 1 Then
name = $"{name}{ strbuf0.Trim}"
kval = $"{kval}{ strbuf1.Trim}"
Else
name = $"{name}{ strbuf0.Trim}"
kval = $"{kval}{ strbuf0.Trim}"
End If
TextBox1.Text = $"{kval }{vbCrLf }({name})"
GmusicVal = name
End Sub
End Class

View 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

View File

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

View File

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

View 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

View File

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

File diff suppressed because it is too large Load Diff

View 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

View File

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

View File

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

View 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

View File

@@ -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

View File

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

View File

@@ -0,0 +1,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 IsNothingG_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(buf0) 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(buf1) 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(buf2) 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(buf3)
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

View File

@@ -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 IsNothingG_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(buf0) 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(buf1) 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(buf2) Then
ComboBox3.SelectedIndex = i
Exit For
End If
Next
End If
If buf.Length > 3 Then
Dim cbuf As String = FGetDelayUnit(buf3)
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}{ strbuf0.Trim}," '1,
kval = $"{kval}{ strbuf1.Trim}," '服务,
Else
name = $"{name}{ strbuf0.Trim}," ',
kval = $"{kval}{ strbuf0.Trim}" '
End If
strbuf = ComboBox2.Text.Split(" ")
If strbuf.Length > 1 Then
name = $"{name}{ strbuf0.Trim},"
kval = $"{kval}{ strbuf1.Trim},"
Else
name = $"{name}{ strbuf0.Trim},"
kval = $"{kval}{ strbuf0.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

File diff suppressed because it is too large Load Diff

View 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

View File

@@ -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

View 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