/// <summary>
 /// Handles the PropertyChanged event of HueDirectShowPropertyControl object.
 /// </summary>
 private void hueDirectShowPropertyControl_PropertyChanged(object sender, DirectShowPropertyChangedEventArgs e)
 {
     try
     {
         // if control is enabled
         if (((Control)sender).Enabled)
         {
             // update webcam hue value
             _camera.ImageQuality.Hue = new DirectShowImageQualityPropertyValue(e.Value, e.IsAuto);
         }
     }
     catch (DirectShowCameraException ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Handles the PropertyChanged event of ZoomDirectShowPropertyControl object.
 /// </summary>
 private void zoomDirectShowPropertyControl_PropertyChanged(object sender, DirectShowPropertyChangedEventArgs e)
 {
     try
     {
         // if control is enabled
         if (((Control)sender).Enabled)
         {
             // update webcam zoom value
             _camera.CameraControl.Zoom = new DirectShowCameraControlPropertyValue(e.Value, e.IsAuto);
         }
     }
     catch (DirectShowCameraException ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
 /// <summary>
 /// Raises the <see cref="PropertyChanged" /> event.
 /// </summary>
 /// <param name="args">The <see cref="DirectShowPropertyChangedEventArgs"/> instance containing the event data.</param>
 protected void OnPropertyChanged(DirectShowPropertyChangedEventArgs args)
 {
     if (PropertyChanged != null)
         PropertyChanged(this, args);
 }