public static void LoadCamera(CameraSummary summary, int target) { if (CameraLoadAsked != null) { CameraLoadAsked(null, new CameraLoadAskedEventArgs(summary, target)); } }
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; }
public static void UpdatedCameraSummary(CameraSummary summary) { summary.Manager.UpdatedCameraSummary(summary); if (CameraSummaryUpdated != null) { CameraSummaryUpdated(null, new CameraSummaryUpdatedEventArgs(summary)); } }
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)); } }
/// <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); }
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);
/// <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);
public CameraSummaryUpdatedEventArgs(CameraSummary summary) { this.Summary = summary; }