Example #1
0
 public static void LoadCamera(CameraSummary summary, int target)
 {
     if (CameraLoadAsked != null)
     {
         CameraLoadAsked(null, new CameraLoadAskedEventArgs(summary, target));
     }
 }
Example #2
0
 public CameraThumbnailProducedEventArgs(CameraSummary summary, Bitmap thumbnail, ImageDescriptor imageDescriptor, bool hadError, bool cancelled)
 {
     this.Summary         = summary;
     this.Thumbnail       = thumbnail;
     this.ImageDescriptor = imageDescriptor;
     this.HadError        = hadError;
     this.Cancelled       = cancelled;
 }
Example #3
0
        public static void UpdatedCameraSummary(CameraSummary summary)
        {
            summary.Manager.UpdatedCameraSummary(summary);

            if (CameraSummaryUpdated != null)
            {
                CameraSummaryUpdated(null, new CameraSummaryUpdatedEventArgs(summary));
            }
        }
Example #4
0
        public static void ForgetCamera(CameraSummary summary)
        {
            summary.Manager.ForgetCamera(summary);

            PreferencesManager.CapturePreferences.RemoveCamera(summary.Identifier);
            PreferencesManager.Save();

            if (CameraForgotten != null)
            {
                CameraForgotten(null, new EventArgs <CameraSummary>(summary));
            }
        }
Example #5
0
        /// <summary>
        /// Find the manager that host this camera.
        /// This is used to match launch settings with already discovered cameras.
        /// </summary>
        public static CameraSummary GetCameraSummary(string alias)
        {
            foreach (CameraManager manager in cameraManagers)
            {
                CameraSummary summary = manager.GetCameraSummary(alias);
                if (summary != null)
                {
                    return(summary);
                }
            }

            return(null);
        }
Example #6
0
 public CameraLoadAskedEventArgs(CameraSummary source, int target)
 {
     this.Source = source;
     this.Target = target;
 }
 /// <summary>
 /// Extract a camera blurb (used for XML persistence) from a camera summary.
 /// </summary>
 public abstract CameraBlurb BlurbFromSummary(CameraSummary summary);
 /// <summary>
 /// Get a single image for thumbnail refresh.
 /// The function is asynchronous and should raise CameraThumbnailProduced when done.
 /// </summary>
 public abstract void GetSingleImage(CameraSummary summary);
 /// <summary>
 /// Invalidate the camera reference from any cache held in the extension.
 /// </summary>
 public abstract void ForgetCamera(CameraSummary summary);
 /// <summary>
 /// Called after the user personalize a camera. Should persist the customized information.
 /// </summary>
 public void UpdatedCameraSummary(CameraSummary summary)
 {
     PreferencesManager.CapturePreferences.AddCamera(BlurbFromSummary(summary));
     PreferencesManager.Save();
 }
 /// <summary>
 /// Returns a small non-translatable text to be displayed in the header line above the image.
 /// </summary>
 public abstract string GetSummaryAsText(CameraSummary summary);
 /// <summary>
 /// Launch a dialog to configure the device. Returns true if the configuration has changed.
 /// This method can be overriden by managers that require disconnecting/reconnecting during the operation.
 /// Default behavior is to call Configure(summary).
 /// </summary>
 public virtual bool Configure(CameraSummary summary, Action disconnect, Action reconnect)
 {
     return(Configure(summary));
 }
 /// <summary>
 /// Launch a dialog to configure the device.
 /// Returns true if the camera needs to be disconnected/reconnected to take the new parameters into account.
 /// </summary>
 public abstract bool Configure(CameraSummary summary);
 /// <summary>
 /// Connect to a camera and return the frame grabbing object.
 /// </summary>
 public abstract ICaptureSource CreateCaptureSource(CameraSummary summary);
Example #15
0
 /// <summary>
 /// Start a function that will retrieve a single image from a particular camera, for thumbnail purposes.
 /// The function should be asynchronous and raise CameraThumbnailProduced event when done.
 /// The event should always be raised, even if the thumbnail could not be retrieved.
 /// </summary>
 public abstract void StartThumbnail(CameraSummary summary);
Example #16
0
 public CameraSummaryUpdatedEventArgs(CameraSummary summary)
 {
     this.Summary = summary;
 }