Func du()
If $pan = 1 Then
GUICtrlSetState($Group33, $GUI_FOCUS)
GUICtrlSetState($Group33, $gui_show)
$you = 0
$sComboRead = GUICtrlRead($Input7)
For $i = 0 To UBound($wangka1) - 1
For $o = 0 To UBound($mac) - 1
If $sComboRead == $wangka1[$i] Then
GUICtrlSetData($Label10, " " & $lianjie1[$i])
If StringTrimLeft($mac1[$i], 1) = "" Then
yin()
GUICtrlSetData($Label11, " " & StringTrimLeft($mac1[$i], 1))
GUICtrlSetData($xinxi, "当前网卡被禁用")
GUICtrlSetState($button1, $GUI_DISABLE)
GUICtrlSetState($button2, $GUI_DISABLE)
GUICtrlSetState($button3, $GUI_DISABLE)
GUICtrlSetState($button4, $GUI_DISABLE)
GUICtrlSetData($Group22, "当前计算机配置信息")
GUICtrlSetState($xinxi, $gui_show)
GUICtrlSetImage($ico, "", 2)
Else
GUICtrlSetState($button1, $GUI_ENABLE)
GUICtrlSetState($button2, $GUI_ENABLE)
GUICtrlSetState($button3, $GUI_ENABLE)
GUICtrlSetState($button4, $GUI_ENABLE)
GUICtrlSetState($xinxi, $gui_hide)
GUICtrlSetData($Label11, " " & StringTrimLeft($mac1[$i], 1))
xian()
EndIf
;MsgBox(0,0,UBound($mac))
;_ArrayDisplay($mac)
If $mac[$o] == StringTrimLeft($mac1[$i], 1) Then ;Exit ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$dhcp = StringTrimLeft($dhcpserver[$o], 1)
If Not $dhcp = "" Then
GUICtrlSetData($Group22, "当前计算机配置信息 “DHCP” ")
Else
GUICtrlSetData($Group22, "当前计算机配置信息")
EndIf
;If $zhuangtai[$i] == "2" Then GUICtrlSetImage($ico, @TempDir & "\line.ico", 2)
If $zhuangtai[$i] == "7" Then
GUICtrlSetImage($ico, @TempDir & "\noline.ico", 2)
GUICtrlSetData($Input66, $computer[0])
_GUICtrlIpAddress_ClearAddress($Input11)
_GUICtrlIpAddress_ClearAddress($Input22)
_GUICtrlIpAddress_ClearAddress($Input33)
_GUICtrlIpAddress_ClearAddress($Input44)
_GUICtrlIpAddress_ClearAddress($Input55)
_GUICtrlIpAddress_Set($Input11, RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\' & $id[$i], "IPAddress"))
_GUICtrlIpAddress_Set($Input22, RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\' & $id[$i], "SubnetMask"))
_GUICtrlIpAddress_Set($Input33, RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\' & $id[$i], "DefaultGateway"))
_GUICtrlIpAddress_Set($Input44, StringTrimLeft($DNS1[$o], 1))
_GUICtrlIpAddress_Set($Input55, StringTrimLeft($DNS2[$o], 1))
Else
GUICtrlSetImage($ico, @TempDir & "\line.ico", 2)
GUICtrlSetData($Input66, $computer[0])
_GUICtrlIpAddress_ClearAddress($Input11)
_GUICtrlIpAddress_ClearAddress($Input22)
_GUICtrlIpAddress_ClearAddress($Input33)
_GUICtrlIpAddress_ClearAddress($Input44)
_GUICtrlIpAddress_ClearAddress($Input55)
_GUICtrlIpAddress_Set($Input11, StringTrimLeft($IP[$o], 1))
_GUICtrlIpAddress_Set($Input22, StringTrimLeft($MAST[$o], 1))
_GUICtrlIpAddress_Set($Input33, StringTrimLeft($GATEWAY[$o], 1))
_GUICtrlIpAddress_Set($Input44, StringTrimLeft($DNS1[$o], 1))
_GUICtrlIpAddress_Set($Input55, StringTrimLeft($DNS2[$o], 1))
EndIf
EndIf
EndIf
Next
Next
ElseIf $pan = 0 Then
GUICtrlSetState($Group33, $GUI_FOCUS)
GUICtrlSetState($Group33, $gui_show)
$you = 0
;GUICtrlSetState($xinxi, $gui_hide)If StringTrimLeft($mac1[$i], 1) = "" Then
If StringTrimLeft($mac1[0], 1) = "" Then
yin()
;GUICtrlSetData($Label11, " " & StringTrimLeft($mac1[0], 1))
GUICtrlSetData($xinxi, "当前网卡被禁用")
GUICtrlSetState($button1, $GUI_DISABLE)
GUICtrlSetState($button2, $GUI_DISABLE)
GUICtrlSetState($button3, $GUI_DISABLE)
GUICtrlSetState($button4, $GUI_DISABLE)
GUICtrlSetData($Group22, "当前计算机配置信息")
GUICtrlSetState($xinxi, $gui_show)
GUICtrlSetImage($ico, "", 2)
Else
GUICtrlSetState($button1, $GUI_ENABLE)
GUICtrlSetState($button2, $GUI_ENABLE)
GUICtrlSetState($button3, $GUI_ENABLE)
GUICtrlSetState($button4, $GUI_ENABLE)
GUICtrlSetState($xinxi, $gui_hide)
GUICtrlSetData($Label11, " " & StringTrimLeft($mac1[0], 1))
xian()
GUICtrlSetData($Label10, " " & $lianjie1[0])
$dhcp = StringTrimLeft($dhcpserver[0], 1)
If Not $dhcp = "" Then
GUICtrlSetData($Group22, "当前计算机配置信息 “DHCP” ")
Else
GUICtrlSetData($Group22, "当前计算机配置信息")
EndIf
If $zhuangtai[0] == "7" Then
GUICtrlSetImage($ico, @TempDir & "\noline.ico", 2)
GUICtrlSetData($Input66, $computer[0])
_GUICtrlIpAddress_ClearAddress($Input11)
_GUICtrlIpAddress_ClearAddress($Input22)
_GUICtrlIpAddress_ClearAddress($Input33)
_GUICtrlIpAddress_ClearAddress($Input44)
_GUICtrlIpAddress_ClearAddress($Input55)
_GUICtrlIpAddress_Set($Input11, RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\' & $id[0], "IPAddress"))
_GUICtrlIpAddress_Set($Input22, RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\' & $id[0], "SubnetMask"))
_GUICtrlIpAddress_Set($Input33, RegRead('HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Interfaces\' & $id[0], "DefaultGateway"))
_GUICtrlIpAddress_Set($Input44, StringTrimLeft($DNS1[0], 1))
_GUICtrlIpAddress_Set($Input55, StringTrimLeft($DNS2[0], 1))
Else
GUICtrlSetImage($ico, @TempDir & "\line.ico", 2)
GUICtrlSetData($Input66, $computer[0])
_GUICtrlIpAddress_ClearAddress($Input11)
_GUICtrlIpAddress_ClearAddress($Input22)
_GUICtrlIpAddress_ClearAddress($Input33)
_GUICtrlIpAddress_ClearAddress($Input44)
_GUICtrlIpAddress_ClearAddress($Input55)
_GUICtrlIpAddress_Set($Input11, StringTrimLeft($IP[0], 1))
_GUICtrlIpAddress_Set($Input22, StringTrimLeft($MAST[0], 1))
_GUICtrlIpAddress_Set($Input33, StringTrimLeft($GATEWAY[0], 1))
_GUICtrlIpAddress_Set($Input44, StringTrimLeft($DNS1[0], 1))
_GUICtrlIpAddress_Set($Input55, StringTrimLeft($DNS2[0], 1))
EndIf
EndIf
Else
GUICtrlSetData($xinxi, "没有检测到网卡!")
GUICtrlSetData($Group22, "当前计算机配置信息")
GUICtrlSetState($xinxi, $gui_show)
GUICtrlSetState($button1, $GUI_DISABLE)
GUICtrlSetState($button2, $GUI_DISABLE)
GUICtrlSetState($button3, $GUI_DISABLE)
GUICtrlSetState($button4, $GUI_DISABLE)
EndIf
EndFunc ;==>du