C# Class Capture.Interface.CaptureInterface

Inheritance: System.MarshalByRefObject
Mostrar archivo Open project: remcoros/Direct3DCapture Class Usage Examples

Public Methods

Method Description
BeginGetScreenshot ( Rectangle region, System.TimeSpan timeout, AsyncCallback callback = null ) : IAsyncResult
Disconnect ( ) : void

Tell the client process to disconnect

DisplayInGameText ( string text ) : void

Display text in-game for the default duration of 5 seconds

DisplayInGameText ( string text, System.TimeSpan duration ) : void

EndGetScreenshot ( IAsyncResult result ) : Screenshot
GetScreenshot ( ) : Screenshot

Get a fullscreen screenshot with the default timeout of 2 seconds

GetScreenshot ( Rectangle region, System.TimeSpan timeout ) : Screenshot

Get a screenshot of the specified region

Message ( MessageType messageType, string format ) : void

Send a message to all handlers of CaptureInterface.RemoteMessage.

Ping ( ) : void

Used

SendScreenshotResponse ( Screenshot screenshot ) : void
StartRecording ( Capture.Interface.CaptureConfig config ) : void

If not IsRecording will invoke the RecordingStarted event, starting a new recording.

Handlers in the server and remote process will be be invoked.

StopRecording ( ) : void

If IsRecording, will invoke the RecordingStopped event, finalising any existing recording.

Handlers in the server and remote process will be be invoked.

Private Methods

Method Description
SafeInvokeDisconnected ( ) : void
SafeInvokeDisplayText ( Capture.Interface.DisplayTextEventArgs displayTextEventArgs ) : void
SafeInvokeMessageRecevied ( Capture.Interface.MessageReceivedEventArgs eventArgs ) : void
SafeInvokeRecordingStarted ( Capture.Interface.CaptureConfig config ) : void
SafeInvokeRecordingStopped ( ) : void
SafeInvokeScreenshotReceived ( Capture.Interface.ScreenshotReceivedEventArgs eventArgs ) : void
SafeInvokeScreenshotRequested ( Capture.Interface.ScreenshotRequest eventArgs ) : void

Method Details

BeginGetScreenshot() public method

public BeginGetScreenshot ( Rectangle region, System.TimeSpan timeout, AsyncCallback callback = null ) : IAsyncResult
region System.Drawing.Rectangle
timeout System.TimeSpan
callback AsyncCallback
return IAsyncResult

Disconnect() public method

Tell the client process to disconnect
public Disconnect ( ) : void
return void

DisplayInGameText() public method

Display text in-game for the default duration of 5 seconds
public DisplayInGameText ( string text ) : void
text string
return void

DisplayInGameText() public method

public DisplayInGameText ( string text, System.TimeSpan duration ) : void
text string
duration System.TimeSpan
return void

EndGetScreenshot() public method

public EndGetScreenshot ( IAsyncResult result ) : Screenshot
result IAsyncResult
return Screenshot

GetScreenshot() public method

Get a fullscreen screenshot with the default timeout of 2 seconds
public GetScreenshot ( ) : Screenshot
return Screenshot

GetScreenshot() public method

Get a screenshot of the specified region
public GetScreenshot ( Rectangle region, System.TimeSpan timeout ) : Screenshot
region System.Drawing.Rectangle the region to capture (x=0,y=0 is top left corner)
timeout System.TimeSpan maximum time to wait for the screenshot
return Screenshot

Message() public method

Send a message to all handlers of CaptureInterface.RemoteMessage.
public Message ( MessageType messageType, string format ) : void
messageType MessageType
format string
return void

Ping() public method

Used
public Ping ( ) : void
return void

SendScreenshotResponse() public method

public SendScreenshotResponse ( Screenshot screenshot ) : void
screenshot Screenshot
return void

StartRecording() public method

If not IsRecording will invoke the RecordingStarted event, starting a new recording.
Handlers in the server and remote process will be be invoked.
public StartRecording ( Capture.Interface.CaptureConfig config ) : void
config Capture.Interface.CaptureConfig The configuration for the recording
return void

StopRecording() public method

If IsRecording, will invoke the RecordingStopped event, finalising any existing recording.
Handlers in the server and remote process will be be invoked.
public StopRecording ( ) : void
return void