Interface IScreenshotManager
An interface for the screenshot manager.
Namespace: Phoenix.MediaCapture.Screenshot
Assembly: Phoenix.Abstractions.MediaCapture.dll
Syntax
public interface IScreenshotManager
Properties
View SourceIsAutomaticRefreshActive
Gets a value indicating whether or not screenshots are automatically refreshed.
Declaration
bool IsAutomaticRefreshActive { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
View SourceAddAutomaticRefreshViewer(Object)
Adds a view of automatically refreshed screenshots.
Declaration
void AddAutomaticRefreshViewer(object view)
Parameters
Type | Name | Description |
---|---|---|
System.Object | view | The view. |
Remarks
If this is the first view, automatic refreshing will be enabled.
GetLatestScreenshotAsync(IDevice)
Gets the latest screenshot. If not screenshot has been taken yet, it will create one.
Declaration
Task<DeviceScreenshot> GetLatestScreenshotAsync(IDevice device)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device to grab a cached screenshot from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DeviceScreenshot> | A BitmapSource representing the screenshot. |
GetRefreshInterval(IDevice)
Gets the refresh interval for a single device.
Declaration
ScreenshotRefreshInterval GetRefreshInterval(IDevice device)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device whose interval is to be returned. |
Returns
Type | Description |
---|---|
ScreenshotRefreshInterval | The interval for the device |
RemoveAutomaticRefreshViewer(Object)
Deletes a view of automatically refreshed screenshots.
Declaration
void RemoveAutomaticRefreshViewer(object view)
Parameters
Type | Name | Description |
---|---|---|
System.Object | view | The view. |
Remarks
If this is the only remaining view, automatic refreshing will be disabled.
SetCaptureParameters(IDevice, Object[])
Sets the capture parameters for a specific device.
Declaration
void SetCaptureParameters(IDevice device, params object[] captureParameters)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device to set the capture parameters for. |
System.Object[] | captureParameters | The capture parameters. |
SetGlobalRefreshInterval(ScreenshotRefreshInterval)
Sets the global refresh interval that all devices will use when not overridden.
Declaration
void SetGlobalRefreshInterval(ScreenshotRefreshInterval interval)
Parameters
Type | Name | Description |
---|---|---|
ScreenshotRefreshInterval | interval | The interval to set the global interval to. |
SetRefreshInterval(IDevice, ScreenshotRefreshInterval)
Sets a specific device to a specific interval.
Declaration
void SetRefreshInterval(IDevice device, ScreenshotRefreshInterval interval)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device for which the interval is set. |
ScreenshotRefreshInterval | interval | The interval to set the device to. |
TakeScreenshotAsync(IDevice, Int32)
Takes a screenshot.
Declaration
Task<DeviceScreenshot> TakeScreenshotAsync(IDevice device, int age)
Parameters
Type | Name | Description |
---|---|---|
IDevice | device | The device to call for to capture the screenshot. It must implement the IDeviceScreenshot interface. |
System.Int32 | age | The age in milliseconds used to determine if a new screenshot should be taken or a cached screenshot returned. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<DeviceScreenshot> | A BitmapSource representing the screenshot. |
Remarks
If the age is less than 100 milliseconds, this will clamp it to 100 milliseconds to prevent multiple calls within a small time frame.