Compare commits
4 Commits
f845225ed7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 87cc292012 | |||
| 713a36b383 | |||
| 9f3d41785e | |||
| 9d6e3ac6bb |
@@ -35,7 +35,7 @@
|
||||
<MinimumRequiredVersion>4.0.0.5</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>index.html</WebPage>
|
||||
<ApplicationRevision>81</ApplicationRevision>
|
||||
<ApplicationRevision>85</ApplicationRevision>
|
||||
<ApplicationVersion>4.4.3.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
|
||||
@@ -8756,7 +8756,8 @@ Public Class FrmCSeriesConfig
|
||||
|
||||
'偏移地址 0x04 数据类型指示偏移地址
|
||||
Dim LineAddOffestBase As Integer = 0
|
||||
|
||||
'’偏移地址 0x02 数据类型指示偏移地址
|
||||
Dim LineAddOffestBase2 As Integer = 0
|
||||
'结束地址
|
||||
endAddr = 0
|
||||
|
||||
@@ -8802,7 +8803,7 @@ Public Class FrmCSeriesConfig
|
||||
|
||||
'本行地址取出来放在 flashAddress中’
|
||||
StrToHex(tmpLineAdd, flashAddressBuf)
|
||||
flashAddress = LineAddOffestBase + tmpLineAdd
|
||||
flashAddress = LineAddOffestBase + tmpLineAdd + LineAddOffestBase2
|
||||
|
||||
'B3:数据类型
|
||||
Dim dataType = StrToHex(hexBuffer(i + 8))
|
||||
@@ -8822,8 +8823,19 @@ Public Class FrmCSeriesConfig
|
||||
Else
|
||||
Return True
|
||||
End If
|
||||
Case 2, 3, 5 '扩展段地址, 开始段地址, 开始线性地址’
|
||||
Case 3, 5 '扩展段地址, 开始段地址, 开始线性地址’ 4 '扩展线性地址
|
||||
Continue For
|
||||
Case 2 ',
|
||||
If dataLen = 2 Then
|
||||
|
||||
LineAddOffestBase2 = (dataValBuf(0) * 256 + dataValBuf(1))
|
||||
|
||||
LineAddOffestBase2 = LineAddOffestBase2 << 4
|
||||
Else
|
||||
'resultli.Analysis = "文件偏移地址异常!!"
|
||||
Return False '确认DataLen必须是2,否则报错’
|
||||
End If
|
||||
|
||||
Case 4 '扩展线性地址
|
||||
If dataLen = 2 Then
|
||||
LineAddOffestBase = (dataValBuf(0) * 256 + dataValBuf(1)) * 65536
|
||||
|
||||
@@ -32,7 +32,7 @@ Public Class EnergySavingAttribute
|
||||
G_loopNameAddr = New Dictionary(Of String, String)
|
||||
G_ReportingScenario = nReportingScenario
|
||||
|
||||
Dim li As List(Of MDevNodeMessage) = nReportingScenario.getDateDisposeRuning
|
||||
Dim li As List(Of MDevNodeMessage) = nReportingScenario.getDateDisposeRuning(True)
|
||||
For Each item In li
|
||||
If G_loopNameAddr.ContainsKey(item.ModalAddress) Then
|
||||
Continue For
|
||||
@@ -41,21 +41,34 @@ Public Class EnergySavingAttribute
|
||||
End If
|
||||
Next
|
||||
G_DateStr = New Dictionary(Of String, List(Of (String, String)))
|
||||
Dim tnli As List(Of (String, String))
|
||||
Dim strbuf As String() = datestr.Split(vbLf)
|
||||
Dim cstrbutf As String()
|
||||
For Each item In strbuf
|
||||
cstrbutf = item.Trim().Split(",")
|
||||
If G_DateStr.ContainsKey(cstrbutf(2)) Then
|
||||
tnli = G_DateStr(cstrbutf(2))
|
||||
tnli.Add((cstrbutf(3), cstrbutf(4)))
|
||||
Else
|
||||
tnli = New List(Of (String, String))
|
||||
tnli.Add((cstrbutf(3), cstrbutf(4)))
|
||||
G_DateStr.Add(cstrbutf(2), tnli)
|
||||
If Not String.IsNullOrEmpty(datestr) Then
|
||||
|
||||
Dim tnli As List(Of (String, String))
|
||||
Dim strbuf As String() = datestr.Split(vbLf)
|
||||
Dim cstrbutf As String()
|
||||
For Each item In strbuf
|
||||
cstrbutf = item.Trim().Split(",")
|
||||
If G_DateStr.ContainsKey(cstrbutf(2)) Then
|
||||
tnli = G_DateStr(cstrbutf(2))
|
||||
tnli.Add((cstrbutf(3), cstrbutf(4)))
|
||||
Else
|
||||
tnli = New List(Of (String, String))
|
||||
tnli.Add((cstrbutf(3), cstrbutf(4)))
|
||||
G_DateStr.Add(cstrbutf(2), tnli)
|
||||
|
||||
End If
|
||||
Next
|
||||
Console.WriteLine(G_DateStr.Count)
|
||||
Else
|
||||
Dim tnli1 As New List(Of (String, String))
|
||||
'tnli1.Add(("60", "全局亮度节能"))
|
||||
Dim tnli2 As New List(Of (String, String))
|
||||
'tnli2.Add(("1", "1"))
|
||||
G_DateStr.Add(2, tnli1)
|
||||
G_DateStr.Add(3, tnli2)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
@@ -118,7 +131,7 @@ Public Class EnergySavingAttribute
|
||||
Gcstr = G_loopNameAddr.Keys(i).Substring(0, 3)
|
||||
Integer.TryParse(Gcstr, Ginttype)
|
||||
Select Case Ginttype
|
||||
Case 24 'pwm调光
|
||||
Case 24, 1 'pwm调光 、继电器
|
||||
li = G_DateStr(2.ToString)
|
||||
PowerInit.AddItem("")
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 2).Text = G_Hotelid
|
||||
@@ -127,9 +140,11 @@ Public Class EnergySavingAttribute
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 5).Text = G_loopNameAddr.Keys(i)
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 6).Text = "0"
|
||||
If li.Count > 0 Then
|
||||
'默认勾选ta
|
||||
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = li(0).Item1
|
||||
Else
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "0"
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "60"
|
||||
End If
|
||||
If Not IsNothing(dic) AndAlso dic.ContainsKey(G_loopNameAddr.Keys(i)) Then
|
||||
ncdic = dic(G_loopNameAddr.Keys(i))
|
||||
@@ -148,9 +163,10 @@ Public Class EnergySavingAttribute
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 5).Text = G_loopNameAddr.Keys(i)
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 6).Text = "0"
|
||||
If li.Count > 0 Then
|
||||
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = li(0).Item1
|
||||
Else
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "0"
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "60"
|
||||
End If
|
||||
If Not IsNothing(dic) AndAlso dic.ContainsKey(G_loopNameAddr.Keys(i)) Then
|
||||
ncdic = dic(G_loopNameAddr.Keys(i))
|
||||
@@ -169,9 +185,10 @@ Public Class EnergySavingAttribute
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 5).Text = G_loopNameAddr.Keys(i)
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 6).Text = "0"
|
||||
If li.Count > 0 Then
|
||||
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = li(0).Item1
|
||||
Else
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "0"
|
||||
PowerInit.Cell(PowerInit.Rows - 1, 7).Text = "60"
|
||||
End If
|
||||
If Not IsNothing(dic) AndAlso dic.ContainsKey(G_loopNameAddr.Keys(i)) Then
|
||||
ncdic = dic(G_loopNameAddr.Keys(i))
|
||||
@@ -189,6 +206,7 @@ Public Class EnergySavingAttribute
|
||||
RatioInit.Cell(RatioInit.Rows - 1, 4).Text = G_loopNameAddr.Values(i)
|
||||
RatioInit.Cell(RatioInit.Rows - 1, 5).Text = G_loopNameAddr.Keys(i)
|
||||
If li.Count > 0 Then
|
||||
|
||||
'取回路地址第4到6位转成int类型
|
||||
Dim Ginttype2 As Integer = Integer.Parse(G_loopNameAddr.Keys(i).Substring(3, 3))
|
||||
'使用linq查询li中Item2为Ginttype2的项 取其Item1
|
||||
@@ -196,7 +214,7 @@ Public Class EnergySavingAttribute
|
||||
|
||||
RatioInit.Cell(RatioInit.Rows - 1, 9).Text = Gstr
|
||||
Else
|
||||
RatioInit.Cell(RatioInit.Rows - 1, 9).Text = "0"
|
||||
RatioInit.Cell(RatioInit.Rows - 1, 9).Text = "1"
|
||||
End If
|
||||
If Not IsNothing(dic) AndAlso dic.ContainsKey(G_loopNameAddr.Keys(i)) Then
|
||||
ncdic = dic(G_loopNameAddr.Keys(i))
|
||||
@@ -221,6 +239,7 @@ Public Class EnergySavingAttribute
|
||||
RatioInit.Cell(RatioInit.Rows - 1, 12).Text = ncdic("heat_loss")
|
||||
RatioInit.Cell(RatioInit.Rows - 1, 13).Text = ncdic("remark")
|
||||
End If
|
||||
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
@@ -373,6 +392,7 @@ Public Class EnergySavingAttribute
|
||||
'遍历每一列
|
||||
dic = New Dictionary(Of String, Object)
|
||||
dic.Add("type", 1)
|
||||
dic.Add("is_carbon", 0)
|
||||
If RatioInit.Cell(i, 1).Text.Equals("1") Then
|
||||
dic.Add("push_state", 1)
|
||||
Else
|
||||
@@ -472,11 +492,14 @@ Public Class EnergySavingAttribute
|
||||
'遍历每一列
|
||||
dic = New Dictionary(Of String, Object)
|
||||
dic.Add("type", 0)
|
||||
dic.Add("is_carbon", 0)
|
||||
If PowerInit.Cell(i, 1).Text.Equals("1") Then
|
||||
dic.Add("push_state", 1)
|
||||
Else
|
||||
dic.Add("push_state", 0)
|
||||
End If
|
||||
|
||||
|
||||
For j As Integer = 4 To PowerInit.Cols - 1
|
||||
'判断是否为空
|
||||
Dim str As String = PowerInit.Cell(i, j).Text
|
||||
@@ -531,7 +554,7 @@ Public Class EnergySavingAttribute
|
||||
Dim Tli As List(Of Dictionary(Of String, Object)) = GetRatioInitLi()
|
||||
If IsNothing(Tli) Then
|
||||
'MsgBox("上传失败")
|
||||
Return
|
||||
'Return
|
||||
Else
|
||||
'将tli 添加到li中
|
||||
li.AddRange(Tli)
|
||||
@@ -683,10 +706,11 @@ Public Class EnergySavingAttribute
|
||||
Return
|
||||
End If
|
||||
Else
|
||||
MsgBox($"第{PowerInit.Cell(e.Row, 0).Text} 行 【公路】或节能比例 数据格式不正确,请输入数字!")
|
||||
MsgBox($"第{PowerInit.Cell(e.Row, 0).Text} 行 【功率】或节能比例 数据格式不正确,请输入数字!")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PowerInit_ComboDropDown(Sender As Object, e As FlexCell.Grid.ComboDropDownEventArgs) Handles PowerInit.ComboDropDown
|
||||
@@ -710,10 +734,11 @@ Public Class EnergySavingAttribute
|
||||
MsgBox($"第{RatioInit.Cell(e.Row, 0).Text}行,【空调节能温差】 数据异常,【空调节能温差】数值范围为 1到15!")
|
||||
End If
|
||||
Else
|
||||
MsgBox($"第{RatioInit.Cell(e.Row, 0).Text}行,【空调节能温差】 数据异常!")
|
||||
'MsgBox($"第{RatioInit.Cell(e.Row, 0).Text}行,【空调节能温差】 数据异常!")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub RatioInit_ComboDropDown(Sender As Object, e As FlexCell.Grid.ComboDropDownEventArgs) Handles RatioInit.ComboDropDown
|
||||
If e.Row = 0 Then Return
|
||||
|
||||
2
BLV_Studio/FrmMain.Designer.vb
generated
2
BLV_Studio/FrmMain.Designer.vb
generated
@@ -1017,7 +1017,7 @@ Partial Class FrmMain
|
||||
'
|
||||
'toopMax
|
||||
'
|
||||
Me.toopMax.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator18, Me.ToolStripButton6, Me.T_OpenfileXML, Me.ToolStripButton10, Me.ToolStripButton7, Me.ToolStripButton8, Me.ToolStripSeparator19, Me.ToolStripButton13, Me.ToolStripButton11, Me.ToolStripButton12, Me.ToolStripSeparator20, Me.ToolStripButton14, Me.ToolStripButton9, Me.ToolStripButton15, Me.ToolStripButton16, Me.ToolStripButton19, Me.ToolStripSeparator22, Me.Tablet_DeleteRow, Me.ToolStripButton3, Me.ToolStripButton5, Me.ToolStripButton18, Me.ToolStripButton21, Me.ToolStripButton22})
|
||||
Me.toopMax.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator18, Me.ToolStripButton6, Me.T_OpenfileXML, Me.ToolStripButton10, Me.ToolStripButton7, Me.ToolStripButton8, Me.ToolStripSeparator19, Me.ToolStripButton13, Me.ToolStripButton11, Me.ToolStripButton12, Me.ToolStripSeparator20, Me.ToolStripButton14, Me.ToolStripButton9, Me.ToolStripButton15, Me.ToolStripButton16, Me.ToolStripButton19, Me.ToolStripSeparator22, Me.Tablet_DeleteRow, Me.ToolStripButton3, Me.ToolStripButton21, Me.ToolStripButton5, Me.ToolStripButton18, Me.ToolStripButton22})
|
||||
Me.toopMax.Location = New System.Drawing.Point(0, 0)
|
||||
Me.toopMax.Name = "toopMax"
|
||||
Me.toopMax.Size = New System.Drawing.Size(993, 40)
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABS
|
||||
PgAAAk1TRnQBSQFMAgEBQgEAAWABIwFgASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
PgAAAk1TRnQBSQFMAgEBQgEAAXABIwFwASMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARABAQIAAQEBAAEIBgABRBgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
|
||||
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
|
||||
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz
|
||||
@@ -896,6 +896,22 @@
|
||||
sHCwR+gRcoQeITf4i62BVMoGkyc9KYpsf8vUCvyQ6Fod2Ogt4svidAanNTiWSZSif3Az3jsQAuDz+2mQ
|
||||
Fo00KxyP4TbAOo9S+eRkbLk5p7Jp1riycVLYx/uAKrw2J4l6kCY2KBK/ZUJ1g1ZwWs3GdL2B0HWD8vKl
|
||||
3SH6ADQzhIhPvJ9cAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="ToolStripButton21.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJASURBVDhPfZIhaytBFIX7E95fyE+Ie5VvXeOyLoEnwlDx
|
||||
iCpDRFhXloiyRIQlYikVC1MRiAlMRSHPFKaiEBOYikAqIkZUVFSMqDjvzO7SQvvohUuGyZzvnnv3Hn0O
|
||||
c79BVmrIicKQmcyX0DcGzd/fh1qskRUKioLkOkd2n/E3gzy/REJYgDdPv8bllWZlBf1iYF8t7JuHetYQ
|
||||
RYqosLUbpn20XyH2cQ85zZHuBNQhZ6bItwqCrYjCI75waJcx+qMUwWUj+4isXEPOM4iHCDJkKZlBbCFm
|
||||
FM8UWmVEEO/ZTtD4qxS226phwZ6cZIj4KFrFFOWQhavEoqou0CoiggTiPxlepkPYkxYMi9aAUS2IzwT7
|
||||
Za6YJe9mBmploe8szwr9iYAd9Svxeppgv2vmkVzQwXxTVYzHshqcWmi4Ww3/6uHfALu1cOcSrteGGnSw
|
||||
f7IfgPXfDVtYEmKRlwZm64AyBQjCLIU/OHie3SCC7kZ8o5HQ0fqu2Y8N6VmhYR7se0VDm57VcC7gxzF8
|
||||
EP9i32zHPDikBMhJ3jjgguT8PDZUCoCQtGe67QriCNM/f8BwycI8xDhH1OWcesMakF8buGdf0fPghC3Y
|
||||
g6/vCKnEHHCYSxB2fkuKJY57ogbIKZeG1CAI1dXKIJstoW4JXBikA8Hvn6N/miIeSLRP6ur6RteAEPun
|
||||
PeLTBOKMwyLI0UE4d1ipQ1E8SN+F6bRepv9GmGywFwR256rKUTdYHiKbfyP8HJflEsfst80cjpqN+xJH
|
||||
R/8A7hciM/ATGUcAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ToolStripButton5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
@@ -929,22 +945,6 @@
|
||||
gZB5ArlLINIIYhOhidcGUlEWxpSlevamzCmv6h2AmgP7Csj1fRtBxQFU6KNZeiagbyRzj7i0XQA146DN
|
||||
upVQYYBWI1c++Nz7aO7P5twH6LWpybDwjImoZsxAzbQuNZLpxckGjIl+mYbGsKMTq8gLDGGff6x/3cBt
|
||||
dWGMsSfOezIQ200DVQAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="ToolStripButton21.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJASURBVDhPfZIhaytBFIX7E95fyE+Ie5VvXeOyLoEnwlDx
|
||||
iCpDRFhXloiyRIQlYikVC1MRiAlMRSHPFKaiEBOYikAqIkZUVFSMqDjvzO7SQvvohUuGyZzvnnv3Hn0O
|
||||
c79BVmrIicKQmcyX0DcGzd/fh1qskRUKioLkOkd2n/E3gzy/REJYgDdPv8bllWZlBf1iYF8t7JuHetYQ
|
||||
RYqosLUbpn20XyH2cQ85zZHuBNQhZ6bItwqCrYjCI75waJcx+qMUwWUj+4isXEPOM4iHCDJkKZlBbCFm
|
||||
FM8UWmVEEO/ZTtD4qxS226phwZ6cZIj4KFrFFOWQhavEoqou0CoiggTiPxlepkPYkxYMi9aAUS2IzwT7
|
||||
Za6YJe9mBmploe8szwr9iYAd9Svxeppgv2vmkVzQwXxTVYzHshqcWmi4Ww3/6uHfALu1cOcSrteGGnSw
|
||||
f7IfgPXfDVtYEmKRlwZm64AyBQjCLIU/OHie3SCC7kZ8o5HQ0fqu2Y8N6VmhYR7se0VDm57VcC7gxzF8
|
||||
EP9i32zHPDikBMhJ3jjgguT8PDZUCoCQtGe67QriCNM/f8BwycI8xDhH1OWcesMakF8buGdf0fPghC3Y
|
||||
g6/vCKnEHHCYSxB2fkuKJY57ogbIKZeG1CAI1dXKIJstoW4JXBikA8Hvn6N/miIeSLRP6ur6RteAEPun
|
||||
PeLTBOKMwyLI0UE4d1ipQ1E8SN+F6bRepv9GmGywFwR256rKUTdYHiKbfyP8HJflEsfst80cjpqN+xJH
|
||||
R/8A7hciM/ATGUcAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="ToolStripButton22.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
||||
@@ -5120,10 +5120,10 @@ Public Class FrmMain
|
||||
Return
|
||||
End If
|
||||
Dim datestr As String = GetenergyConservationDev()
|
||||
If String.IsNullOrEmpty(datestr) Then
|
||||
MsgBox("未配置配置碳达人节能动作!")
|
||||
Return
|
||||
End If
|
||||
'If String.IsNullOrEmpty(datestr) Then
|
||||
' MsgBox("未配置配置碳达人节能动作!")
|
||||
' Return
|
||||
'End If
|
||||
Dim fromshow As New EnergySavingAttribute(aaa, roomtypeid, hotelid, Account, datestr, TvwMain.SelectedNode.Text)
|
||||
|
||||
'fromshow.Author = Account
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
'通过使用 "*",如下所示:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("4.4.5.36")>
|
||||
<Assembly: AssemblyFileVersion("4.4.5.36")>
|
||||
<Assembly: AssemblyVersion("4.4.5.40")>
|
||||
<Assembly: AssemblyFileVersion("4.4.5.40")>
|
||||
|
||||
42
BLV_Studio/SetLoopInformation.Designer.vb
generated
42
BLV_Studio/SetLoopInformation.Designer.vb
generated
@@ -25,6 +25,8 @@ Partial Class SetLoopInformation
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(SetLoopInformation))
|
||||
Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
|
||||
Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStripButton7 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton1 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripButton5 = New System.Windows.Forms.ToolStripButton()
|
||||
@@ -33,8 +35,6 @@ Partial Class SetLoopInformation
|
||||
Me.ToolStripLabel1 = New System.Windows.Forms.ToolStripLabel()
|
||||
Me.Grid1 = New FlexCell.Grid()
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.ToolStripButton2 = New System.Windows.Forms.ToolStripButton()
|
||||
Me.ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.ToolStrip1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
@@ -44,10 +44,26 @@ Partial Class SetLoopInformation
|
||||
Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton2, Me.ToolStripSeparator1, Me.ToolStripButton7, Me.ToolStripButton1, Me.ToolStripButton5, Me.ToolStripButton4, Me.ToolStripButton6, Me.ToolStripLabel1})
|
||||
Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
|
||||
Me.ToolStrip1.Name = "ToolStrip1"
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(1169, 56)
|
||||
Me.ToolStrip1.Size = New System.Drawing.Size(1396, 56)
|
||||
Me.ToolStrip1.TabIndex = 0
|
||||
Me.ToolStrip1.Text = "ToolStrip1"
|
||||
'
|
||||
'ToolStripButton2
|
||||
'
|
||||
Me.ToolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton2.Font = New System.Drawing.Font("Microsoft YaHei UI", 10.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ToolStripButton2.ForeColor = System.Drawing.Color.RoyalBlue
|
||||
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(41, 53)
|
||||
Me.ToolStripButton2.Text = "全选"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 56)
|
||||
'
|
||||
'ToolStripButton7
|
||||
'
|
||||
Me.ToolStripButton7.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
@@ -110,34 +126,18 @@ Partial Class SetLoopInformation
|
||||
Me.Grid1.Location = New System.Drawing.Point(0, 56)
|
||||
Me.Grid1.MouseWheelSpeed = CType(3, Short)
|
||||
Me.Grid1.Name = "Grid1"
|
||||
Me.Grid1.Size = New System.Drawing.Size(1169, 624)
|
||||
Me.Grid1.Size = New System.Drawing.Size(1396, 624)
|
||||
Me.Grid1.TabIndex = 1
|
||||
'
|
||||
'Timer1
|
||||
'
|
||||
Me.Timer1.Interval = 1000
|
||||
'
|
||||
'ToolStripButton2
|
||||
'
|
||||
Me.ToolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text
|
||||
Me.ToolStripButton2.Font = New System.Drawing.Font("Microsoft YaHei UI", 10.5!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
|
||||
Me.ToolStripButton2.ForeColor = System.Drawing.Color.RoyalBlue
|
||||
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(41, 53)
|
||||
Me.ToolStripButton2.Text = "全选"
|
||||
'
|
||||
'ToolStripSeparator1
|
||||
'
|
||||
Me.ToolStripSeparator1.Name = "ToolStripSeparator1"
|
||||
Me.ToolStripSeparator1.Size = New System.Drawing.Size(6, 56)
|
||||
'
|
||||
'SetLoopInformation
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(1169, 680)
|
||||
Me.ClientSize = New System.Drawing.Size(1396, 680)
|
||||
Me.Controls.Add(Me.Grid1)
|
||||
Me.Controls.Add(Me.ToolStrip1)
|
||||
Me.Name = "SetLoopInformation"
|
||||
|
||||
@@ -121,6 +121,21 @@
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="ToolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="ToolStripButton7.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
@@ -199,19 +214,4 @@
|
||||
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>129, 17</value>
|
||||
</metadata>
|
||||
<data name="ToolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -55,6 +55,8 @@ Public Class SetLoopInformation
|
||||
PB20_RELAY = 33
|
||||
<Description("色温")>
|
||||
ColorTemp = 34
|
||||
<Description("PB调光")>
|
||||
PB_STRIP = 50
|
||||
<Description("碳达人")>
|
||||
CarbonVIP = 54
|
||||
End Enum
|
||||
@@ -89,7 +91,7 @@ Public Class SetLoopInformation
|
||||
If item.Type.Equals("4") Then
|
||||
'判断名称长度是否大于2
|
||||
If item.Name.Length > 2 Then
|
||||
G_loopNameAddr.Add(item.ModalAddress, item.Name.Substring(0, 2))
|
||||
G_loopNameAddr.Add(item.ModalAddress, item.Name.Replace("服务", ""))
|
||||
Else
|
||||
G_loopNameAddr.Add(item.ModalAddress, item.Name)
|
||||
End If
|
||||
@@ -121,36 +123,37 @@ Public Class SetLoopInformation
|
||||
'初始化表格
|
||||
Private Sub initTable()
|
||||
|
||||
Grid1.Cols = 21
|
||||
Grid1.Cols = 22
|
||||
Grid1.Rows = 1
|
||||
Grid1.Column(0).Locked = True
|
||||
Grid1.Cell(0, 0).Text = "序号"
|
||||
Grid1.Cell(0, 1).Text = "启用"
|
||||
Grid1.Cell(0, 2).Text = "类型"
|
||||
Grid1.Cell(0, 3).Text = "回路地址"
|
||||
Grid1.Column(3).Locked = True
|
||||
Grid1.Cell(0, 1).Text = "服务器"
|
||||
Grid1.Cell(0, 2).Text = "碳达人"
|
||||
Grid1.Cell(0, 3).Text = "类型"
|
||||
Grid1.Cell(0, 4).Text = "回路地址"
|
||||
Grid1.Column(4).Locked = True
|
||||
Grid1.Cell(0, 4).Text = "本地回路名称"
|
||||
Grid1.Cell(0, 5).Text = "云端回路地址"
|
||||
Grid1.Cell(0, 6).Text = "云端回路名称"
|
||||
Grid1.Cell(0, 7).Text = "英文名称"
|
||||
Grid1.Cell(0, 8).Text = "繁体名称"
|
||||
Grid1.Cell(0, 9).Text = "别名"
|
||||
Grid1.Cell(0, 10).Text = "功率"
|
||||
Grid1.Cell(0, 11).Text = "低电值"
|
||||
Grid1.Cell(0, 12).Text = "显示"
|
||||
Grid1.Cell(0, 13).Text = "离线"
|
||||
Grid1.Cell(0, 14).Text = "低电"
|
||||
Grid1.Cell(0, 15).Text = "声报"
|
||||
Grid1.Cell(0, 16).Text = "异常"
|
||||
Grid1.Cell(0, 17).Text = "排序"
|
||||
Grid1.Cell(0, 18).Text = "TCL设备名"
|
||||
Grid1.Cell(0, 19).Text = "组设备编号"
|
||||
Grid1.Cell(0, 20).Text = "组设备名"
|
||||
Grid1.Column(5).Locked = True
|
||||
Grid1.Cell(0, 5).Text = "本地回路名称"
|
||||
Grid1.Cell(0, 6).Text = "云端回路地址"
|
||||
Grid1.Cell(0, 7).Text = "云端回路名称"
|
||||
Grid1.Cell(0, 8).Text = "英文名称"
|
||||
Grid1.Cell(0, 9).Text = "繁体名称"
|
||||
Grid1.Cell(0, 10).Text = "别名"
|
||||
Grid1.Cell(0, 11).Text = "功率"
|
||||
Grid1.Cell(0, 12).Text = "低电值"
|
||||
Grid1.Cell(0, 13).Text = "显示"
|
||||
Grid1.Cell(0, 14).Text = "离线"
|
||||
Grid1.Cell(0, 15).Text = "低电"
|
||||
Grid1.Cell(0, 16).Text = "声报"
|
||||
Grid1.Cell(0, 17).Text = "异常"
|
||||
Grid1.Cell(0, 18).Text = "排序"
|
||||
Grid1.Cell(0, 19).Text = "TCL设备名"
|
||||
Grid1.Cell(0, 20).Text = "组设备编号"
|
||||
Grid1.Cell(0, 21).Text = "组设备名"
|
||||
Grid1.Column(1).CellType = FlexCell.CellTypeEnum.CheckBox
|
||||
Grid1.Column(1).Width = 25
|
||||
Grid1.Column(12).CellType = FlexCell.CellTypeEnum.CheckBox
|
||||
Grid1.Column(12).Width = 45
|
||||
Grid1.Column(1).Width = 40
|
||||
Grid1.Column(2).CellType = FlexCell.CellTypeEnum.CheckBox
|
||||
Grid1.Column(2).Width = 40
|
||||
Grid1.Column(13).CellType = FlexCell.CellTypeEnum.CheckBox
|
||||
Grid1.Column(13).Width = 45
|
||||
Grid1.Column(14).CellType = FlexCell.CellTypeEnum.CheckBox
|
||||
@@ -159,8 +162,10 @@ Public Class SetLoopInformation
|
||||
Grid1.Column(15).Width = 45
|
||||
Grid1.Column(16).CellType = FlexCell.CellTypeEnum.CheckBox
|
||||
Grid1.Column(16).Width = 45
|
||||
Grid1.Column(18).CellType = FlexCell.CellTypeEnum.ComboBox
|
||||
Grid1.Column(18).Width = 45
|
||||
Grid1.Column(17).CellType = FlexCell.CellTypeEnum.CheckBox
|
||||
Grid1.Column(17).Width = 45
|
||||
Grid1.Column(19).CellType = FlexCell.CellTypeEnum.ComboBox
|
||||
Grid1.Column(19).Width = 45
|
||||
For i As Integer = 0 To 20
|
||||
Grid1.Column(i).Alignment = FlexCell.AlignmentEnum.CenterCenter
|
||||
Next
|
||||
@@ -172,10 +177,10 @@ Public Class SetLoopInformation
|
||||
Private Sub Grid1_ComboDropDown(Sender As Object, e As FlexCell.Grid.ComboDropDownEventArgs) Handles Grid1.ComboDropDown
|
||||
|
||||
If e.Row > 0 Then
|
||||
Grid1.ComboBox(18).Items.Clear()
|
||||
Grid1.ComboBox(18).Items.Add("R-红")
|
||||
Grid1.ComboBox(18).Items.Add("G-绿")
|
||||
Grid1.ComboBox(18).Items.Add("B-蓝")
|
||||
Grid1.ComboBox(19).Items.Clear()
|
||||
Grid1.ComboBox(19).Items.Add("R-红")
|
||||
Grid1.ComboBox(19).Items.Add("G-绿")
|
||||
Grid1.ComboBox(19).Items.Add("B-蓝")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -195,11 +200,11 @@ Public Class SetLoopInformation
|
||||
With Grid1
|
||||
.AddItem("")
|
||||
.Cell(.Rows - 1, 0).Text = .Rows - 1
|
||||
.Cell(.Rows - 1, 2).Text = LoopType
|
||||
For i As Integer = 3 To .Cols - 1
|
||||
.Cell(.Rows - 1, i).Text = bufarry(i - 2)
|
||||
.Cell(.Rows - 1, 3).Text = LoopType
|
||||
For i As Integer = 4 To .Cols - 1
|
||||
.Cell(.Rows - 1, i).Text = bufarry(i - 3)
|
||||
If istag Then
|
||||
.Cell(.Rows - 1, i).Tag = bufarry(i - 2)
|
||||
.Cell(.Rows - 1, i).Tag = bufarry(i - 3)
|
||||
Else
|
||||
.Range(.Rows - 1, 1, .Rows - 1, .Cols - 1).ForeColor = Color.Red
|
||||
End If
|
||||
@@ -370,6 +375,8 @@ Public Class SetLoopInformation
|
||||
result = "色温"
|
||||
Case DeviceType.CarbonVIP
|
||||
result = "碳达人"
|
||||
Case DeviceType.PB_STRIP
|
||||
result = "PB调光"
|
||||
Case Else
|
||||
result = "未知设备"
|
||||
|
||||
@@ -457,43 +464,44 @@ Public Class SetLoopInformation
|
||||
For Each row As RoomDevice In login.rows
|
||||
isaddrow = True
|
||||
For i = 1 To Grid1.Rows - 1
|
||||
If row.ModalAddress.Equals(Grid1.Cell(i, 3).Text) Then
|
||||
If row.ModalAddress.Equals(Grid1.Cell(i, 4).Text) Then
|
||||
|
||||
isaddrow = False
|
||||
Name = Grid1.Cell(i, 4).Text
|
||||
Name = Grid1.Cell(i, 5).Text
|
||||
If row.Name.Equals(Name) Then
|
||||
If row.IsUploadBaoJing Then
|
||||
Grid1.Cell(i, 1).Text = 1
|
||||
Grid1.Cell(i, 2).Text = 1
|
||||
Else
|
||||
Grid1.Cell(i, 1).Text = 0
|
||||
Grid1.Cell(i, 2).Text = 0
|
||||
End If
|
||||
|
||||
Grid1.Cell(i, 5).Text = row.ModalAddress
|
||||
Grid1.Cell(i, 6).Text = row.Name
|
||||
Grid1.Cell(i, 6).ForeColor = Color.Black
|
||||
Grid1.Cell(i, 4).ForeColor = Color.Black
|
||||
Grid1.Cell(i, 6).Text = row.ModalAddress
|
||||
Grid1.Cell(i, 7).Text = row.Name
|
||||
Grid1.Cell(i, 7).ForeColor = Color.Black
|
||||
Grid1.Cell(i, 5).ForeColor = Color.Black
|
||||
|
||||
Grid1.Cell(i, 7).Text = row.EnglishName
|
||||
Grid1.Cell(i, 8).Text = row.TWName
|
||||
Grid1.Cell(i, 9).Text = row.AliasName
|
||||
Grid1.Cell(i, 10).Text = row.Power
|
||||
Grid1.Cell(i, 11).Text = row.LowPower
|
||||
Grid1.Cell(i, 12).Text = row.ActiveIndicator
|
||||
Grid1.Cell(i, 13).Text = row.OfflineDisplay
|
||||
Grid1.Cell(i, 14).Text = row.LowPowerDisplay
|
||||
Grid1.Cell(i, 15).Text = row.Beep
|
||||
Grid1.Cell(i, 16).Text = row.Abnormal
|
||||
Grid1.Cell(i, 17).Text = row.Sort
|
||||
Grid1.Cell(i, 18).Text = row.TCLDeviceName
|
||||
Grid1.Cell(i, 19).Text = row.MultipleGroupID
|
||||
Grid1.Cell(i, 20).Text = row.MultipleTCLName
|
||||
Grid1.Cell(i, 8).Text = row.EnglishName
|
||||
Grid1.Cell(i, 9).Text = row.TWName
|
||||
Grid1.Cell(i, 10).Text = row.AliasName
|
||||
Grid1.Cell(i, 11).Text = row.Power
|
||||
Grid1.Cell(i, 12).Text = row.LowPower
|
||||
Grid1.Cell(i, 13).Text = row.ActiveIndicator
|
||||
Grid1.Cell(i, 14).Text = row.OfflineDisplay
|
||||
Grid1.Cell(i, 15).Text = row.LowPowerDisplay
|
||||
Grid1.Cell(i, 16).Text = row.Beep
|
||||
Grid1.Cell(i, 17).Text = row.Abnormal
|
||||
Grid1.Cell(i, 18).Text = row.Sort
|
||||
Grid1.Cell(i, 19).Text = row.TCLDeviceName
|
||||
Grid1.Cell(i, 20).Text = row.MultipleGroupID
|
||||
Grid1.Cell(i, 21).Text = row.MultipleTCLName
|
||||
|
||||
|
||||
Else
|
||||
Console.WriteLine($"{i}——{row.Name}——{Name}")
|
||||
Grid1.Cell(i, 5).Text = row.ModalAddress
|
||||
Grid1.Cell(i, 6).Text = row.Name
|
||||
Grid1.Cell(i, 7).ForeColor = Color.Red
|
||||
Grid1.Cell(i, 3).ForeColor = Color.Red
|
||||
Grid1.Cell(i, 6).Text = row.ModalAddress
|
||||
Grid1.Cell(i, 7).Text = row.Name
|
||||
Grid1.Cell(i, 8).ForeColor = Color.Red
|
||||
Grid1.Cell(i, 4).ForeColor = Color.Red
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
@@ -526,6 +534,22 @@ Public Class SetLoopInformation
|
||||
|
||||
Private Sub Grid1_CellChange(Sender As Object, e As FlexCell.Grid.CellChangeEventArgs) Handles Grid1.CellChange
|
||||
If e.Row = 0 OrElse e.Col = 0 Then Return
|
||||
Dim Str As String = Grid1.Cell(e.Row, e.Col).Text
|
||||
If e.Col = 2 Then
|
||||
|
||||
If Str.Equals("True") OrElse Str.Equals("1") Then
|
||||
Grid1.Cell(e.Row, 1).Text = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Col = 1 Then
|
||||
If Str.Equals("True") OrElse Str.Equals("1") Then
|
||||
|
||||
Else
|
||||
Grid1.Cell(e.Row, 2).Text = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(Grid1.Cell(e.Row, e.Col).Tag) Then
|
||||
Return
|
||||
Else
|
||||
@@ -556,42 +580,46 @@ Public Class SetLoopInformation
|
||||
ToolStripButton6.Enabled = False
|
||||
Dim mSaveRoomTypeModal As SaveRoomTypeModal
|
||||
Dim mSaveRoomTypeModalList As New List(Of SaveRoomTypeModal)
|
||||
Dim str As String
|
||||
For i = 1 To Grid1.Rows - 1
|
||||
If String.IsNullOrEmpty(Grid1.Cell(i, 3).Text) Then Continue For
|
||||
|
||||
mSaveRoomTypeModal = New SaveRoomTypeModal
|
||||
mSaveRoomTypeModal.id = 0
|
||||
mSaveRoomTypeModal.roomTypeID = G_roomtypeid
|
||||
mSaveRoomTypeModal.modalAddress = Grid1.Cell(i, 3).Text
|
||||
mSaveRoomTypeModal.name = Grid1.Cell(i, 4).Text
|
||||
mSaveRoomTypeModal.englishName = Grid1.Cell(i, 7).Text
|
||||
mSaveRoomTypeModal.twName = Grid1.Cell(i, 8).Text
|
||||
mSaveRoomTypeModal.aliasName = Grid1.Cell(i, 9).Text
|
||||
mSaveRoomTypeModal.power = CInt(Grid1.Cell(i, 10).Text)
|
||||
mSaveRoomTypeModal.LowPower = CInt(Grid1.Cell(i, 11).Text)
|
||||
mSaveRoomTypeModal.ActiveIndicator = CBool(Grid1.Cell(i, 12).Text)
|
||||
mSaveRoomTypeModal.OfflineDisplay = CBool(Grid1.Cell(i, 13).Text)
|
||||
mSaveRoomTypeModal.LowPowerDisplay = CBool(Grid1.Cell(i, 14).Text)
|
||||
mSaveRoomTypeModal.Beep = CBool(Grid1.Cell(i, 15).Text)
|
||||
mSaveRoomTypeModal.Abnormal = CBool(Grid1.Cell(i, 16).Text)
|
||||
mSaveRoomTypeModal.sort = CInt(Grid1.Cell(i, 17).Text)
|
||||
mSaveRoomTypeModal.TCLDeviceName = Grid1.Cell(i, 18).Text
|
||||
mSaveRoomTypeModal.MultipleGroupID = CInt(Grid1.Cell(i, 19).Text)
|
||||
mSaveRoomTypeModal.MultipleTCLName = Grid1.Cell(i, 20).Text
|
||||
mSaveRoomTypeModal.color = GetColorFromString(mSaveRoomTypeModal.modalAddress)
|
||||
|
||||
Dim str As String = Grid1.Cell(i, 1).Text
|
||||
Console.WriteLine(str)
|
||||
If String.IsNullOrEmpty(Grid1.Cell(i, 4).Text) Then Continue For
|
||||
str = Grid1.Cell(i, 1).Text
|
||||
If str.Equals("True") OrElse str.Equals("1") Then
|
||||
mSaveRoomTypeModal.IsUploadBaoJing = True
|
||||
Else
|
||||
mSaveRoomTypeModal.IsUploadBaoJing = False
|
||||
mSaveRoomTypeModal = New SaveRoomTypeModal
|
||||
mSaveRoomTypeModal.id = 0
|
||||
mSaveRoomTypeModal.roomTypeID = G_roomtypeid
|
||||
mSaveRoomTypeModal.modalAddress = Grid1.Cell(i, 4).Text
|
||||
mSaveRoomTypeModal.name = Grid1.Cell(i, 5).Text
|
||||
mSaveRoomTypeModal.englishName = Grid1.Cell(i, 8).Text
|
||||
mSaveRoomTypeModal.twName = Grid1.Cell(i, 9).Text
|
||||
mSaveRoomTypeModal.aliasName = Grid1.Cell(i, 10).Text
|
||||
mSaveRoomTypeModal.power = CInt(Grid1.Cell(i, 11).Text)
|
||||
mSaveRoomTypeModal.LowPower = CInt(Grid1.Cell(i, 12).Text)
|
||||
mSaveRoomTypeModal.ActiveIndicator = CBool(Grid1.Cell(i, 13).Text)
|
||||
mSaveRoomTypeModal.OfflineDisplay = CBool(Grid1.Cell(i, 14).Text)
|
||||
mSaveRoomTypeModal.LowPowerDisplay = CBool(Grid1.Cell(i, 15).Text)
|
||||
mSaveRoomTypeModal.Beep = CBool(Grid1.Cell(i, 16).Text)
|
||||
mSaveRoomTypeModal.Abnormal = CBool(Grid1.Cell(i, 17).Text)
|
||||
mSaveRoomTypeModal.sort = CInt(Grid1.Cell(i, 18).Text)
|
||||
mSaveRoomTypeModal.TCLDeviceName = Grid1.Cell(i, 19).Text
|
||||
mSaveRoomTypeModal.MultipleGroupID = CInt(Grid1.Cell(i, 20).Text)
|
||||
mSaveRoomTypeModal.MultipleTCLName = Grid1.Cell(i, 21).Text
|
||||
mSaveRoomTypeModal.color = GetColorFromString(mSaveRoomTypeModal.modalAddress)
|
||||
|
||||
Str = Grid1.Cell(i, 2).Text
|
||||
Console.WriteLine(str)
|
||||
If str.Equals("True") OrElse str.Equals("1") Then
|
||||
mSaveRoomTypeModal.IsUploadBaoJing = True
|
||||
Else
|
||||
mSaveRoomTypeModal.IsUploadBaoJing = False
|
||||
End If
|
||||
|
||||
mSaveRoomTypeModal.outlet = ""
|
||||
mSaveRoomTypeModal.type = GetLoopType1(mSaveRoomTypeModal.modalAddress)
|
||||
mSaveRoomTypeModal.color = ""
|
||||
mSaveRoomTypeModalList.Add(mSaveRoomTypeModal)
|
||||
End If
|
||||
|
||||
mSaveRoomTypeModal.outlet = ""
|
||||
mSaveRoomTypeModal.type = GetLoopType1(mSaveRoomTypeModal.modalAddress)
|
||||
mSaveRoomTypeModal.color = ""
|
||||
mSaveRoomTypeModalList.Add(mSaveRoomTypeModal)
|
||||
|
||||
Next
|
||||
|
||||
@@ -730,7 +758,7 @@ Public Class SetLoopInformation
|
||||
'设置按钮文本颜色为 RoyalRed
|
||||
ToolStripButton2.ForeColor = Color.Red
|
||||
'将所有复选框选中
|
||||
For i As Integer = 0 To Grid1.Rows - 1
|
||||
For i As Integer = 1 To Grid1.Rows - 1
|
||||
Grid1.Cell(i, 1).Text = "True"
|
||||
Next
|
||||
Else
|
||||
@@ -741,7 +769,7 @@ Public Class SetLoopInformation
|
||||
|
||||
|
||||
'将所有复选框取消选中
|
||||
For i As Integer = 0 To Grid1.Rows - 1
|
||||
For i As Integer = 1 To Grid1.Rows - 1
|
||||
Grid1.Cell(i, 1).Text = "False"
|
||||
Next
|
||||
End If
|
||||
|
||||
14
BLV_Studio/Test/GridTest/AddPeripherals.Designer.vb
generated
14
BLV_Studio/Test/GridTest/AddPeripherals.Designer.vb
generated
@@ -60,6 +60,7 @@ Partial Class AddPeripherals
|
||||
Me.Grid1 = New FlexCell.Grid()
|
||||
Me.Temp_Grid = New FlexCell.Grid()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.ComboBox2 = New System.Windows.Forms.ComboBox()
|
||||
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainer1.Panel1.SuspendLayout()
|
||||
Me.SplitContainer1.Panel2.SuspendLayout()
|
||||
@@ -142,6 +143,7 @@ Partial Class AddPeripherals
|
||||
'
|
||||
'SplitContainer2.Panel1
|
||||
'
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.ComboBox2)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.TextBox3)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.Label9)
|
||||
Me.SplitContainer2.Panel1.Controls.Add(Me.CheckBox6)
|
||||
@@ -567,6 +569,17 @@ Partial Class AddPeripherals
|
||||
Me.Button1.Text = "确定"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'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(1134, 86)
|
||||
Me.ComboBox2.Name = "ComboBox2"
|
||||
Me.ComboBox2.Size = New System.Drawing.Size(54, 24)
|
||||
Me.ComboBox2.TabIndex = 28
|
||||
Me.ComboBox2.Visible = False
|
||||
'
|
||||
'AddPeripherals
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
|
||||
@@ -645,4 +658,5 @@ Partial Class AddPeripherals
|
||||
Friend WithEvents Button2 As Button
|
||||
Friend WithEvents Label9 As Label
|
||||
Friend WithEvents TextBox3 As TextBox
|
||||
Friend WithEvents ComboBox2 As ComboBox
|
||||
End Class
|
||||
|
||||
@@ -34,6 +34,7 @@ Public Class AddPeripherals
|
||||
Dev_ColorTemp
|
||||
BLEMUSIC
|
||||
RS485_Curtain
|
||||
LOCK
|
||||
max
|
||||
End Enum
|
||||
Enum Tcolname
|
||||
@@ -253,7 +254,7 @@ Public Class AddPeripherals
|
||||
Fdevtype.Visible = False
|
||||
FdevtypeCom.Visible = False
|
||||
SplitContainer6.Visible = False
|
||||
|
||||
ComboBox2.Visible = False
|
||||
|
||||
If Not String.IsNullOrEmpty(Resultmodel.Desc.DevDescription) Then
|
||||
Dim Rchenk() As String = Resultmodel.Desc.DevDescription.Split(",")
|
||||
@@ -319,7 +320,26 @@ Public Class AddPeripherals
|
||||
|
||||
CURTAIN_initTable(_despar)
|
||||
CURTAIN_SetIDOpenDO()
|
||||
Case FromDevType.LOCK
|
||||
Dim DevDescription As String() = Resultmodel.Desc.DevDescription.Split(",")
|
||||
Label9.Visible = True
|
||||
Label9.Text = "开锁有效期"
|
||||
TextBox3.Visible = True
|
||||
TextBox3.Enabled = True
|
||||
|
||||
ComboBox2.Visible = True
|
||||
ComboBox2.Items.Clear()
|
||||
ComboBox2.Items.Add("不设置")
|
||||
ComboBox2.Items.Add("秒")
|
||||
ComboBox2.Items.Add("分")
|
||||
If DevDescription.Length > 1 Then
|
||||
TextBox3.Text = DevDescription(0)
|
||||
ComboBox2.SelectedIndex = DevDescription(1)
|
||||
Else
|
||||
TextBox3.Text = "0"
|
||||
ComboBox2.SelectedIndex = 0
|
||||
End If
|
||||
SplitContainer4.Panel2Collapsed = True
|
||||
Case FromDevType.BLEMUSIC
|
||||
SplitContainer4.Panel2Collapsed = True
|
||||
Label9.Visible = True
|
||||
@@ -700,8 +720,10 @@ Public Class AddPeripherals
|
||||
CheckBox4.Visible = True
|
||||
Return FromDevType.Temp
|
||||
Case "BLEMUSIC"
|
||||
|
||||
Return FromDevType.BLEMUSIC
|
||||
Case "Lock"
|
||||
Return FromDevType.LOCK
|
||||
|
||||
Case "RS485_Curtain"
|
||||
Return FromDevType.RS485_Curtain
|
||||
Case "CURTAIN"
|
||||
@@ -732,7 +754,7 @@ Public Class AddPeripherals
|
||||
Private Sub SelectiveDisplay()
|
||||
g_DevType = DetermineDeviceType()
|
||||
|
||||
|
||||
ComboBox2.Visible = False
|
||||
ComboBox1.Visible = False
|
||||
Label6.Visible = False
|
||||
Table_Grid1.Visible = False
|
||||
@@ -812,6 +834,26 @@ Public Class AddPeripherals
|
||||
Table_Grid1.Visible = True
|
||||
SplitContainer4.Panel2Collapsed = True
|
||||
CURTAIN_initTable(_despar)
|
||||
Case FromDevType.LOCK
|
||||
Dim DevDescription As String() = Resultmodel.Desc.DevDescription.Split(",")
|
||||
Label9.Visible = True
|
||||
Label9.Text = "开锁有效期"
|
||||
TextBox3.Visible = True
|
||||
TextBox3.Enabled = True
|
||||
|
||||
ComboBox2.Visible = True
|
||||
ComboBox2.Items.Clear()
|
||||
ComboBox2.Items.Add("不设置")
|
||||
ComboBox2.Items.Add("秒")
|
||||
ComboBox2.Items.Add("分")
|
||||
If DevDescription.Length > 1 Then
|
||||
TextBox3.Text = DevDescription(0)
|
||||
ComboBox2.SelectedIndex = DevDescription(1)
|
||||
Else
|
||||
TextBox3.Text = "0"
|
||||
ComboBox2.SelectedIndex = 0
|
||||
End If
|
||||
SplitContainer4.Panel2Collapsed = True
|
||||
Case FromDevType.BLEMUSIC
|
||||
SplitContainer4.Panel2Collapsed = True
|
||||
Label9.Visible = True
|
||||
@@ -1317,6 +1359,29 @@ Public Class AddPeripherals
|
||||
Else
|
||||
Resultmodel.Desc.DevDescription = $"{ Resultmodel.Desc.DevDescription},0"
|
||||
End If
|
||||
Case FromDevType.LOCK
|
||||
Dim ntstyr As String
|
||||
'判断 TextBox3.Text是否为空,如果为空则赋值为"0",否则赋值为TextBox3.Text.Trim
|
||||
If String.IsNullOrEmpty(TextBox3.Text) Then
|
||||
ntstyr = "0"
|
||||
Else
|
||||
ntstyr = TextBox3.Text.Trim
|
||||
End If
|
||||
'获取ComboBox2的值如果为秒范围为 1-60,如果为分范围为 1-5,如果不设置则无范围
|
||||
Dim range As String = ComboBox2.Text.Trim
|
||||
If range = "秒" Then
|
||||
If Not (1 <= ntstyr AndAlso ntstyr <= 60) Then
|
||||
MsgBox("请输入1-60之间的数字")
|
||||
Return
|
||||
End If
|
||||
ElseIf range = "分" Then
|
||||
If Not (1 <= ntstyr AndAlso ntstyr <= 5) Then
|
||||
MsgBox("请输入1-5之间的数字")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
|
||||
Resultmodel.Desc.DevDescription = $"{ntstyr},{ComboBox2.SelectedIndex}"
|
||||
|
||||
Case FromDevType.PB_Bus
|
||||
ResdultPB_Bus()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports FlexCell
|
||||
Imports BLV_Studio.TableInteraction
|
||||
Imports FlexCell
|
||||
Public Class ReportingScenario
|
||||
|
||||
|
||||
@@ -56,9 +57,13 @@ Public Class ReportingScenario
|
||||
|
||||
|
||||
#Region "数据处理"
|
||||
Public Function getDateDisposeRuning() As List(Of MDevNodeMessage)
|
||||
Return DateDisposeRuning(Tgrd, TDevicemodel)
|
||||
Public Function getDateDisposeRuning(Optional hide As Boolean = False) As List(Of MDevNodeMessage)
|
||||
Return DateDisposeRuning(Tgrd, TDevicemodel, hide)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Function getDevloop() As Dictionary(Of String, String)
|
||||
Dim dic As New Dictionary(Of String, String)
|
||||
Dim devAddr, NodeLoop As String
|
||||
@@ -79,9 +84,9 @@ Public Class ReportingScenario
|
||||
Next
|
||||
|
||||
Next
|
||||
Return Dic
|
||||
Return dic
|
||||
End Function
|
||||
Public Function DateDisposeRuning(_grd As FlexCell.Grid, _Devicemodel As Dictionary(Of String, DeviceModel)) As List(Of MDevNodeMessage)
|
||||
Public Function DateDisposeRuning(_grd As FlexCell.Grid, _Devicemodel As Dictionary(Of String, DeviceModel), Optional hide As Boolean = False) As List(Of MDevNodeMessage)
|
||||
If IsNothing(_grd) Then Return Nothing
|
||||
Dim ACtabRange As CtabRange
|
||||
Dim rt As New RoomTypeConfig(RoomTypeID)
|
||||
@@ -149,7 +154,9 @@ Public Class ReportingScenario
|
||||
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 '过滤隐藏的回路
|
||||
'判断是否过滤隐藏回路
|
||||
|
||||
If _grd.Column(k).Visible = True OrElse hide 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
|
||||
|
||||
@@ -50,7 +50,7 @@ Public Class ServiceAttribute
|
||||
For Each node In G_hostNode.Nodes
|
||||
fustr = "服务-" & node.LoopAddr
|
||||
'2025 12 29 CZH 增加 判断服务是否是 是在25 到48 且名称符合 "服务-服务号"的格式 符合则不 添加
|
||||
If node.LoopAddr >= 25 AndAlso node.LoopAddr <= 48 AndAlso fustr.Equals(node.Name) Then '
|
||||
If node.LoopAddr >= 25 AndAlso node.LoopAddr <= 57 AndAlso fustr.Equals(node.Name) Then '
|
||||
Continue For
|
||||
End If
|
||||
Dic_1.Add($"{node.LoopAddr}:{node.Name }")
|
||||
|
||||
@@ -6558,6 +6558,7 @@ Public Class TableInteraction
|
||||
Dim tmpAddr As Byte = CInt(FindAttributeValueUnderModel2(pNode, "设备存在", "拨码地址")) '设备地址(1字节)
|
||||
Dim hostAddr As Byte = CInt(FindNodeValueUnderModel(hostNode, "RS485", pNode.Desc.DevInterface)) '设备地址(1字节)
|
||||
Dim TemptDevType As Byte = 0
|
||||
Dim T1TemptDevType As Byte = 0
|
||||
Dim ParentDevType As Byte = 0
|
||||
Dim ParentDevAddr As Byte = 0
|
||||
Dim ParentDevPort As Byte = 0
|
||||
@@ -6599,14 +6600,29 @@ Public Class TableInteraction
|
||||
End If
|
||||
|
||||
End If
|
||||
If Tcnode.Name.ToUpper.Equals("LOCK") And Not IsNothing(pNode.Desc.DevDescription) Then
|
||||
Curtainbuf= pNode.Desc.DevDescription.split(",")
|
||||
If Curtainbuf.Length > 1 Then
|
||||
|
||||
T1TemptDevType =CInt(Curtainbuf(1))
|
||||
|
||||
If T1TemptDevType=0 Then
|
||||
TemptDevType = 0
|
||||
Else
|
||||
TemptDevType=CInt(Curtainbuf(0))
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
keepParam(0) = ParentDevType
|
||||
keepParam(1) = ParentDevAddr
|
||||
keepParam(2) = ParentDevPort
|
||||
keepParam(8) = TemptDevType
|
||||
|
||||
keepParam(8) =T1TemptDevType
|
||||
keepParam(9) = TemptDevType
|
||||
For indexi = 1 To 5
|
||||
node = FindAttributeUnderModel(pNode, "设备存在", $"弱电输入{indexi}")
|
||||
If node Then
|
||||
|
||||
Reference in New Issue
Block a user