commit dfd65e5982a5719d460c7e7d3796f24f72de2dba Author: XuJiacheng Date: Thu Dec 11 11:57:07 2025 +0800 初始化 diff --git a/.vs/NoCarPowerSupply/v16/.suo b/.vs/NoCarPowerSupply/v16/.suo new file mode 100644 index 0000000..6e6a8ed Binary files /dev/null and b/.vs/NoCarPowerSupply/v16/.suo differ diff --git a/App.config b/App.config new file mode 100644 index 0000000..1c75772 --- /dev/null +++ b/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Form1.Designer.vb b/Form1.Designer.vb new file mode 100644 index 0000000..9d5546f --- /dev/null +++ b/Form1.Designer.vb @@ -0,0 +1,156 @@ + _ +Partial Class Form1 + Inherits System.Windows.Forms.Form + + 'Form 重写 Dispose,以清理组件列表。 + _ + 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 窗体设计器修改它。 + '不要使用代码编辑器修改它。 + _ + Private Sub InitializeComponent() + Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1)) + Me.ToolStrip1 = New System.Windows.Forms.ToolStrip() + Me.ToolStripButton4 = New System.Windows.Forms.ToolStripButton() + Me.ToolStripButton3 = New System.Windows.Forms.ToolStripButton() + Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton() + Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton() + Me.SplitContainer1 = New System.Windows.Forms.SplitContainer() + Me.PortTable = New FlexCell.Grid() + Me.IfGrid = New FlexCell.Grid() + Me.ToolStrip1.SuspendLayout() + CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainer1.Panel1.SuspendLayout() + Me.SplitContainer1.Panel2.SuspendLayout() + Me.SplitContainer1.SuspendLayout() + Me.SuspendLayout() + ' + 'ToolStrip1 + ' + Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton4, Me.ToolStripButton3, Me.ToolStripButton2, Me.ToolStripButton1}) + Me.ToolStrip1.Location = New System.Drawing.Point(0, 0) + Me.ToolStrip1.Name = "ToolStrip1" + Me.ToolStrip1.Size = New System.Drawing.Size(1319, 25) + Me.ToolStrip1.TabIndex = 0 + Me.ToolStrip1.Text = "ToolStrip1" + ' + 'ToolStripButton4 + ' + Me.ToolStripButton4.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.ToolStripButton4.Image = CType(resources.GetObject("ToolStripButton4.Image"), System.Drawing.Image) + Me.ToolStripButton4.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton4.Name = "ToolStripButton4" + Me.ToolStripButton4.Size = New System.Drawing.Size(72, 22) + Me.ToolStripButton4.Text = "删除条件组" + ' + 'ToolStripButton3 + ' + Me.ToolStripButton3.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.ToolStripButton3.Image = CType(resources.GetObject("ToolStripButton3.Image"), System.Drawing.Image) + Me.ToolStripButton3.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton3.Name = "ToolStripButton3" + Me.ToolStripButton3.Size = New System.Drawing.Size(60, 22) + Me.ToolStripButton3.Text = "删除条件" + ' + 'ToolStripButton2 + ' + Me.ToolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.ToolStripButton2.Image = CType(resources.GetObject("ToolStripButton2.Image"), System.Drawing.Image) + Me.ToolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton2.Name = "ToolStripButton2" + Me.ToolStripButton2.Size = New System.Drawing.Size(72, 22) + Me.ToolStripButton2.Text = "添加条件组" + ' + 'ToolStripButton1 + ' + Me.ToolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text + Me.ToolStripButton1.Image = CType(resources.GetObject("ToolStripButton1.Image"), System.Drawing.Image) + Me.ToolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta + Me.ToolStripButton1.Name = "ToolStripButton1" + Me.ToolStripButton1.Size = New System.Drawing.Size(60, 22) + Me.ToolStripButton1.Text = "添加条件" + ' + 'SplitContainer1 + ' + Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill + Me.SplitContainer1.Location = New System.Drawing.Point(0, 25) + Me.SplitContainer1.Name = "SplitContainer1" + Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal + ' + 'SplitContainer1.Panel1 + ' + Me.SplitContainer1.Panel1.Controls.Add(Me.PortTable) + ' + 'SplitContainer1.Panel2 + ' + Me.SplitContainer1.Panel2.Controls.Add(Me.IfGrid) + Me.SplitContainer1.Size = New System.Drawing.Size(1319, 764) + Me.SplitContainer1.SplitterDistance = 417 + Me.SplitContainer1.TabIndex = 1 + ' + 'PortTable + ' + Me.PortTable.DefaultFont = New System.Drawing.Font("宋体", 9.0!) + Me.PortTable.Dock = System.Windows.Forms.DockStyle.Fill + Me.PortTable.ExtendLastCol = True + 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.MouseWheelSpeed = CType(3, Short) + Me.PortTable.Name = "PortTable" + Me.PortTable.Size = New System.Drawing.Size(1319, 417) + Me.PortTable.TabIndex = 2 + ' + 'IfGrid + ' + Me.IfGrid.DefaultFont = New System.Drawing.Font("宋体", 9.0!) + Me.IfGrid.Dock = System.Windows.Forms.DockStyle.Fill + Me.IfGrid.ExtendLastCol = True + 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.MouseWheelSpeed = CType(3, Short) + Me.IfGrid.Name = "IfGrid" + Me.IfGrid.Size = New System.Drawing.Size(1319, 343) + Me.IfGrid.TabIndex = 2 + ' + 'Form1 + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(1319, 789) + Me.Controls.Add(Me.SplitContainer1) + Me.Controls.Add(Me.ToolStrip1) + Me.Name = "Form1" + Me.Text = "Form1" + Me.ToolStrip1.ResumeLayout(False) + Me.ToolStrip1.PerformLayout() + Me.SplitContainer1.Panel1.ResumeLayout(False) + Me.SplitContainer1.Panel2.ResumeLayout(False) + CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainer1.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents ToolStrip1 As ToolStrip + Friend WithEvents SplitContainer1 As SplitContainer + Friend WithEvents ToolStripButton4 As ToolStripButton + Friend WithEvents ToolStripButton3 As ToolStripButton + Friend WithEvents ToolStripButton2 As ToolStripButton + Friend WithEvents ToolStripButton1 As ToolStripButton + Friend WithEvents PortTable As FlexCell.Grid + Friend WithEvents IfGrid As FlexCell.Grid +End Class diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..b8b1aeb --- /dev/null +++ b/Form1.resx @@ -0,0 +1,184 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/Form1.vb b/Form1.vb new file mode 100644 index 0000000..23a3432 --- /dev/null +++ b/Form1.vb @@ -0,0 +1,1249 @@ +Imports System.Text + +Public Class Form1 + + Public Isoneload As Boolean = False + Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load + '设置界面显示项目名称及版本 + Me.Text = "NoCarPowerSupply_" & My.Application.Info.Version.ToString + + + Isoneload = False + InitIfGrid1() + InitPortTable1() + Isoneload = True + + End Sub + Public isxiugai1 As Boolean = False + Public Sub InitPortTable1() + PortTable.NewFile() + PortTable.ExtendLastCol = False + PortTable.Cols = 9 + PortTable.Rows = 6 + PortTable.Cell(0, 0).Text = "端口" + PortTable.Cell(0, 1).Text = "别名" + PortTable.Cell(0, 2).Text = "输入端口(需要先在主页设置输入回路别名)" + PortTable.Cell(0, 3).Text = "无人->有人阈值(百分比)" + PortTable.Cell(0, 4).Text = "有人->无人阈值(百分比)" + PortTable.Cell(0, 5).Text = "启用" + PortTable.Cell(0, 6).Text = "检测时间" + PortTable.Cell(0, 7).Text = "检测时间单位" + PortTable.Cell(0, 8).Text = "数据" + + PortTable.Row(0).Locked = True + PortTable.Column(0).Width = 100 + PortTable.Column(1).Width = 80 + PortTable.Column(2).Width = 250 + PortTable.Column(3).Width = 150 + PortTable.Column(4).Width = 150 + PortTable.Column(5).Width = 30 + PortTable.Column(6).Width = 60 + PortTable.Column(7).Width = 80 + PortTable.Column(8).Width = 20 + ' PortTable.Column(1).CellType = FlexCell.CellTypeEnum.ComboBox + 'PortTable.Column(2).CellType = FlexCell.CellTypeEnum.ComboBox + PortTable.Column(3).CellType = FlexCell.CellTypeEnum.ComboBox + PortTable.Column(4).CellType = FlexCell.CellTypeEnum.ComboBox + PortTable.Column(5).CellType = FlexCell.CellTypeEnum.CheckBox + PortTable.Column(6).CellType = FlexCell.CellTypeEnum.ComboBox + PortTable.Column(7).CellType = FlexCell.CellTypeEnum.ComboBox + PortTable.Column(8).CellType = FlexCell.CellTypeEnum.Button + + ''PortTable.Column(1).Locked = True + 'PortTable.ComboBox(2).Locked = True + 'PortTable.ComboBox(3).Locked = True + 'PortTable.ComboBox(4).Locked = True + ''PortTable.ComboBox(5).Locked = True + 'PortTable.ComboBox(6).Locked = True + 'PortTable.ComboBox(7).Locked = True + + PortTable.Column(0).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(1).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(2).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(3).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(7).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(4).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(5).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(6).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(7).Alignment = FlexCell.AlignmentEnum.CenterCenter + PortTable.Column(8).Alignment = FlexCell.AlignmentEnum.CenterCenter + + isxiugai1 = False + Dim sbuf() As String + For i = 1 To 5 + PortTable.Cell(i, 1).Text = " " + If i = 1 Then + PortTable.Cell(i, 0).Text = "有卡取电" + Else + PortTable.Cell(i, 0).Text = $"无卡取电 CH {i - 1}" + End If + + + PortTable.Cell(i, 1).Text = GetPortName(i) + PortTable.Cell(i, 2).Text = i + PortTable.Cell(i, 3).Text = 0 + PortTable.Cell(i, 4).Text = 0 + PortTable.Cell(i, 5).Text = 0 + PortTable.Cell(i, 6).Text = 0 + PortTable.Cell(i, 7).Text = "秒" + + 'If i < 4 Then + ' PortTable.Cell(i, 3).Text = 0 + ' If i = 2 Or i = 3 Then + ' PortTable.Cell(i, 4).Locked = True + ' PortTable.Cell(i, 3).Locked = True + ' End If + 'Else + + 'PortTable.Cell(i, 3).Text = 50 + 'If i = 6 Then + ' PortTable.Cell(i, 3).Text = 10 + ' End If + 'End If + + Next + isxiugai1 = True + End Sub + Public Function GetPortName(rowindex As Integer) + Dim result As String = String.Empty + Select Case rowindex + + Case 1 + result = "有卡取电" + Case 2 + result = "开门磁" + Case 3 + result = "门口红外" + Case 4 + result = "卫红外" + Case 5 + result = "浴红外" + Case 6 + result = "床头红外" + Case 7 + result = "镜前红外" + Case 8 + result = "休闲红外" + Case 9 + result = "客厅红外" + Case 10 + result = "厅卫红外" + Case 11 + result = "浴缸红外" + + End Select + Return result + End Function + + Private IfGridRowdic As Dictionary(Of String, List(Of String)) + Public Sub InitIfGrid1() + IfGrid.NewFile() + IfGrid.ExtendLastCol = False + IfGrid.Cols = 21 + IfGrid.Rows = 1 + + IfGrid.Cell(0, 1).Text = "条件组" + IfGrid.Cell(0, 2).Text = "条件序号" + IfGrid.Cell(0, 3).Text = "有无人标记" + IfGrid.Cell(0, 4).Text = "端口1" + IfGrid.Cell(0, 5).Text = "端口2" + IfGrid.Cell(0, 6).Text = "端口3" + IfGrid.Cell(0, 7).Text = "端口4" + IfGrid.Cell(0, 8).Text = "端口5" + IfGrid.Cell(0, 9).Text = "端口6" + IfGrid.Cell(0, 10).Text = "端口7" + IfGrid.Cell(0, 11).Text = "端口8" + IfGrid.Cell(0, 12).Text = "端口9" + IfGrid.Cell(0, 13).Text = "端口10" + IfGrid.Cell(0, 14).Text = "端口11" + IfGrid.Cell(0, 15).Text = "触发阈值" + IfGrid.Cell(0, 16).Text = "持续判定时间" + IfGrid.Cell(0, 17).Text = "持续判定时间单位" + IfGrid.Cell(0, 18).Text = "条件组超时时间" + IfGrid.Cell(0, 19).Text = "条件组超时时间单位" + IfGrid.Cell(0, 20).Text = "数据" + For n = 9 To 14 + IfGrid.Column(n).Visible = False + Next + + + IfGrid.Column(3).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(4).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(5).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(6).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(7).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(8).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(9).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(10).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(11).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(12).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(13).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(14).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(15).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(16).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(17).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(18).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(19).CellType = FlexCell.CellTypeEnum.ComboBox + IfGrid.Column(20).CellType = FlexCell.CellTypeEnum.Button + + IfGrid.Column(0).Width = 0 + IfGrid.Column(1).Width = 50 + IfGrid.Column(2).Width = 60 + IfGrid.Column(3).Width = 60 + IfGrid.Column(4).Width = 60 + IfGrid.Column(5).Width = 60 + IfGrid.Column(6).Width = 60 + IfGrid.Column(7).Width = 60 + IfGrid.Column(8).Width = 60 + IfGrid.Column(9).Width = 60 + IfGrid.Column(10).Width = 60 + IfGrid.Column(11).Width = 60 + IfGrid.Column(12).Width = 60 + IfGrid.Column(13).Width = 60 + IfGrid.Column(14).Width = 60 + IfGrid.Column(15).Width = 60 + IfGrid.Column(16).Width = 60 + IfGrid.Column(17).Width = 60 + IfGrid.Column(18).Width = 60 + IfGrid.Column(19).Width = 60 + IfGrid.Column(20).Width = 20 + IfGrid.Column(0).Visible = True + 'IfGrid.Column(1).Locked = True + 'IfGrid.Column(2).Locked = True + 'IfGrid.ComboBox(3).Locked = True + 'IfGrid.ComboBox(5).Locked = True + 'IfGrid.ComboBox(6).Locked = True + 'IfGrid.ComboBox(7).Locked = True + 'IfGrid.ComboBox(11).Locked = True + 'IfGrid.ComboBox(12).Locked = True + 'IfGrid.ComboBox(4).Locked = True + 'IfGrid.ComboBox(8).Locked = True + 'IfGrid.ComboBox(9).Locked = True + 'IfGrid.ComboBox(10).Locked = True + 'IfGrid.ComboBox(13).Locked = True + 'IfGrid.ComboBox(14).Locked = True + 'IfGrid.ComboBox(15).Locked = True + 'IfGrid.ComboBox(16).Locked = True + 'IfGrid.ComboBox(17).Locked = True + 'IfGrid.ComboBox(18).Locked = True + 'IfGrid.ComboBox(19).Locked = True + + IfGrid.Column(0).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(1).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(2).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(3).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(4).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(5).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(6).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(7).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(8).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(9).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(10).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(11).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(12).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(13).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(14).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(15).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(16).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(17).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(18).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(19).Alignment = FlexCell.AlignmentEnum.CenterCenter + IfGrid.Column(15).Visible = False + ' IfGrid.Column(18).Visible = False + + BuildTableRow1() + + + + + End Sub + + + Public Sub BuildTableRow1() + IfGridRowdic = New Dictionary(Of String, List(Of String)) + + + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 1 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 1 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"开门" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 2 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 1 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"关门" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + + + IfGrid.AddItem("") + Dim startR As Integer = IfGrid.Rows - 1 + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 1 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 2 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 4 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 5 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 6 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 7 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 8 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 3 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 9 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "无人至有人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"触发" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"1" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"秒" + + IfGrid.Column(1).Locked = False + IfGrid.Range(startR, 1, IfGrid.Rows - 1, 1).Merge() + IfGrid.Range(startR, 18, IfGrid.Rows - 1, 18).Merge() + IfGrid.Range(startR, 19, IfGrid.Rows - 1, 19).Merge() + IfGrid.Column(1).Locked = True + + + + + IfGrid.AddItem("") + startR = IfGrid.Rows - 1 + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 4 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 1 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "短暂离开" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"开至关" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"10" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"分" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 4 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 2 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "短暂离开" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"关门" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"10" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"分" + + IfGrid.Column(1).Locked = False + IfGrid.Range(startR, 1, IfGrid.Rows - 1, 1).Merge() + IfGrid.Range(startR, 18, IfGrid.Rows - 1, 18).Merge() + IfGrid.Range(startR, 19, IfGrid.Rows - 1, 19).Merge() + IfGrid.Column(1).Locked = True + + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 5 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 1 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "长期离开" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"开门" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"10" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"分" + + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = 6 + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = 1 + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 1 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "有人至无人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"开门" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"释放" + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"10" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"分" + + IfGridRowdic.Clear() + Dim headname As CtabRange + Dim keystr As String = String.Empty + Dim li As List(Of String) + For i = 1 To IfGrid.Rows - 1 + headname = New CtabRange(IfGrid, i, 1) ' IfGrid.Cell(i, 1).Tag + If IfGridRowdic.ContainsKey(headname.devname) Then + li = IfGridRowdic.Item(headname.devname) + Else + li = New List(Of String) + IfGridRowdic.Add(headname.devname, li) + End If + + For j = 2 To IfGrid.Cols - 1 + 'If IfGrid.Column(j).Locked Then + ' Continue For + 'End If + keystr = $"{keystr},{IfGrid.Cell(i, j).Text}" + Next + + keystr = keystr.Remove(0, 1) + li.Add(keystr) + keystr = String.Empty + Next + End Sub + + Private Sub PortTable_CellChange(Sender As Object, e As FlexCell.Grid.CellChangeEventArgs) Handles PortTable.CellChange + If e.Row > 0 AndAlso e.Col = 1 Then + Dim headname As String = PortTable.Cell(e.Row, e.Col).Text.Trim + IfGrid.Cell(0, e.Row + 3).Text = headname + + If String.IsNullOrEmpty(headname) Then + IfGrid.Column(e.Row + 3).Locked = True + Else + IfGrid.Column(e.Row + 3).Locked = False + End If + ElseIf e.Row > 0 AndAlso e.Col = 2 Then + 'Dim addr As String = PortTable.Cell(e.Row, e.Col).Text + 'If String.IsNullOrEmpty(addr) Then + ' PortTable.Cell(e.Row, e.Col).Tag = "" + 'Else + ' ParseDevDic.Item(PortTable.Cell(e.Row, e.Col - 1).Text).Item(addr).Values(0).ToArray() + + 'End If + 'ElseIf e.Row > 0 AndAlso e.Col = 4 Then + ' Dim typestr As String = PortTable.Cell(e.Row, e.Col - 2).Text + ' Dim addr As String = PortTable.Cell(e.Row, e.Col - 1).Text + ' Dim nloop As String = PortTable.Cell(e.Row, e.Col).Text + ' If String.IsNullOrEmpty(addr) OrElse String.IsNullOrEmpty(typestr) Then + ' PortTable.Cell(e.Row, e.Col).Text = "" + ' MsgBox("请先选择端口类型!") + ' Return + ' End If + + ' For Each index In ParseDevDic.Item(typestr).Item(addr).Values(0).ToArray + ' If index.Item1.Equals(nloop) AndAlso isxiugai1 Then + ' PortTable.Cell(e.Row, 1).Text = index.Item2 + ' End If + ' Next + End If + End Sub + + Private Sub PortTable_ComboDropDown(Sender As Object, e As FlexCell.Grid.ComboDropDownEventArgs) Handles PortTable.ComboDropDown + Dim headname As String = PortTable.Cell(0, e.Col).Text + Select Case e.Col + 'Case 2 + ' PortTable.ComboBox(e.Col).Items.Clear() + ' PortTable.ComboBox(e.Col).Items.Add(" ") + ' PortTable.ComboBox(e.Col).Items.AddRange({"1"}) + + 'Case "端口地址" + ' Dim addr As String = PortTable.Cell(e.Row, e.Col - 1).Text + ' If String.IsNullOrEmpty(addr) Then + ' MsgBox("请先选择端口类型!") + ' Return + ' End If + ' PortTable.ComboBox(e.Col).Items.Clear() + ' PortTable.ComboBox(e.Col).Items.AddRange(ParseDevDic.Item(addr).Keys.ToArray) + 'Case "端口回路" + ' Dim typestr As String = PortTable.Cell(e.Row, e.Col - 2).Text + ' Dim addr As String = PortTable.Cell(e.Row, e.Col - 1).Text + ' If String.IsNullOrEmpty(addr) OrElse String.IsNullOrEmpty(typestr) Then + ' MsgBox("请先选择端口类型!") + ' Return + ' End If + ' PortTable.ComboBox(e.Col).Items.Clear() + ' For Each index In ParseDevDic.Item(typestr).Item(addr).Values(0).ToArray + ' PortTable.ComboBox(e.Col).Items.Add(index.Item1) + ' Next + ' 'PortTable.ComboBox(e.Col).Items.AddRange(ParseDevDic.Item(typestr).Item(addr).Values(0).ToArray) + + ' PortTable.Cell(e.Row, e.Col).Tag = ParseDevDic.Item(typestr).Item(addr).Keys(0) + + + 'PortTable.Cell(e.Row, 1).Text = + Case 3, 4 + PortTable.ComboBox(e.Col).Items.Clear() + For i = 0 To 100 + PortTable.ComboBox(e.Col).Items.Add(i) + Next + Case 6 + PortTable.ComboBox(e.Col).Items.Clear() + For i = 0 To 255 + PortTable.ComboBox(e.Col).Items.Add(i) + Next + Case 7 + PortTable.ComboBox(e.Col).Items.Clear() + PortTable.ComboBox(e.Col).Items.AddRange({"秒", "分", "时"}) + + End Select + End Sub + Public IsnotCellChange As Boolean + Private Sub IfGrid_CellChange(Sender As Object, e As FlexCell.Grid.CellChangeEventArgs) Handles IfGrid.CellChange + If e.Row = 0 Then Return + Dim celltext As String = IfGrid.Cell(e.Row, e.Col).Text + If celltext.Contains("无人至有人") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.Blue + + If IsnotCellChange Then Return + IsnotCellChange = True + Dim ta As CtabRange + ta = New CtabRange(IfGrid, e.Row, 1) + For i = ta.fr To ta.lr + IfGrid.Cell(i, e.Col).Text = "无人至有人" + Next + IsnotCellChange = False + + ElseIf celltext.Contains("有人至无人") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.Orange + + If IsnotCellChange Then Return + IsnotCellChange = True + Dim ta As CtabRange + ta = New CtabRange(IfGrid, e.Row, 1) + For i = ta.fr To ta.lr + IfGrid.Cell(i, e.Col).Text = "有人至无人" + Next + IsnotCellChange = False + + ElseIf celltext.Contains("短暂离开") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.Brown + If IsnotCellChange Then Return + IsnotCellChange = True + Dim ta As CtabRange + ta = New CtabRange(IfGrid, e.Row, 1) + For i = ta.fr To ta.lr + IfGrid.Cell(i, e.Col).Text = "短暂离开" + Next + '从ta.fr 行往第一行查找 + For i = ta.fr To 1 Step -1 + If IfGrid.Cell(i, e.Col).Text.Trim.Equals("长期离开") OrElse IfGrid.Cell(i, e.Col).Text.Trim.Equals("有人至无人") Then + IfGrid.Cell(i, e.Col).Text = "短暂离开" + End If + Next + If Isoneload Then + If ta.lr = IfGrid.Rows - 1 Then + MsgBox("短暂离开不能作为最后一行,请以'有人至无人'作为最后一行!") + Return + End If + End If + + For i = ta.lr To IfGrid.Rows - 1 + If IfGrid.Cell(i, e.Col).Text.Trim.Equals("无人至有人") Then + IfGrid.Cell(i, e.Col).Text = "有人至无人" + End If + Next + + + + IsnotCellChange = False + + ElseIf celltext.Contains("长期离开") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.Violet + If IsnotCellChange Then Return + IsnotCellChange = True + Dim ta As CtabRange + ta = New CtabRange(IfGrid, e.Row, 1) + For i = ta.fr To ta.lr + IfGrid.Cell(i, e.Col).Text = "长期离开" + Next + '从ta.fr 行往第一行查找 + For i = ta.fr To 1 Step -1 + If IfGrid.Cell(i, e.Col).Text.Trim.Equals("有人至无人") Then + IfGrid.Cell(i, e.Col).Text = "长期离开" + End If + Next + If Isoneload Then + If ta.lr = IfGrid.Rows - 1 Then + MsgBox("长期离开 不能作为最后一行,请以'有人至无人'作为最后一行!") + Return + End If + End If + + For i = ta.lr + 1 To IfGrid.Rows - 1 + If IfGrid.Cell(i, e.Col).Text.Trim.Equals("短暂离开") OrElse IfGrid.Cell(i, e.Col).Text.Trim.Equals("无人至有人") OrElse IfGrid.Cell(i, e.Col).Text.Trim.Equals("长期离开") Then + IfGrid.Cell(i, e.Col).Text = "有人至无人" + End If + Next + IsnotCellChange = False + + ElseIf celltext.Contains("释放") OrElse celltext.Contains("开门") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.Green + ElseIf celltext.Contains("不判断") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.LightGray + ElseIf celltext.Contains("触发") OrElse celltext.Contains("关门") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.OrangeRed + ElseIf celltext.Contains("关至开") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.MediumVioletRed + ElseIf celltext.Contains("开至关") Then + IfGrid.Cell(e.Row, e.Col).ForeColor = Color.LightGreen + End If + + + Dim na, nb As CtabRange + na = New CtabRange(IfGrid, e.Row, 18) + nb = New CtabRange(IfGrid, e.Row, 19) + If String.IsNullOrEmpty(IfGrid.Cell(e.Row, 16).Text) OrElse + String.IsNullOrEmpty(IfGrid.Cell(e.Row, 17).Text) OrElse + String.IsNullOrEmpty(na.devname) OrElse String.IsNullOrEmpty(nb.devname) Then + Else + Dim ct, nt As Double + IfGrid.Cell(e.Row, 16).BackColor = Color.White + IfGrid.Cell(e.Row, 17).BackColor = Color.White + IfGrid.Cell(e.Row, 18).BackColor = Color.White + IfGrid.Cell(e.Row, 19).BackColor = Color.White + ct = GetTableTimeUnit(IfGrid.Cell(e.Row, 16).Text, IfGrid.Cell(e.Row, 17).Text) + nt = GetTableTimeUnit(na.devname, nb.devname) + If nt = 0 Then + MsgBox("条件组超时时间不能为0!") + IfGrid.Cell(e.Row, e.Col).BackColor = Color.OrangeRed + Return + End If + If ct > nt Then + MsgBox("条件延时时间不能大于条件组超时时间!") + IfGrid.Cell(e.Row, e.Col).BackColor = Color.OrangeRed + Return + End If + End If + + + + End Sub + '将时间单位转换为秒、 + Public Function GetTableTimeUnit(ntime As String, timeunit As String) As Integer + If ntime.Equals("") OrElse timeunit.Equals("") Then Return 0 + '判断时间单位是 时、分、秒 + If timeunit.Equals("时") Then + Return CInt(ntime) * 3600 + ElseIf timeunit.Equals("分") Then + Return CInt(ntime) * 60 + ElseIf timeunit.Equals("秒") Then + Return CInt(ntime) + End If + End Function + Private Sub IfGrid_ComboDropDown(Sender As Object, e As FlexCell.Grid.ComboDropDownEventArgs) Handles IfGrid.ComboDropDown + Dim headname As String = IfGrid.Cell(0, e.Col).Text + If e.Col = 3 Then + IfGrid.ComboBox(e.Col).Items.Clear() + IfGrid.ComboBox(e.Col).Items.AddRange({"无人至有人", "有人至无人", "短暂离开", "长期离开"}) + ElseIf e.Col = 5 Then + IfGrid.ComboBox(e.Col).Items.Clear() + IfGrid.ComboBox(e.Col).Items.AddRange({"不判断", "开门", "关门", "关至开", "开至关"}) + ElseIf e.Col = 4 OrElse (e.Col >= 6 AndAlso e.Col < 15) Then + IfGrid.ComboBox(e.Col).Items.Clear() + IfGrid.ComboBox(e.Col).Items.AddRange({"不判断", "触发", "释放"}) + ElseIf e.Col = 15 OrElse e.Col = 16 OrElse e.Col = 18 Then + IfGrid.ComboBox(e.Col).Items.Clear() + For i = 0 To 255 + IfGrid.ComboBox(e.Col).Items.Add(i) + Next + + ElseIf e.Col = 17 OrElse e.Col = 19 Then + IfGrid.ComboBox(e.Col).Items.Clear() + IfGrid.ComboBox(e.Col).Items.AddRange({"秒", "分", "时"}) + End If + End Sub + + Private Sub PortTable_ButtonClick(Sender As Object, e As FlexCell.Grid.ButtonClickEventArgs) Handles PortTable.ButtonClick + Dim nt As Integer = -1 + Integer.TryParse(PortTable.Cell(e.Row, 2).Text.Trim, nt) + If nt = -1 Then + MsgBox("请输入正确的端口地址!") + Return + End If + Dim Tstr As String = String.Empty + For c = 1 To PortTable.Cols - 2 + If c = 2 Then + Tstr = $"{Tstr}{nt}," + Continue For + End If + Tstr = $"{Tstr}{PortTable.Cell(e.Row, c).Text.Trim}," + Next + ' "有卡取电,插卡(1),0,0,0,0,秒,1,2,0" + Tstr = Tstr.Substring(0, Tstr.Length - 1) + Dim buf As Byte() + Try + buf = GetPortInformation1(e.Row, Tstr) + Catch ex As Exception + MsgBox("生成数据失败!") + Return + End Try + + If buf Is Nothing OrElse buf.Length = 0 Then + MsgBox("生成数据失败!") + Return + End If + Dim data As New List(Of Byte()) + data.Add(buf) + data = FillDataFrames(data) + Dim str As String = BytesToHexString(data(0)) + Clipboard.SetText(str) + + End Sub + Public Function BytesToHexString(ByVal bytes As Byte()) As String + If bytes Is Nothing OrElse bytes.Length = 0 Then + Return String.Empty + End If + + Dim hex As New StringBuilder(bytes.Length * 3) ' 每个字节需要2个字符+1个空格 + For i As Integer = 0 To bytes.Length - 1 + ' 如果不是第一个字节,先添加一个空格 + If i > 0 Then + hex.Append(" ") + End If + hex.AppendFormat("{0:x2}", bytes(i)) + Next + + Return hex.ToString() + End Function + Public Function GetPortInformation1(LoopAddr As String, nStr As String) As Byte() + Dim cmd As Byte = &H9 + Dim Data = New List(Of Byte) + Dim strbuf() As String = nStr.Split(",") + Data.Add(cmd) + Data.Add(2) + Data.Add(1) + Data.AddRange(BitConverter.GetBytes(CShort(CInt(strbuf(1))))) + If String.IsNullOrEmpty(strbuf(2)) Then + Data.Add(0) + Else + Data.Add(CInt(strbuf(2))) + End If + Data.Add(CInt(LoopAddr)) '- 1) '增加了减1 + If String.IsNullOrEmpty(strbuf(4)) OrElse strbuf(4).Equals("0") Then + Data.Add(0) + Else + Data.Add(1) + End If + If String.IsNullOrEmpty(strbuf(5)) OrElse strbuf(5).Equals("0") Then + Data.AddRange(BitConverter.GetBytes(CShort(0))) + Else + Data.AddRange(BitConverter.GetBytes(CShort(CInt(strbuf(5))))) + End If + Data.Add(GetGlossary8(strbuf(6))) + If String.IsNullOrEmpty(strbuf(3)) Then + Data.Add(0) + Else + Data.Add(CInt(strbuf(3))) + End If + Return Data.ToArray + End Function + Public Function GetGlossary8(sb As String) As Byte + Dim result As Byte = 0 + Select Case sb + Case "秒" + result = 1 + Case "分" + result = 2 + Case "时" + result = 3 + Case Else + result = 0 + End Select + Return result + End Function + Public Function FillDataFrames(data As List(Of Byte())) As List(Of Byte()) + Dim result As New List(Of Byte()) + Dim index As Short = 1 + Dim count As Short = data.Count + + Dim frameBuf As List(Of Byte) + + Dim num As Integer = 0 + For Each buf As Byte() In data + num = num + buf.Length + + frameBuf = New List(Of Byte) + + '包头(2位) + frameBuf.Add(&HCC) + frameBuf.Add(&HC0) + + '长度(2位) + Dim length As Short = buf.Length + 10 + frameBuf.AddRange(BitConverter.GetBytes(length)) + + 'CRC校验(2位) + frameBuf.AddRange(New Byte() {0, 0}) + + '帧号(2位) + frameBuf.AddRange(BitConverter.GetBytes(index)) + + '帧总数(2位) + frameBuf.AddRange(BitConverter.GetBytes(count)) + + ''帧类型(1位) + 'frameBuf.Add(type) + + '帧参数(不定长) + frameBuf.AddRange(buf) + + + + + Dim crc() As Byte = GetCRC16CheckSum(frameBuf.ToArray, frameBuf.Count) + frameBuf(4) = crc(0) + frameBuf(5) = crc(1) + + index += 1 + result.Add(frameBuf.ToArray) + Next + 'Dim themore As Integer = num Mod 4 + + 'Console.WriteLine(num) + 'For isnum As Integer = 1 To (4 - themore) + ' result(result.Count -1).Add({0}) + 'Next + Return result + End Function + + ''' + ''' CRC16校验 + ''' + ''' + ''' + ''' + Public Function GetCRC16CheckSum(dataBuff() As Byte, length As Integer) As Byte() + Dim crc16 As UInteger + Dim crcBytes() As Byte + + crc16 = &HFFFF + For i = 0 To length - 1 + crc16 = crc16 And &HFFFF + crc16 = crc16 Xor dataBuff(i) + For bit = 0 To 7 + crc16 = IIf((crc16 And 1) = 0, crc16 >> 1, (crc16 >> 1) Xor &HA001) + Next + Next + crc16 = crc16 And &HFFFF + crcBytes = BitConverter.GetBytes(UShort.Parse(crc16)) + Return crcBytes + End Function + + Private Sub IfGrid_ButtonClick(Sender As Object, e As FlexCell.Grid.ButtonClickEventArgs) Handles IfGrid.ButtonClick + Dim buf As Byte() + Try + buf = GetConditionalInformation1(e) + Catch ex As Exception + MsgBox("生成数据失败!") + Return + End Try + + If buf Is Nothing OrElse buf.Length = 0 Then + MsgBox("生成数据失败!") + Return + End If + Dim data As New List(Of Byte()) + data.Add(buf) + data = FillDataFrames(data) + Dim str As String = BytesToHexString(data(0)) + Clipboard.SetText(str) + + End Sub + ' IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + 'IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + 'IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + 'IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"10" + 'IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"分" + Public Function GetConditionalInformation1(e As FlexCell.Grid.ButtonClickEventArgs) As Byte() + Dim cmd As Byte = &H8 + Dim Data = New List(Of Byte) + + Dim headname = New CtabRange(IfGrid, e.Row, 1) + Data.Add(cmd) + Data.Add(GetNoCarDataKeyVal(IfGrid.Cell(e.Row, 3).Text.Trim)) + Data.Add(CInt(headname.devname)) + Data.Add(CInt(IfGrid.Cell(e.Row, 2).Text.Trim)) + Data.AddRange(BitConverter.GetBytes(CShort(CInt(IfGrid.Cell(e.Row, 16).Text.Trim)))) + Data.Add(GetGlossary8(IfGrid.Cell(e.Row, 17).Text.Trim)) + For i = 4 To 8 '11变成10 + 'nbbuf = strbuf(i + 1).Split(":") + Data.Add(GetNoCarDataKeyVal(IfGrid.Cell(e.Row, i).Text.Trim)) 'i 加 1 编程 i+2 + Next + headname = New CtabRange(IfGrid, e.Row, 18) + Data.AddRange(BitConverter.GetBytes(CShort(CInt(headname.devname.Trim)))) + headname = New CtabRange(IfGrid, e.Row, 19) + Data.Add(GetGlossary8(headname.devname.Trim)) + Return Data.ToArray + End Function + Public Shared Function GetNoCarDataKeyVal(keystr As String) As Integer + + If keystr.Contains("无人至有人") Then + Return 1 + ElseIf keystr.Contains("有人至无人") Then + Return 2 + ElseIf keystr.Contains("释放") OrElse keystr.Contains("开门") Then + Return 2 + ElseIf keystr.Contains("不判断") Then + Return 0 + ElseIf keystr.Contains("触发") OrElse keystr.Contains("关门") Then + Return 1 + ElseIf keystr.Contains("关至开") OrElse keystr.Contains("长期离开") Then + Return 4 + ElseIf keystr.Contains("开至关") OrElse keystr.Contains("短暂离开") Then + Return 3 + End If + + Return 0 + + End Function + + Private Sub ToolStripButton4_Click(sender As Object, e As EventArgs) Handles ToolStripButton4.Click + Dim headname As CtabRange = New CtabRange(IfGrid, IfGrid.ActiveCell.Row, 1) + Dim number As Integer = 0 + Dim number1 As Integer = 1 + Dim frow As CtabRange + For i = headname.fr To headname.lr + IfGrid.Row(headname.lr - number).Delete() + number = number + 1 + Next + + For i = 2 To IfGrid.Rows - 1 + headname = New CtabRange(IfGrid, i, 1) + frow = New CtabRange(IfGrid, i - 1, 1) + If (CInt(headname.devname) - CInt(frow.devname) > 1) Then + number1 = CInt(headname.devname) + IfGrid.Cell(headname.fr, headname.fc).Text = (CInt(frow.devname) + 1) + Else + + End If + Next + + + 'Isoneload = False + ' InitIfGrid1(UniqueDevice.Desc.DevDescription) + ' Isoneload = True + + End Sub + + Private Sub ToolStripButton3_Click(sender As Object, e As EventArgs) Handles ToolStripButton3.Click + Dim headname As String = IfGrid.Cell(IfGrid.ActiveCell.Row, 2).Text + If headname.Equals("1") Then Return + Dim inrow As Integer = IfGrid.ActiveCell.Row + Dim Number = Integer.Parse(IfGrid.Cell(inrow, 2).Text) + Dim li As List(Of String) + Dim indexstr As CtabRange = New CtabRange(IfGrid, IfGrid.ActiveCell.Row, 1) + li = IfGridRowdic.Item(indexstr.devname) + li.RemoveAt(Number - 1) + IfGrid.Row(IfGrid.ActiveCell.Row).Delete() + For i = Number To li.Count + IfGrid.Cell(inrow, 2).Text = i + inrow = inrow + 1 + Next + End Sub + + Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles ToolStripButton2.Click + Dim i As String = (CInt(New CtabRange(IfGrid, IfGrid.Rows - 1, 1).devname) + 1) + Dim li As List(Of String) = New List(Of String) + IfGrid.AddItem("") + IfGrid.Cell(IfGrid.Rows - 1, 1).Text = $"{i}" + IfGrid.Cell(IfGrid.Rows - 1, 1).Tag = $"{i}" + IfGrid.Cell(IfGrid.Rows - 1, 2).Text = 1 + IfGrid.Cell(IfGrid.Rows - 1, 3).Text = "有人至无人" + IfGrid.Cell(IfGrid.Rows - 1, 4).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 5).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 6).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 7).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 8).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 9).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 10).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 11).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 12).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 13).Text = $"不判断" + IfGrid.Cell(IfGrid.Rows - 1, 14).Text = $"不判断" + + IfGrid.Cell(IfGrid.Rows - 1, 15).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 16).Text = $"0" + IfGrid.Cell(IfGrid.Rows - 1, 17).Text = $"秒" + IfGrid.Cell(IfGrid.Rows - 1, 18).Text = $"10" + IfGrid.Cell(IfGrid.Rows - 1, 19).Text = $"分" + li.Add($"{i},1,1,不判断,不判断,不判断,不判断,不判断,不判断,不判断,不判断,不判断,不判断,不判断,0,秒") + IfGridRowdic.Add(i, li) + End Sub + + Private Sub ToolStripButton1_Click(sender As Object, e As EventArgs) Handles ToolStripButton1.Click + AddIfGridRow() + End Sub + Public Sub AddIfGridRow() + Dim inrow As Integer = IfGrid.ActiveCell.Row + IfGrid.InsertRow(inrow, 1) + Dim li As List(Of String) + Dim nodestr As String = String.Empty + Dim number As Integer + For i = 0 To IfGrid.Cols - 1 + Dim indexstr As String = (New CtabRange(IfGrid, inrow + 1, 1)).devname + li = IfGridRowdic.Item(indexstr) + IfGrid.Cell(inrow, i).Text = IfGrid.Cell(inrow + 1, i).Text + If i = 1 Then + IfGrid.Cell(inrow, i).Tag = (New CtabRange(IfGrid, inrow + 1, 1)).devname + ElseIf i = 2 Then + number = Integer.Parse(IfGrid.Cell(inrow + 1, 2).Text) + End If + nodestr = $"{nodestr},{ IfGrid.Cell(inrow + 1, i).Text}" + Next + IfGrid.Column(1).Locked = False + IfGrid.Range(inrow, 1, inrow + 1, 1).Merge() + If IfGrid.Cols > 19 Then + IfGrid.Range(inrow, 18, inrow + 1, 18).Merge() + IfGrid.Range(inrow, 19, inrow + 1, 19).Merge() + End If + + IfGrid.Column(1).Locked = True + + nodestr = nodestr.Remove(0, 1) + li.Add(nodestr) + For i = number To li.Count + IfGrid.Cell(inrow, 2).Text = i + inrow = inrow + 1 + Next + + End Sub +End Class diff --git a/My Project/Application.Designer.vb b/My Project/Application.Designer.vb new file mode 100644 index 0000000..4633723 --- /dev/null +++ b/My Project/Application.Designer.vb @@ -0,0 +1,38 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + 'NOTE: This file is auto-generated; do not modify it directly. To make changes, + ' or if you encounter build errors in this file, go to the Project Designer + ' (go to Project Properties or double-click the My Project node in + ' Solution Explorer), and make changes on the Application tab. + ' + Partial Friend Class MyApplication + + _ + Public Sub New() + MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows) + Me.IsSingleInstance = false + Me.EnableVisualStyles = true + Me.SaveMySettingsOnExit = true + Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses + End Sub + + _ + Protected Overrides Sub OnCreateMainForm() + Me.MainForm = Global.NoCarPowerSupply.Form1 + End Sub + End Class +End Namespace diff --git a/My Project/Application.myapp b/My Project/Application.myapp new file mode 100644 index 0000000..1243847 --- /dev/null +++ b/My Project/Application.myapp @@ -0,0 +1,11 @@ + + + true + Form1 + false + 0 + true + 0 + 0 + true + diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb new file mode 100644 index 0000000..b2b15db --- /dev/null +++ b/My Project/AssemblyInfo.vb @@ -0,0 +1,35 @@ +Imports System +Imports System.Reflection +Imports System.Runtime.InteropServices + +' 有关程序集的一般信息由以下 +' 控制。更改这些特性值可修改 +' 与程序集关联的信息。 + +'查看程序集特性的值 + + + + + + + + + + +'如果此项目向 COM 公开,则下列 GUID 用于 typelib 的 ID + + +' 程序集的版本信息由下列四个值组成: +' +' 主版本 +' 次版本 +' 生成号 +' 修订号 +' +'可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值 +'通过使用 "*",如下所示: +' + + + diff --git a/My Project/Resources.Designer.vb b/My Project/Resources.Designer.vb new file mode 100644 index 0000000..30648e8 --- /dev/null +++ b/My Project/Resources.Designer.vb @@ -0,0 +1,62 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My.Resources + + 'This class was auto-generated by the StronglyTypedResourceBuilder + 'class via a tool like ResGen or Visual Studio. + 'To add or remove a member, edit your .ResX file then rerun ResGen + 'with the /str option, or rebuild your VS project. + ''' + ''' A strongly-typed resource class, for looking up localized strings, etc. + ''' + _ + Friend Module Resources + + Private resourceMan As Global.System.Resources.ResourceManager + + Private resourceCulture As Global.System.Globalization.CultureInfo + + ''' + ''' Returns the cached ResourceManager instance used by this class. + ''' + _ + Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager + Get + If Object.ReferenceEquals(resourceMan, Nothing) Then + Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("NoCarPowerSupply.Resources", GetType(Resources).Assembly) + resourceMan = temp + End If + Return resourceMan + End Get + End Property + + ''' + ''' Overrides the current thread's CurrentUICulture property for all + ''' resource lookups using this strongly typed resource class. + ''' + _ + Friend Property Culture() As Global.System.Globalization.CultureInfo + Get + Return resourceCulture + End Get + Set(ByVal value As Global.System.Globalization.CultureInfo) + resourceCulture = value + End Set + End Property + End Module +End Namespace diff --git a/My Project/Resources.resx b/My Project/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/My Project/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/My Project/Settings.Designer.vb b/My Project/Settings.Designer.vb new file mode 100644 index 0000000..7cda82e --- /dev/null +++ b/My Project/Settings.Designer.vb @@ -0,0 +1,73 @@ +'------------------------------------------------------------------------------ +' +' This code was generated by a tool. +' Runtime Version:4.0.30319.42000 +' +' Changes to this file may cause incorrect behavior and will be lost if +' the code is regenerated. +' +'------------------------------------------------------------------------------ + +Option Strict On +Option Explicit On + + +Namespace My + + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) + +#Region "My.Settings Auto-Save Functionality" +#If _MyType = "WindowsForms" Then + Private Shared addedHandler As Boolean + + Private Shared addedHandlerLockObject As New Object + + _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub +#End If +#End Region + + Public Shared ReadOnly Property [Default]() As MySettings + Get + +#If _MyType = "WindowsForms" Then + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If +#End If + Return defaultInstance + End Get + End Property + End Class +End Namespace + +Namespace My + + _ + Friend Module MySettingsProperty + + _ + Friend ReadOnly Property Settings() As Global.NoCarPowerSupply.My.MySettings + Get + Return Global.NoCarPowerSupply.My.MySettings.Default + End Get + End Property + End Module +End Namespace diff --git a/My Project/Settings.settings b/My Project/Settings.settings new file mode 100644 index 0000000..85b890b --- /dev/null +++ b/My Project/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/NoCarPowerSupply.sln b/NoCarPowerSupply.sln new file mode 100644 index 0000000..0cea9dc --- /dev/null +++ b/NoCarPowerSupply.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.36422.26 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "NoCarPowerSupply", "NoCarPowerSupply.vbproj", "{0CBC3BEB-37CF-41EB-A84A-82CA3921E615}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0CBC3BEB-37CF-41EB-A84A-82CA3921E615}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CBC3BEB-37CF-41EB-A84A-82CA3921E615}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CBC3BEB-37CF-41EB-A84A-82CA3921E615}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CBC3BEB-37CF-41EB-A84A-82CA3921E615}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F784D495-14CE-4BE1-9492-8EB483D96CFA} + EndGlobalSection +EndGlobal diff --git a/NoCarPowerSupply.vbproj b/NoCarPowerSupply.vbproj new file mode 100644 index 0000000..dcc484d --- /dev/null +++ b/NoCarPowerSupply.vbproj @@ -0,0 +1,128 @@ + + + + + Debug + AnyCPU + {0CBC3BEB-37CF-41EB-A84A-82CA3921E615} + WinExe + NoCarPowerSupply.My.MyApplication + NoCarPowerSupply + NoCarPowerSupply + 512 + WindowsForms + v4.8 + true + true + + + AnyCPU + true + full + true + true + bin\Debug\ + NoCarPowerSupply.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + AnyCPU + pdbonly + false + true + true + bin\Release\ + NoCarPowerSupply.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + + On + + + Binary + + + Off + + + On + + + + False + C:\Program Files (x86)\FlexCell Technologies\FlexCell.NET4\bin\FlexCell.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + Form + + + Form1.vb + Form + + + + True + Application.myapp + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + + Form1.vb + + + VbMyResourcesResXFileCodeGenerator + Resources.Designer.vb + My.Resources + Designer + + + + + MyApplicationCodeGenerator + Application.Designer.vb + + + SettingsSingleFileGenerator + My + Settings.Designer.vb + + + + + \ No newline at end of file diff --git a/NoCarPowerSupply.vbproj.user b/NoCarPowerSupply.vbproj.user new file mode 100644 index 0000000..9b86104 --- /dev/null +++ b/NoCarPowerSupply.vbproj.user @@ -0,0 +1,6 @@ + + + + ShowAllFiles + + \ No newline at end of file diff --git a/bin/Debug/FlexCell.dll b/bin/Debug/FlexCell.dll new file mode 100644 index 0000000..0f6c38e Binary files /dev/null and b/bin/Debug/FlexCell.dll differ diff --git a/bin/Debug/NoCarPowerSupply.exe b/bin/Debug/NoCarPowerSupply.exe new file mode 100644 index 0000000..827d3a7 Binary files /dev/null and b/bin/Debug/NoCarPowerSupply.exe differ diff --git a/bin/Debug/NoCarPowerSupply.exe.config b/bin/Debug/NoCarPowerSupply.exe.config new file mode 100644 index 0000000..1c75772 --- /dev/null +++ b/bin/Debug/NoCarPowerSupply.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/Debug/NoCarPowerSupply.pdb b/bin/Debug/NoCarPowerSupply.pdb new file mode 100644 index 0000000..f5204f0 Binary files /dev/null and b/bin/Debug/NoCarPowerSupply.pdb differ diff --git a/bin/Debug/NoCarPowerSupply.xml b/bin/Debug/NoCarPowerSupply.xml new file mode 100644 index 0000000..a4a8864 --- /dev/null +++ b/bin/Debug/NoCarPowerSupply.xml @@ -0,0 +1,34 @@ + + + + +NoCarPowerSupply + + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + CRC16校验 + + + + + + + diff --git a/bin/NoCarPowerSupply_1.0.0.0.rar b/bin/NoCarPowerSupply_1.0.0.0.rar new file mode 100644 index 0000000..a3e2d5f Binary files /dev/null and b/bin/NoCarPowerSupply_1.0.0.0.rar differ diff --git a/bin/NoCarPowerSupply_1.0.0.0/FlexCell.dll b/bin/NoCarPowerSupply_1.0.0.0/FlexCell.dll new file mode 100644 index 0000000..0f6c38e Binary files /dev/null and b/bin/NoCarPowerSupply_1.0.0.0/FlexCell.dll differ diff --git a/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.exe b/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.exe new file mode 100644 index 0000000..d34590b Binary files /dev/null and b/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.exe differ diff --git a/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.exe.config b/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.exe.config new file mode 100644 index 0000000..1c75772 --- /dev/null +++ b/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.pdb b/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.pdb new file mode 100644 index 0000000..47a5578 Binary files /dev/null and b/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.pdb differ diff --git a/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.xml b/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.xml new file mode 100644 index 0000000..a4a8864 --- /dev/null +++ b/bin/NoCarPowerSupply_1.0.0.0/NoCarPowerSupply.xml @@ -0,0 +1,34 @@ + + + + +NoCarPowerSupply + + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + CRC16校验 + + + + + + + diff --git a/bin/NoCarPowerSupply_1.0.0.1.rar b/bin/NoCarPowerSupply_1.0.0.1.rar new file mode 100644 index 0000000..2535d80 Binary files /dev/null and b/bin/NoCarPowerSupply_1.0.0.1.rar differ diff --git a/bin/NoCarPowerSupply_1.0.0.1/FlexCell.dll b/bin/NoCarPowerSupply_1.0.0.1/FlexCell.dll new file mode 100644 index 0000000..0f6c38e Binary files /dev/null and b/bin/NoCarPowerSupply_1.0.0.1/FlexCell.dll differ diff --git a/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.exe b/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.exe new file mode 100644 index 0000000..827d3a7 Binary files /dev/null and b/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.exe differ diff --git a/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.exe.config b/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.exe.config new file mode 100644 index 0000000..1c75772 --- /dev/null +++ b/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.pdb b/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.pdb new file mode 100644 index 0000000..f5204f0 Binary files /dev/null and b/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.pdb differ diff --git a/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.xml b/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.xml new file mode 100644 index 0000000..a4a8864 --- /dev/null +++ b/bin/NoCarPowerSupply_1.0.0.1/NoCarPowerSupply.xml @@ -0,0 +1,34 @@ + + + + +NoCarPowerSupply + + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + CRC16校验 + + + + + + + diff --git a/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.vb b/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.vb new file mode 100644 index 0000000..e7dcac5 --- /dev/null +++ b/obj/Debug/.NETFramework,Version=v4.8.AssemblyAttributes.vb @@ -0,0 +1,7 @@ +' + Option Strict Off + Option Explicit On + + Imports System + Imports System.Reflection + diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..c0df038 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..d2d3622 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Debug/NoCarPowerSupply.Form1.resources b/obj/Debug/NoCarPowerSupply.Form1.resources new file mode 100644 index 0000000..d9bcb91 Binary files /dev/null and b/obj/Debug/NoCarPowerSupply.Form1.resources differ diff --git a/obj/Debug/NoCarPowerSupply.Resources.resources b/obj/Debug/NoCarPowerSupply.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/obj/Debug/NoCarPowerSupply.Resources.resources differ diff --git a/obj/Debug/NoCarPowerSupply.exe b/obj/Debug/NoCarPowerSupply.exe new file mode 100644 index 0000000..827d3a7 Binary files /dev/null and b/obj/Debug/NoCarPowerSupply.exe differ diff --git a/obj/Debug/NoCarPowerSupply.pdb b/obj/Debug/NoCarPowerSupply.pdb new file mode 100644 index 0000000..f5204f0 Binary files /dev/null and b/obj/Debug/NoCarPowerSupply.pdb differ diff --git a/obj/Debug/NoCarPowerSupply.vbproj.AssemblyReference.cache b/obj/Debug/NoCarPowerSupply.vbproj.AssemblyReference.cache new file mode 100644 index 0000000..f5e894a Binary files /dev/null and b/obj/Debug/NoCarPowerSupply.vbproj.AssemblyReference.cache differ diff --git a/obj/Debug/NoCarPowerSupply.vbproj.CopyComplete b/obj/Debug/NoCarPowerSupply.vbproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/obj/Debug/NoCarPowerSupply.vbproj.CoreCompileInputs.cache b/obj/Debug/NoCarPowerSupply.vbproj.CoreCompileInputs.cache new file mode 100644 index 0000000..38983a6 --- /dev/null +++ b/obj/Debug/NoCarPowerSupply.vbproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +a92fbfaa24015b8b9ba3e2857084c64277483f1f diff --git a/obj/Debug/NoCarPowerSupply.vbproj.FileListAbsolute.txt b/obj/Debug/NoCarPowerSupply.vbproj.FileListAbsolute.txt new file mode 100644 index 0000000..d1c8445 --- /dev/null +++ b/obj/Debug/NoCarPowerSupply.vbproj.FileListAbsolute.txt @@ -0,0 +1,14 @@ +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\bin\Debug\NoCarPowerSupply.exe.config +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\bin\Debug\NoCarPowerSupply.exe +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\bin\Debug\NoCarPowerSupply.pdb +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\bin\Debug\NoCarPowerSupply.xml +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\bin\Debug\FlexCell.dll +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.vbproj.AssemblyReference.cache +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.Form1.resources +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.Resources.resources +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.vbproj.GenerateResource.cache +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.vbproj.CoreCompileInputs.cache +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.vbproj.CopyComplete +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.exe +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.xml +E:\Sync\NoCarPowerSupply\NoCarPowerSupply\obj\Debug\NoCarPowerSupply.pdb diff --git a/obj/Debug/NoCarPowerSupply.vbproj.GenerateResource.cache b/obj/Debug/NoCarPowerSupply.vbproj.GenerateResource.cache new file mode 100644 index 0000000..9a3d52e Binary files /dev/null and b/obj/Debug/NoCarPowerSupply.vbproj.GenerateResource.cache differ diff --git a/obj/Debug/NoCarPowerSupply.xml b/obj/Debug/NoCarPowerSupply.xml new file mode 100644 index 0000000..a4a8864 --- /dev/null +++ b/obj/Debug/NoCarPowerSupply.xml @@ -0,0 +1,34 @@ + + + + +NoCarPowerSupply + + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + CRC16校验 + + + + + + + diff --git a/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll b/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll new file mode 100644 index 0000000..ec15cd1 Binary files /dev/null and b/obj/Debug/TempPE/My Project.Resources.Designer.vb.dll differ diff --git a/testmode.vb b/testmode.vb new file mode 100644 index 0000000..88c4c38 --- /dev/null +++ b/testmode.vb @@ -0,0 +1,27 @@ +Public Class testmode + +End Class +Public Class CtabRange + Public devname As String = String.Empty + Public fr As Integer = 0 + Public lr As Integer = 0 + Public fc As Integer = 0 + Public lc As Integer = 0 + Sub New(grd As FlexCell.Grid, tabr As Integer, tabc As Integer) + If grd.Rows > tabr AndAlso grd.Cols > tabc Then + With grd.Range(tabr, tabc, tabr, tabc) + devname = grd.Cell(.FirstRow, .FirstCol).Text + + fc = .FirstCol + + lc = .LastCol + + fr = .FirstRow + + lr = .LastRow + End With + End If + + End Sub + +End Class