public IvsVideoMonitor() { this.ivsSdkClient = new IvsSdkClient(); //初始话定时器 this.updateCameraTimer.AutoReset = true; this.updateCameraTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetAllCamerasTimer); //摄像头变化不会太快,间隔时间暂定为1小时 this.updateCameraTimer.Interval = CgwConst.REFRESH_CAMERA_LIST_WAIT_TIME; //获取配置文件中刷新设备列表超时时间(s) if (!uint.TryParse(ConfigSettings.RefrshDeviceListOverTime, out refreshDeviceListOverTime)) { //缺省为180秒钟 refreshDeviceListOverTime = 180; } //获取配置文件中设备列表未被使用超时时间(s) if (!uint.TryParse(ConfigSettings.DeviceListUnusedOverTime, out deviceListUnusedOverTime)) { //缺省为5秒钟 deviceListUnusedOverTime = 5; } monitorManageServiceGetCameraList.AutoReset = true; monitorManageServiceGetCameraList.Elapsed += new System.Timers.ElapsedEventHandler(monitorManageServiceGetCameraList_Elapsed); monitorManageServiceGetCameraList.Interval = deviceListUnusedOverTime * 1000; monitorManageServiceGetCameraList.Start(); }
public IvsVideoMonitor() { this.ivsSdkClient = new IvsSdkClient(); //初始话定时器 this.updateCameraTimer.AutoReset = true; this.updateCameraTimer.Elapsed += new System.Timers.ElapsedEventHandler(GetAllCamerasTimer); //摄像头变化不会太快,间隔时间暂定为1小时 this.updateCameraTimer.Interval = CgwConst.REFRESH_CAMERA_LIST_WAIT_TIME; //获取配置文件中刷新设备列表超时时间(s) if (!uint.TryParse(ConfigSettings.RefrshDeviceListOverTime, out refreshDeviceListOverTime)) { //缺省为180秒钟 refreshDeviceListOverTime = 180; } //获取配置文件中设备列表未被使用超时时间(s) if (!uint.TryParse(ConfigSettings.DeviceListUnusedOverTime, out deviceListUnusedOverTime)) { //缺省为5秒钟 deviceListUnusedOverTime = 5; } monitorManageServiceGetCameraList.AutoReset = true; monitorManageServiceGetCameraList.Elapsed += new System.Timers.ElapsedEventHandler(monitorManageServiceGetCameraList_Elapsed); monitorManageServiceGetCameraList.Interval = deviceListUnusedOverTime * 1000; monitorManageServiceGetCameraList.Start(); }