📄 frmadd.frm
字号:
Case True
'设置上行最大带宽
Select Case Combo3.Text
Case "8M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 256" + vbCrLf
Case "7M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 224" + vbCrLf
Case "6M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 192" + vbCrLf
Case "5M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 160" + vbCrLf
Case "4M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 128" + vbCrLf
Case "3M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 96" + vbCrLf
Case "2M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 64" + vbCrLf
Case "1M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 32" + vbCrLf
Case "512K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 16" + vbCrLf
Case "256K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 8" + vbCrLf
Case "128K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 4" + vbCrLf
Case "64K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 2" + vbCrLf
End Select
'设置下行最大带宽
Select Case Combo4.Text
Case "8M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 256" + vbCrLf
Case "7M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 224" + vbCrLf
Case "6M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 192" + vbCrLf
Case "5M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 160" + vbCrLf
Case "4M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 128" + vbCrLf
Case "3M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 96" + vbCrLf
Case "2M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 64" + vbCrLf
Case "1M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 32" + vbCrLf
Case "512K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 16" + vbCrLf
Case "256K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 8" + vbCrLf
Case "128K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 4" + vbCrLf
Case "64K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 2" + vbCrLf
End Select
'设置端口交织模式
Select Case Combo5.Text
Case "fast"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl fimode fast" + vbCrLf
Case "interleaved"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl fimode interleaved" + vbCrLf
End Select
Case False
Text3.Text = Text3.Text + "config port " + banhao + ":21 attach dsl-profile " + Trim(Text4.Text) + vbCrLf
End Select
'向superVlan中添加子Vlan
Text3.Text = Text3.Text + "config vlan super add subvlanbyport " + banhao + ":1-" + banhao + ":32" + vbCrLf
Select Case Combo6.Text
Case "bindIP"
'绑定端口IP
For i = 1 To 32
If ip4 = "255" Then
ip3 = Trim(Str(Val(ip3) + 1))
ip4 = "1"
End If
Text3.Text = Text3.Text + "create bindipentry " + ip1 + "." + ip2 + "." + ip3 + "." + ip4 + " " + banhao + ":" + Trim(Str(i)) + vbCrLf
ip4 = Trim(Str(Val(ip4) + 1))
Next i
Case "pppoe"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 pppoe-terminate enable" + vbCrLf
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 maclimit enable" + vbCrLf
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 maclimit 1" + vbCrLf
End Select
Text3.Text = Text3.Text + "save configuration"
End Sub
Private Sub harbour2()
'打开端口
Text3.Text = "config port " + banhao + ":1-" + banhao + ":32 enable" + vbCrLf
Select Case Option1.Value
Case True
'设置上行最大带宽
Select Case Combo3.Text
Case "8M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 256" + vbCrLf
Case "7M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 224" + vbCrLf
Case "6M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 192" + vbCrLf
Case "5M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 160" + vbCrLf
Case "4M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 128" + vbCrLf
Case "3M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 96" + vbCrLf
Case "2M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 64" + vbCrLf
Case "1M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 32" + vbCrLf
Case "512K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 16" + vbCrLf
Case "256K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 8" + vbCrLf
Case "128K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 4" + vbCrLf
Case "64K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl downrate max 2" + vbCrLf
End Select
'设置下行最大带宽
Select Case Combo4.Text
Case "8M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 256" + vbCrLf
Case "7M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 224" + vbCrLf
Case "6M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 192" + vbCrLf
Case "5M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 160" + vbCrLf
Case "4M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 128" + vbCrLf
Case "3M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 96" + vbCrLf
Case "2M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 64" + vbCrLf
Case "1M"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 32" + vbCrLf
Case "512K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 16" + vbCrLf
Case "256K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 8" + vbCrLf
Case "128K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 4" + vbCrLf
Case "64K"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl uprate max 2" + vbCrLf
End Select
'设置端口交织模式
Select Case Combo5.Text
Case "fast"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl fimode fast" + vbCrLf
Case "interleaved"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 adsl fimode interleaved" + vbCrLf
End Select
Case False
Text3.Text = Text3.Text + "config port " + banhao + ":21 attach dsl-profile " + Trim(Text4.Text) + vbCrLf
End Select
'向superVlan中添加子Vlan
Text3.Text = Text3.Text + "config vlan super add subvlanbyport " + banhao + ":1-" + banhao + ":32" + vbCrLf
Select Case Combo6.Text
Case "bindIP"
'绑定端口IP
For i = 1 To 32
If ip4 = "255" Then
ip3 = Trim(Str(Val(ip3) + 1))
ip4 = "1"
End If
Text3.Text = Text3.Text + "create bindipentry " + ip1 + "." + ip2 + "." + ip3 + "." + ip4 + " " + banhao + ":" + Trim(Str(i)) + vbCrLf
ip4 = Trim(Str(Val(ip4) + 1))
Next i
Case "pppoe"
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 pppoe-terminate enable" + vbCrLf
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 maclimit enable" + vbCrLf
Text3.Text = Text3.Text + "config port " + banhao + ":1-" + banhao + ":32 maclimit 1" + vbCrLf
End Select
Text3.Text = Text3.Text + "save configuration"
End Sub
Private Sub zxdsl()
End Sub
Private Sub huawei()
End Sub
Private Sub cmdexit_Click()
End
End Sub
Private Sub cmdok_Click()
Dim chrip, strip As String
Dim i As Integer
If Text1.Text = "" Or Text2.Text = "" Or Combo1.Text = "请选择相应设备" Or Combo1.Text = "" Or Combo2.Text = "" Or Combo3.Text = "" Or Combo4.Text = "" Or Combo5.Text = "" Or Combo6.Text = "" Then
MsgBox "请填写完整必须的信息!"
Exit Sub
End If
Text3.Text = ""
ip1 = ""
ip2 = ""
ip3 = ""
ip4 = ""
chrip = ""
i = 1
banhao = Trim(Text1.Text)
strip = Trim(Text2.Text)
While chrip <> "."
ip1 = ip1 + chrip
chrip = Mid(strip, i, 1)
i = i + 1
Wend
chrip = ""
While chrip <> "."
ip2 = ip2 + chrip
chrip = Mid(strip, i, 1)
i = i + 1
Wend
chrip = ""
While chrip <> "."
ip3 = ip3 + chrip
chrip = Mid(strip, i, 1)
i = i + 1
Wend
chrip = ""
'MsgBox Str(i)
'ip4 = Mid(strip, i, Len(strip) - i + 1)
'MsgBox "ip1:" + ip1 + " ip2:" + ip2 + " ip3:" + ip3 + " ip4:" + ip4
Select Case Combo1.Text
Case "港湾1.0"
harbour1
Case "港湾2.0"
harbour2
Case "中兴"
zxdsl
Case "华为"
huawei
End Select
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Frame1.Enabled = True
Frame2.Enabled = False
Else
Frame1.Enabled = False
Frame2.Enabled = False
End If
End Sub
Private Sub Option2_Click()
If Option2.Value = True Then
Frame2.Enabled = True
Frame1.Enabled = False
Else
Frame2.Enabled = False
Frame1.Enabled = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -