Show / Hide Table of Contents

Class ScreenshotManager

Manager for Screenshots.

Inheritance
System.Object
ScreenshotManager
Implements
IScreenshotManager
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Screenshot
Assembly: Phoenix.Plugin.Screenshot.dll
Syntax
public class ScreenshotManager : IScreenshotManager

Constructors

View Source

ScreenshotManager(IEventAggregator, IPhoenixLogger, IDeviceManager, ISettingsManager)

Initializes a new instance of the ScreenshotManager class.

Declaration
public ScreenshotManager(IEventAggregator eventAggregator, IPhoenixLogger logger, IDeviceManager deviceManager, ISettingsManager settingsManager)
Parameters
Type Name Description
IEventAggregator eventAggregator

The event aggregator for the application.

IPhoenixLogger logger

The logger for the application.

IDeviceManager deviceManager

Used to get any devices already created.

ISettingsManager settingsManager

The manager to get settings from.

Properties

View Source

GlobalRefreshInterval

Gets the global refresh interval.

Declaration
public ScreenshotRefreshInterval GlobalRefreshInterval { get; }
Property Value
Type Description
ScreenshotRefreshInterval
View Source

IsAutomaticRefreshActive

Gets a value indicating whether or not screenshots are automatically refreshed.

Declaration
public bool IsAutomaticRefreshActive { get; }
Property Value
Type Description
System.Boolean
View Source

UseSelectedDevices

Gets or sets a value indicating whether or not the global refresh uses only the selected devices.

Declaration
public bool UseSelectedDevices { get; set; }
Property Value
Type Description
System.Boolean

Methods

View Source

AddAutomaticRefreshViewer(Object)

Adds a view of automatically refreshed screenshots.

Declaration
public 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.

View Source

GetLatestScreenshotAsync(IDevice)

Gets the latest screenshot regardless of age. If none is found, it takes a screenshot.

Declaration
public async Task<DeviceScreenshot> GetLatestScreenshotAsync(IDevice device)
Parameters
Type Name Description
IDevice device

The screenshot device.

Returns
Type Description
System.Threading.Tasks.Task<DeviceScreenshot>

The screenshot.

View Source

GetRefreshInterval(IDevice)

Gets the refresh interval for a single device.

Declaration
public 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

View Source

RemoveAutomaticRefreshViewer(Object)

Deletes a view of automatically refreshed screenshots.

Declaration
public 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.

View Source

SetCaptureParameters(IDevice, Object[])

Sets the capture parameters for a specific device.

Declaration
public 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.

View Source

SetGlobalRefreshInterval(ScreenshotRefreshInterval)

Sets the global refresh interval that all devices will use when not overridden.

Declaration
public void SetGlobalRefreshInterval(ScreenshotRefreshInterval interval)
Parameters
Type Name Description
ScreenshotRefreshInterval interval

The interval to set the global interval to.

View Source

SetRefreshInterval(IDevice, ScreenshotRefreshInterval)

Sets the refresh interval for a single device.

Declaration
public void SetRefreshInterval(IDevice device, ScreenshotRefreshInterval interval)
Parameters
Type Name Description
IDevice device

The device whose interval is to be set.

ScreenshotRefreshInterval interval

The new interval.

View Source

TakeScreenshotAsync(IDevice, Int32)

Takes a screenshot.

Declaration
public async Task<DeviceScreenshot> TakeScreenshotAsync(IDevice device, int age)
Parameters
Type Name Description
IDevice device

The device to take the screenshot.

System.Int32 age

Max age of the screenshot taken by the device in milliseconds.

Returns
Type Description
System.Threading.Tasks.Task<DeviceScreenshot>

The screenshot.

Remarks

Clamps to 100 milliseconds if age is less than 100 milliseconds. If the screenshot age older than this parameter, it will take a new screenshot. Otherwise it will ignore this parameter and get a recently taken screenshot or take a new one.

Implements

IScreenshotManager
  • View Source
In This Article
Back to top Generated by DocFX