void camara_CameraEvent(object sender, _DLVCamEvents_CameraEventEvent e) { switch (e.id) { case 2: //EVENTO CONECTADO try { if (this.connected == false) { this.connected = true; tGetImages = new Thread(new ThreadStart(getImages)); tGetImages.Name = "Thread GetImages"; tGetImages.IsBackground = true; tGetImages.Priority = ThreadPriority.Highest; tGetImages.Start(); if (this.ThermoCamConnected != null) { this.ThermoCamConnected(this, null); } } } catch (Exception ex) { procesarExcepcion(ex, "Evento conectado"); } break; case 3: //DEVICE DISCONNECTED this.connected = false; if (this.ThermoCamDisConnected != null) { this.ThermoCamDisConnected(this, null); } break; case 4: //DEVICE CONNECTION BROKEN this.connected = false; if (this.ThermoCamDisConnected != null) { this.ThermoCamDisConnected(this, null); } break; case 5: //DEVICE RECCONECTED FROM BROKEN CONNECTION if (this.connected == false) { this.connected = true; tGetImages = new Thread(new ThreadStart(getImages)); tGetImages.Name = "Thread GetImages Reconnected"; tGetImages.IsBackground = true; tGetImages.Start(); if (this.ThermoCamConnected != null) { this.ThermoCamConnected(this, null); } } break; case 6: //DEVICE IS IN DISCONNECTING PHASE break; case 7: //AUTO ADJUST EVENT break; case 8: //START OF SHUTTER OPERATION break; case 9: //END OF SHUTTER OPERATION break; case 10: //LUT Table Uptdated getLutTable(); break; case 11: //RECORDING CONNECTIONS CHANGED break; case 12: //IMAGE CAPTURED break; case 13: //ALL CAMERA SETTINGS RETRIEVED break; case 14: //FRAME RATE TABLE AVAILABLE (PROPERTY 75) object framesObject = this.camara.GetCameraProperty(75); if (framesObject is double[]) { double[] frames = (double[])framesObject; short status = this.camara.SetCameraProperty(43, frames[0]); } break; case 15: //FRAME RATE CHANGED COMPLETED (PROPERTY 43) object frame = this.camara.GetCameraProperty(43); frame.ToString(); break; case 16: //MEASUREMENT RANGE TABLE AVAILABLE (PROPERTY 46) break; case 17: //MEASUREMENT RANE CHANGE COMPLETED (AFTER SETTIG PROPERTY 12) break; case 18: //IMAGE SIZE HAS CHANGED int a; a = 1; break; } }
void camara_CameraEvent(object sender, _DLVCamEvents_CameraEventEvent e) { switch (e.id) { case 2: //EVENTO CONECTADO try { if (this.connected == false) { this.connected = true; tGetImages = new Thread(new ThreadStart(getImages)); tGetImages.Name = "Thread GetImages"; tGetImages.IsBackground = true; tGetImages.Priority = ThreadPriority.Highest; tGetImages.Start(); if (this.ThermoCamConnected != null) this.ThermoCamConnected(this, null); } } catch (Exception ex) { procesarExcepcion(ex, "Evento conectado"); } break; case 3: //DEVICE DISCONNECTED this.connected = false; if (this.ThermoCamDisConnected != null) this.ThermoCamDisConnected(this, null); break; case 4: //DEVICE CONNECTION BROKEN this.connected = false; if (this.ThermoCamDisConnected != null) this.ThermoCamDisConnected(this, null); break; case 5: //DEVICE RECCONECTED FROM BROKEN CONNECTION if (this.connected == false) { this.connected = true; tGetImages = new Thread(new ThreadStart(getImages)); tGetImages.Name = "Thread GetImages Reconnected"; tGetImages.IsBackground = true; tGetImages.Start(); if (this.ThermoCamConnected != null) this.ThermoCamConnected(this, null); } break; case 6: //DEVICE IS IN DISCONNECTING PHASE break; case 7: //AUTO ADJUST EVENT break; case 8: //START OF SHUTTER OPERATION break; case 9: //END OF SHUTTER OPERATION break; case 10: //LUT Table Uptdated getLutTable(); break; case 11: //RECORDING CONNECTIONS CHANGED break; case 12: //IMAGE CAPTURED break; case 13: //ALL CAMERA SETTINGS RETRIEVED break; case 14: //FRAME RATE TABLE AVAILABLE (PROPERTY 75) object framesObject = this.camara.GetCameraProperty(75); if (framesObject is double[]) { double[] frames = (double[]) framesObject; short status = this.camara.SetCameraProperty(43, frames[0]); } break; case 15: //FRAME RATE CHANGED COMPLETED (PROPERTY 43) object frame = this.camara.GetCameraProperty(43); frame.ToString(); break; case 16: //MEASUREMENT RANGE TABLE AVAILABLE (PROPERTY 46) break; case 17: //MEASUREMENT RANE CHANGE COMPLETED (AFTER SETTIG PROPERTY 12) break; case 18: //IMAGE SIZE HAS CHANGED int a; a = 1; break; } }