Files

85 lines
2.9 KiB
VB.net
Raw Permalink Normal View History

Imports System.IO
Imports System.Runtime.InteropServices
Imports BLV_Studio.JpWordCheckForTTL
Imports ExcelLibrary.SpreadSheet
Imports Microsoft.Office.Interop.Excel
Public Class AddLoopInfo
Public LoopInfodic As List(Of String)
Private Sub AddLoopInfo_Load(sender As Object, e As EventArgs) Handles MyBase.Load
LoopInfodic = New List(Of String)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'判断所有的输入框是否为空
If String.IsNullOrEmpty(TextBox1.Text) AndAlso TextBox1.Text.Trim.Length <> 9 Then
MsgBox("回路地址异常!")
Return
End If
If String.IsNullOrEmpty(TextBox2.Text) Then
MsgBox("回路名称为空!")
Return
End If
If String.IsNullOrEmpty(TextBox6.Text) Then
MsgBox("功率数值为空!")
Return
End If
If String.IsNullOrEmpty(DomainUpDown1.Text) Then
MsgBox("排序数值为空!")
Return
End If
'If String.IsNullOrEmpty(ComboBox1.Text) Then
' MsgBox("TCL设备为空")
' Return
'End If
If String.IsNullOrEmpty(DomainUpDown2.Text) Then
MsgBox("设备组编号为空!")
Return
End If
'If String.IsNullOrEmpty(ComboBox2.Text) Then
' MsgBox("设备组为空!")
' Return
'End If
'Grid1.Cell(0 1).Text = "回路地址"
'Grid1.Cell(0 2).Text = "回路名称"
'Grid1.Cell(0 3).Text = "英文名称"
'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 = "TCL设备名"
'Grid1.Cell(0 15).Text = "组设备编号"
'Grid1.Cell(0 16).Text = "组设备名"
LoopInfodic.Add(0)
LoopInfodic.Add(TextBox1.Text.Trim)
LoopInfodic.Add(TextBox2.Text.Trim)
LoopInfodic.Add("")
LoopInfodic.Add("")
LoopInfodic.Add(TextBox3.Text.Trim)
LoopInfodic.Add(TextBox4.Text.Trim)
LoopInfodic.Add(TextBox5.Text.Trim)
LoopInfodic.Add(TextBox6.Text.Trim)
LoopInfodic.Add(0)
LoopInfodic.Add(1)
LoopInfodic.Add(0)
LoopInfodic.Add(0)
LoopInfodic.Add(0)
LoopInfodic.Add(0)
LoopInfodic.Add(DomainUpDown1.Text.Trim)
LoopInfodic.Add(ComboBox1.Text.Trim)
LoopInfodic.Add(DomainUpDown2.Text.Trim)
LoopInfodic.Add(ComboBox2.Text.Trim)
Me.DialogResult = System.Windows.Forms.DialogResult.OK
End Sub
End Class