Table of Contents

Class StopEventArgs

Namespace
VisioForge.Core.Types.Events
Assembly
VisioForge.Core.dll

Provides data for events that indicate a media operation has stopped. This class encapsulates information about the success of the operation and the final position reached.

public class StopEventArgs : EventArgs

Inheritance

Inherited Members

Remarks

This event argument is typically used to signal the completion or interruption of playback, recording, or other media processing tasks. It allows the application to react to the stopping event, check its success, and determine the last known position. The Successful property indicates whether the operation completed normally (true) or was interrupted by an error (false). Position property provides the final media position, useful for resuming playback or determining how much content was processed. In Video Edit SDK context, Successful indicates if conversion or processing finished without errors. In Media Player SDK context, Position indicates the last played position before stopping. Stop events can be triggered by user actions (stop button), completion (end of file), or errors (format issues, missing codecs). Applications should perform cleanup operations in response to stop events, such as releasing resources or resetting UI state. For failed operations (Successful=false), check error events for detailed failure information. Stop events are typically raised on the main thread but verify thread context before updating UI elements. Consider saving Position for resume functionality in media players or progress tracking in editors.

Constructors

StopEventArgs(bool, TimeSpan)

Initializes a new instance of the VisioForge.Core.Types.Events.StopEventArgs class with success status and position.

public StopEventArgs(bool successful, TimeSpan position)

Parameters

successful bool

A boolean indicating if the operation was successful.

position TimeSpan

The TimeSpan representing the position when the operation stopped.

StopEventArgs(bool)

Initializes a new instance of the VisioForge.Core.Types.Events.StopEventArgs class with only the success status. The VisioForge.Core.Types.Events.StopEventArgs.Position will be initialized to Zero.

public StopEventArgs(bool successful)

Parameters

successful bool

A boolean indicating if the operation was successful.

StopEventArgs(TimeSpan)

Initializes a new instance of the VisioForge.Core.Types.Events.StopEventArgs class with only the current position. The VisioForge.Core.Types.Events.StopEventArgs.Successful status will be set to true by default.

public StopEventArgs(TimeSpan position)

Parameters

position TimeSpan

The TimeSpan representing the position when the operation stopped.

StopEventArgs()

Initializes a new instance of the VisioForge.Core.Types.Events.StopEventArgs class with default values. VisioForge.Core.Types.Events.StopEventArgs.Successful is true and VisioForge.Core.Types.Events.StopEventArgs.Position is Zero.

public StopEventArgs()

Properties

Position

Gets the current position in the media stream when the operation stopped. This is typically used in the context of the Media Player SDK to indicate the last played position.

public TimeSpan Position { get; }

Property Value

TimeSpan

Successful

Gets a value indicating whether the media operation completed successfully. This is often used in the context of the Video Edit SDK to indicate if a conversion or processing task finished without errors.

public bool Successful { get; }

Property Value

bool