预留服务范围改为 25-57
This commit is contained in:
@@ -41,23 +41,35 @@ 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
|
||||
|
||||
Console.WriteLine(G_DateStr.Count)
|
||||
|
||||
|
||||
' 在 InitializeComponent() 调用之后添加任何初始化。
|
||||
@@ -128,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))
|
||||
@@ -149,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))
|
||||
@@ -170,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))
|
||||
@@ -190,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
|
||||
@@ -197,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))
|
||||
@@ -537,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)
|
||||
@@ -689,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
|
||||
@@ -716,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
|
||||
|
||||
Reference in New Issue
Block a user