Exemplo n.º 1
0
 public void AddCamera(CameraDevice camera)
 {
     if (camera != null)
     {
         CamViewer camViewer = new CamViewer();
         camViewer.Init(camera);
         CamViewers.Children.Add(camViewer);
     }
 }
Exemplo n.º 2
0
 private void InitCameraDevice()
 {
     CameraDeviceFactory cameraDeviceFactory = new CameraDeviceFactory(_config);
     _cameraDevice = cameraDeviceFactory.GetFirstCameraDevice();
     if (_cameraDevice != null)
     {
         _view.AddCamera(_cameraDevice);
         _motionDetector = new CameraMotionDetector(_cameraDevice);
         _motionDetector.MotionDetected += new EventHandler<MotionDetectedEventArgs>(_motionDetector_MotionDetected);
     }
     else
     {
         _motionDetector = new NullMotionDetector();
         Logger.Debug("Could not detect camera device");
     }
 }
Exemplo n.º 3
0
 public void Init(CameraDevice camera)
 {
     _cameraDevice = camera;
     _cameraDevice.CameraFrame += new EventHandler<CameraFrameEventArgs>(_cameraDevice_CameraFrame);
 }
Exemplo n.º 4
0
 public void AddCameraDevice(CameraDevice cameraDevice)
 {
     _dataContext.CameraDevices.Add(cameraDevice);
 }
 public CameraMotionDetector(CameraDevice camera)
 {
     _camera = camera;
     _detecting = false;
     _camera.CameraFrame += new EventHandler<CameraFrameEventArgs>(camera_CameraFrame);
 }