예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CameraTaskBase"/> class.
        /// </summary>
        /// <param name="cameraController">Current camera controller.</param>
        /// <exception cref="ArgumentNullException"><paramref name="cameraController"/> is <see langword="null"/>.</exception>
        protected CameraTaskBase(CameraController cameraController)
        {
            if (cameraController == null)
            {
                throw new ArgumentNullException("cameraController");
            }

            this.CameraController = cameraController;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="StartPhotoCaptureTask"/> class.
        /// </summary>
        /// <param name="cameraController">Current camera controller.</param>
        /// <param name="photoCapture">Photo capture to stop.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="cameraController"/> is <see langword="null"/>.
        ///     <para>-or-</para>
        /// <paramref name="photoCapture"/> is <see langword="null"/>.
        /// </exception>
        public StartPhotoCaptureTask(CameraController cameraController, IPhotoCapture photoCapture)
            : base(cameraController)
        {
            if (photoCapture == null)
            {
                throw new ArgumentNullException("photoCapture");
            }

            this.photoCapture = photoCapture;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="InitializePhotoCaptureTask"/> class.
        /// </summary>
        /// <param name="cameraController">Current camera controller.</param>
        /// <param name="photoCapture">Photo capture to initialize.</param>
        /// <param name="captureParameters">Photo capture parameters.</param>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="cameraController"/> is <see langword="null"/>.
        ///     <para>-or-</para>
        /// <paramref name="photoCapture"/> is <see langword="null"/>.
        ///     <para>-or-</para>
        /// <paramref name="captureParameters"/> is <see langword="null"/>.
        /// </exception>
        public InitializePhotoCaptureTask(CameraController cameraController, IPhotoCapture photoCapture, CaptureParameters captureParameters)
            : base(cameraController)
        {
            if (photoCapture == null)
            {
                throw new ArgumentNullException("photoCapture");
            }

            if (captureParameters == null)
            {
                throw new ArgumentNullException("captureParameters");
            }

            this.photoCapture      = photoCapture;
            this.captureParameters = captureParameters;
        }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LoadCameraTask"/> class.
 /// </summary>
 /// <param name="cameraController">Current camera controller.</param>
 /// <exception cref="ArgumentNullException"><paramref name="cameraController"/> is <see langword="null"/>.</exception>
 public LoadCameraTask(CameraController cameraController)
     : base(cameraController)
 {
     // Do nothing.
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="VariablePhotoCapture"/> class.
 /// </summary>
 /// <param name="cameraController">Camera controller.</param>
 /// <exception cref="ArgumentNullException"><paramref name="cameraController"/> is <see langword="null"/>.</exception>
 public VariablePhotoCapture(CameraController cameraController)
     : base (cameraController)
 {
     // Do nothing.
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResetFocusTask"/> class.
 /// </summary>
 /// <param name="cameraController">Current camera controller.</param>
 /// <exception cref="ArgumentNullException"><paramref name="cameraController"/> is <see langword="null"/>.</exception>
 public ResetFocusTask(CameraController cameraController)
     : base(cameraController)
 {
     // Do nothing.
 }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StartPreviewTask"/> class.
 /// </summary>
 /// <param name="cameraController">Current camera controller.</param>
 /// <param name="previewSize">The desired preview size.</param>
 /// <exception cref="ArgumentNullException"><paramref name="cameraController"/> is <see langword="null"/>.</exception>
 public StartPreviewTask(CameraController cameraController, Size previewSize)
     : base(cameraController)
 {
     this.previewSize = previewSize;
 }
예제 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FocusTask"/> class.
 /// </summary>
 /// <param name="cameraController">Current camera controller.</param>
 /// <param name="focusPoint">Point of interest to focus on.</param>
 /// <exception cref="ArgumentNullException"><paramref name="cameraController"/> is <see langword="null"/>.</exception>
 public FocusTask(CameraController cameraController, Point? focusPoint)
     : base(cameraController)
 {
     this.focusPoint = focusPoint;
 }
예제 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StopPreviewTask"/> class.
 /// </summary>
 /// <param name="cameraController">Current camera controller.</param>
 /// <exception cref="ArgumentNullException"><paramref name="cameraController"/> is <see langword="null"/>.</exception>
 public StopPreviewTask(CameraController cameraController)
     : base(cameraController)
 {
     // Do nothing.
 }