📄 frmnode.frm
字号:
VERSION 5.00
Begin VB.Form FrmNode
Caption = "添加节点"
ClientHeight = 3435
ClientLeft = 4995
ClientTop = 3555
ClientWidth = 4110
LinkTopic = "Form1"
ScaleHeight = 3435
ScaleWidth = 4110
Begin VB.TextBox txtNo2
Height = 375
Left = 1800
TabIndex = 8
Top = 840
Width = 1815
End
Begin VB.TextBox txtPort
Height = 375
Left = 1800
TabIndex = 7
Text = "8192"
Top = 2280
Width = 1815
End
Begin VB.CommandButton Command2
Caption = "取 消"
Height = 375
Left = 2160
TabIndex = 5
Top = 2880
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "添 加"
Height = 375
Left = 360
TabIndex = 4
Top = 2880
Width = 1095
End
Begin VB.TextBox txtIP
Height = 375
Left = 1800
TabIndex = 2
Text = "128.0.2.0"
Top = 1560
Width = 1815
End
Begin VB.TextBox txtName
Height = 375
Left = 1800
TabIndex = 1
Text = "老化位1"
Top = 120
Width = 1815
End
Begin VB.Label Label4
Caption = "序 号:"
Height = 495
Left = 600
TabIndex = 9
Top = 960
Width = 975
End
Begin VB.Label Label3
Caption = "端 口:"
Height = 375
Left = 600
TabIndex = 6
Top = 2280
Width = 1095
End
Begin VB.Label Label2
Caption = "IP地址:"
Height = 375
Left = 600
TabIndex = 3
Top = 1680
Width = 1095
End
Begin VB.Label Label1
Caption = "老化位名:"
Height = 375
Left = 480
TabIndex = 0
Top = 240
Width = 1095
End
End
Attribute VB_Name = "FrmNode"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public nLevel As Integer
Private Sub Command1_Click()
Dim tmpNode As Node
Dim tmpEle As IXMLDOMElement
Dim tmpEle2 As IXMLDOMElement
Set tmpEle2 = findEle(rootLaoHua, "key", FrmMain.curNode.Key)
Set tmpEle = FindEle2(tmpEle2.childNodes, "location", "orderNo", txtNo2.Text)
If tmpEle Is Nothing Then
Set tmpNode = FrmMain.AddMonitorNode(sPrefix & nKey, txtName.Text, nLevel)
tmpNode.Tag = nLevel
ReDim Preserve Locations(nKey)
'add to xml
Set tmpEle = addEle(tmpEle2, "location", "")
tmpEle.setAttribute "name", txtName.Text
addEle tmpEle, "key", tmpNode.Key
addEle tmpEle, "orderNo", txtNo2
'检测单元Ip & Port & Line
' addEle tmpEle, "CellIp", txtCellIP.Text
' addEle tmpEle, "CellPort", txtCellPort.Text
' addEle tmpEle, "CellLine", cmbCellLine.Text
'ip & port
addEle tmpEle, "IP", txtIP.Text
addEle tmpEle, "Port", txtPort.Text
' Locations(nKey).BarCode = ""
' Locations(nKey).DateTime = "0:00:00"
'ip & port
Locations(nKey).IP = txtIP.Text
Locations(nKey).Port = txtPort.Text
' Locations(nKey).CellIP = txtCellIP.Text
' Locations(nKey).CellPort = txtCellPort.Text
' Locations(nKey).CellLine = cmbCellLine.Text
nKey = nKey + 1
Else
MsgBox "该序号已经被使用!", vbCritical + vbOKOnly
Exit Sub
End If
SaveProject
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -