예제 #1
0
파일: CameraWindow.cs 프로젝트: tdhieu/iSpy
 private void SetVideoSourceProperty(VideoCaptureDevice device, VideoProcAmpProperty prop, string n)
 {
     try
     {
         int v;
         if (Int32.TryParse(Nv(Camobject.settings.procAmpConfig, n), out v))
         {
             if (v > Int32.MinValue)
             {
                 int fv;
                 if (Int32.TryParse(Nv(Camobject.settings.procAmpConfig, "f" + n), out fv))
                 {
                     device.SetProperty(prop, v, (VideoProcAmpFlags)fv);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         ErrorHandler?.Invoke(ex.Message);
     }
 }