예제 #1
0
 private void InitCanon()
 {
     try
     {
         if (_framework == null)
         {
             _framework              = new EosFramework();
             _framework.CameraAdded += _framework_CameraAdded;
         }
         AddCanonCameras();
     }
     catch (Exception exception)
     {
         Log.Error("Unable init canon driver", exception);
         /* Give specific guidance if the error is a missing DLL */
         if ((exception.InnerException != null) && (exception.InnerException.Message != null) && (exception.InnerException.Message.Contains("EDSDK.dll")))
         {
             /* one or the other */
             if (Process.GetCurrentProcess().ProcessName.Equals("CameraControl"))
             {
                 MessageBoxResult result = MessageBox.Show("Canon EOS camera library, EDSDK.dll is missing\nInstall it after downloading from Canon's site\n\nDo you want to close this application?\n\n(You can try to continue, but it probably will not not work)", "Critical Error", MessageBoxButton.YesNo, MessageBoxImage.Question);
                 if (result == MessageBoxResult.Yes)
                 {
                     Application.Current.Shutdown();
                 }
             }
             else
             {
                 Console.WriteLine("\n**CRITICAL ERROR**\n\nCanon EOS camera library, EDSDK.dll is missing\nInstall it after downloading from Canon's site\n");
             }
         }
     }
 }
예제 #2
0
 //-----------------------------------------------------------------------------------------
 public void LoadFramework()
 {
     if (_framework == null)
     {
         _framework              = new EosFramework();
         _framework.CameraAdded += this.HandleCameraAdded;
     }
 }
예제 #3
0
 private void InitCanon()
 {
     try
     {
         _framework = new EosFramework();
         AddCanonCameras();
         _framework.CameraAdded += _framework_CameraAdded;
     }
     catch (Exception exception)
     {
         Log.Error("Unable init canon driver", exception);
     }
 }
예제 #4
0
 private void InitCanon()
 {
     try
     {
         if (_framework == null)
         {
             _framework              = new EosFramework();
             _framework.CameraAdded += _framework_CameraAdded;
         }
         AddCanonCameras();
     }
     catch (Exception exception)
     {
         Log.Error("Unable init canon driver", exception);
         /* Give specific guidance if the error is a missing DLL */
         if ((exception.InnerException != null) && (exception.InnerException.Message != null) && (exception.InnerException.Message.Contains("EDSDK.dll")))
         {
             Console.WriteLine("\n**CRITICAL ERROR**\n\nCanon EOS camera library, EDSDK.dll is missing\nInstall it after downloading from Canon's site\n");
         }
     }
 }
예제 #5
0
 public static void Start()
 {
     FFramework = new EosFramework();
     Refresh();
     FFramework.CameraAdded += FFramework_CameraAdded;
 }