Beispiel #1
0
        /// <summary>
        /// This method shows a <see cref="WebcamPropertiesDlg"/>
        /// to modify the current <see cref="CaptureDeviceProperties"/>
        /// and afterwards reinitializes the webcam.
        /// </summary>
        public void ShowConfigureDialog(bool restartCamera)
        {
            if (this.dxCapture == null)
            {
                return;
            }

            WebcamPropertiesDlg dialog = new WebcamPropertiesDlg(this.dxCapture);

            //dialog.Properties = this.properties;
            //dialog.ShouldPreview = true;

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                // Update properties
                // Validation check is within dialog
                this.properties = dialog.Properties;
                this.properties.PreviewWindow = this;
            }

            if (restartCamera)
            {
                // Restart webcam
                this.InitializeWebcam(this.properties);
                this.RunGraph();
            }
        }
Beispiel #2
0
    /// <summary>
    /// This method shows a <see cref="WebcamPropertiesDlg"/>
    /// to modify the current <see cref="CaptureDeviceProperties"/>
    /// and afterwards reinitializes the webcam.
    /// </summary>
    public void ShowConfigureDialog(bool restartCamera)
    {
      if (this.dxCapture == null)
      {
        return;
      }

      WebcamPropertiesDlg dialog = new WebcamPropertiesDlg(this.dxCapture);
      //dialog.Properties = this.properties;
      //dialog.ShouldPreview = true;

      if (dialog.ShowDialog() == DialogResult.OK)
      {
        // Update properties
        // Validation check is within dialog
        this.properties = dialog.Properties;
        this.properties.PreviewWindow = this;
      }

      if (restartCamera)
      {
        // Restart webcam
        this.InitializeWebcam(this.properties);
        this.RunGraph();
      }
    }