Diag Devices
.en { display:none ; }
.fr { display:none ; }
.ja { display:none ; }
Dim SN
Dim Session
'-----------------------------------------------------------
'
'-----------------------------------------------------------
Sub DevicesEnum_DevicesHaveChanged
xml.XMLDocument.loadXML DevicesEnum.object.DevicesList
With Display
Do Until .rows.length = 0
.deleterow 0
Loop
For Each elt in xml.XMLDocument.selectnodes("//d")
With .insertrow()
.insertcell().innerHTML = ""
.insertcell.innertext = elt.selectsinglenode("vid").text
.insertcell.innertext = elt.selectsinglenode("pid").text
.insertcell.innertext = elt.selectsinglenode("bcd").text
.insertcell.innertext = elt.selectsinglenode("sn").text
End With
Next
End With
On Error Resume Next
Set WshShell = CreateObject("WScript.Shell")
SN = WshShell.RegRead("HKEY_CURRENT_USER\Software\VB and VBA Program Settings\DDT\Hardware\InstanceName")
if SN = "" then Exit Sub
search.href="/RemoteDiagDirectory/Search.asp?sn=" & SN
Missing.rows(0).Cells(4).innertext= SN
Missing.style.display=""
For each elt in document.all("device")
if elt.ID = SN Then
elt.checked = True
Missing.style.display="none"
Exit Sub
End If
Next
End Sub
'-----------------------------------------------------------
'
'-----------------------------------------------------------
Sub Window_OnLoad()
On Error Resume Next
selectlang
InitHelpButton HelpButton, window.location.pathname
' controler la version et rediriger sur la page d'installation si necessaire
CheckDDT2000Version()
if DevicesEnum.object is nothing then
ok = false
if lang = "fr" then
msgbox "Erreur de création de DevicesEnumeration : DDT2000 n'est pas installé correctement, vous allez Ä™tre redirigé vers la page d'installation de DDT2000"
else
msgbox "Error when creating object DevicesEnumeration : DDT2000 install is not correct, goto installation page"
end if
window.location.href = "Configuration.htm"
Exit Sub
end if
DevicesEnum_DevicesHaveChanged
End Sub
'-----------------------------------------------------------
'
'-----------------------------------------------------------
Sub window_ondragstart
Dim eltid
With window.event
eltid = .srcelement.id
If Len(eltid) = 0 Then
Else
.datatransfer.setdata "text", "\\.\" & eltid
End If
End With
End Sub
'-----------------------------------------------------------
' change interface
'-----------------------------------------------------------
Sub Save_OnClick
For each elt in document.all("device")
if elt.checked then
If SN = elt.ID Then Exit For
' changement du boitier
Set WshShell = CreateObject("WScript.Shell")
WshShell.RegWrite "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\DDT\Hardware\InstanceName", elt.ID
' Obtenir la session
Set Session = GetSessionFromDiagContext
If not Session Is Nothing Then
' close current port (USB or COMx)
window.status = "Close PORT"
on error resume next
session.clear
session.CommPort = ""
err.clear
' set Default Port
session.DefaultPort = "NONE"
' open USB port
window.status = "open USB PORT"
session.CommPort = "NONE"
if err.number 0 then
msgerror.innerHTML = "Error when opening USB port" & _
err.description
err.clear
exit sub
end if
window.status = "Done"
End If
Exit For
End If
Next
document.location.href="scanxml.htm"
End Sub
'-----------------------------------------------
' l'utilisateur essaye de quitter la page
'-----------------------------------------------
Function Window_OnBeforeUnload()
on error resume next
set session = nothing
End Function
CONFIGURATION
Select the device to use or None, then click on GO
Vendor Id
Product Id
BCD
SN
Missing
None
page version -
15 October, 2003
© RENAULT 1996-2004
All rights reserved
Wyszukiwarka
Podobne podstrony:
Herbert, Frank Gambling DevicedevicesDevice Central CS3 LéameListening devicesDevice Central CS3 Lees mijDevice Central CS3 Lisez moiGSM listening devicesDevice Central CS3 IlgeobogiDevice Central CS3 ZishudevicesMalicious Software in Mobile DevicesListening device PRO 1Assessment of Hazard in the Manual Handling of Explosives Initiator DevicesKRC4 Device net Configurationdevice usage statisticsdevice?rozdzial 3 net device managermodule DEVICEwięcej podobnych podstron