/// <summary>
 /// Class constructor.
 /// </summary>
 public CaptureDepths()
 {
     foreach (var item in Enum.GetValues(typeof(CaptureInterface.Enumeration.ColorDepth)))
     {
         CaptureDepth newCaptureDepth = new CaptureDepth();
         newCaptureDepth.ColorDepth = (CaptureInterface.Enumeration.ColorDepth)item;
         newCaptureDepth.IsSet = false;
         newCaptureDepth.OnCaptureDepthSet += OnCaptureDepthSet;
         captureDepthList.Add(newCaptureDepth);
     }
     captureDepthList.Where(x => x.ColorDepth == CaptureInterface.Enumeration.ColorDepth.Gray).FirstOrDefault().IsSet = true;
 }
 /// <summary>
 /// On a new capture depth is set.
 /// </summary>
 /// <param name="CaptureDepth">Reference to the capture depth.</param>
 /// <param name="IsSet">Is set or reset.</param>
 private static void OnCaptureDepthSet(CaptureDepth CaptureDepth)
 {
     if (OnCameraCaptureDepthChanged != null)
     {
         OnCameraCaptureDepthChanged(CaptureDepth);
     }
     currentCaptureDepth = CaptureDepth;
 }
 /// <summary>
 /// On a new capture depth is set.
 /// </summary>
 /// <param name="CaptureDepth">Reference to the capture depth.</param>
 /// <param name="IsSet">Is set or reset.</param>
 private void OnCaptureDepthSet(CaptureDepth CaptureDepth, bool IsSet)
 {
     foreach (var item in captureDepthList.Where(x => x.ColorDepth != CaptureDepth.ColorDepth))
     {
         item.IsSet = false;
     }
     if (OnCameraCaptureDepthChanged != null)
     {
         OnCameraCaptureDepthChanged(CaptureDepth);
     }
 }