Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

69 lines
2.2 KiB

<PUBLIC:COMPONENT tagName="devcls" XMLNS:devcls>
<?IMPORT namespace="devcls" implementation="dev.htc">
<PUBLIC:PROPERTY NAME="Expand" />
<PUBLIC:PROPERTY NAME="Guid" />
<PUBLIC:DEFAULTS viewLinkContent />
<PUBLIC:ATTACH EVENT="oncontentready" ONEVENT="Init()" />
<SCRIPT LANGUAGE="VBScript">
Dim normalColor
Dim devcon
Dim cls
Sub Hilite()
normalColor = devcls_title.runtimeStyle.color
devcls_title.runtimeStyle.color = "blue"
End Sub
Sub Restore()
devcls_title.runtimeStyle.color = normalColor
End Sub
Sub Init()
Expand = false
set fpClick = getRef("Click")
set fpHilite = getRef("Hilite")
set fpRestore = getRef("Restore")
set DevCon = CreateObject("DevCon.DeviceConsole")
set Cls = DevCon.SetupClasses(Guid)(1)
devcls_bound.attachEvent "onclick", fpClick
devcls_bound.attachEvent "onmouseover", fpHilite
devcls_bound.attachEvent "onmouseout", fpRestore
devcls_title.innerHtml=element.innerHtml
devcls_icon.ObtainIcon Cls
End Sub
Function GenDevList
Set devs = Cls.Devices
If devs.Count Then
lst = "<br>"
For Each dev In devs
lst = lst & "<devcls:dev Instance=""" & dev.InstanceId & """>" & dev.Description & "</devcls:dev><br>"
Next
lst = lst & ""
Else
lst = "<br><img align = ""absmiddle"" src=""arrow_none.gif""><img align = ""absmiddle"" src=""arrow_none.gif""><i>No devices</i><br>"
End If
GenDevList = lst
End Function
Sub Click()
Expand = Not Expand
If Expand Then
devcls_info.innerHtml = GenDevList
devcls_info.style.display = ""
devcls_arrow.src = "arrow_down.gif"
Else
devcls_info.style.display = "none"
devcls_arrow.src = "arrow_right.gif"
End If
End Sub
</SCRIPT>
<BODY>
<SPAN id="devcls_bound">
<IMG id="devcls_arrow" align = "absmiddle" src="arrow_right.gif" width="25" height="15" />
<object classid="clsid:514C3095-47E8-4B24-B831-FB1C22C1B1B6" id="devcls_icon" width="16" height="16">
</object>&nbsp;
<SPAN id="devcls_title"></SPAN>
</SPAN>
<SPAN id="devcls_info"></SPAN>
</BODY></PUBLIC:COMPONENT>