public void AddCamera(CameraDevice camera)
 {
     if (camera != null)
     {
         CamViewer camViewer = new CamViewer();
         camViewer.Init(camera);
         CamViewers.Children.Add(camViewer);
     }
 }
 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");
     }
 }
 public void Init(CameraDevice camera)
 {
     _cameraDevice = camera;
     _cameraDevice.CameraFrame += new EventHandler<CameraFrameEventArgs>(_cameraDevice_CameraFrame);
 }
 public void AddCameraDevice(CameraDevice cameraDevice)
 {
     _dataContext.CameraDevices.Add(cameraDevice);
 }
 public CameraMotionDetector(CameraDevice camera)
 {
     _camera = camera;
     _detecting = false;
     _camera.CameraFrame += new EventHandler<CameraFrameEventArgs>(camera_CameraFrame);
 }