sub Server_CamerasReceived() CreateTree Dim cameras,camera Set cameras = server.Cameras For Each camera In cameras AddItem camera.ID,camera.Description next end sub sub Server_EventsReceived(ByVal SensorID) dim Events,SensorEvent,on_click set Events = server.Events(SensorID) if Events.Count = 0 then exit sub End if ' 100% CPU ' For Each SensorEvent In Events ' on_click = "EventClick("+CStr(SensorID)+","""+CStr(SensorEvent.StartTime)+"""," + CStr(SensorEvent.Duration) + ")" ' AddSubItem -1,SensorID,SensorEvent.ID,CStr(SensorEvent.StartTime) + " (" + CStr(SensorEvent.Duration) + " sec)",on_click ' next end sub sub Server_EventAdd(SensorID,EventID) dim EventInfo,on_click set EventInfo = Server.GetEventInfo(EventID,SensorID) on_click = "EventClick("+CStr(SensorID)+","""+CStr(EventInfo.StartTime)+"""," + CStr(EventInfo.Duration) + ")" AddSubItem 0,SensorID,EventID,CStr(EventInfo.StartTime),on_click end sub sub Server_EventUpdate(SensorID,EventID) dim EventInfo,on_click set EventInfo = Server.GetEventInfo(EventID,SensorID) on_click = "EventClick("+CStr(SensorID)+","""+CStr(EventInfo.StartTime)+"""," + CStr(EventInfo.Duration) + ")" ChangeSubitem SensorID,EventID,CStr(EventInfo.StartTime) + " (" + CStr(EventInfo.Duration) + " sec)",on_click end sub sub Server_LoggedIn() divVideoWindow1.style.visibility = "visible" ' VideoWindow1.WindowSize = 1 ' divVideoWindow2.style.visibility = "visible" ' VideoWindow2.WindowSize = 1 end sub sub Server_SessionFailed() DeleteTree end sub