'Declaration
Public Event OperationalStatusChanged As EventHandler(Of OperationalStatus)
'Usage
Dim instance As PIXLClient Dim handler As EventHandler(Of OperationalStatus) AddHandler instance.OperationalStatusChanged, handler
public event EventHandler<OperationalStatus> OperationalStatusChanged
public: event EventHandler<OperationalStatus>^ OperationalStatusChanged
Event Data
The event handler receives an argument of type OperationalStatus containing data related to this event. The following OperationalStatus properties provide information specific to this event.
Property | Description |
---|---|
CommandName | Get the name of the command that is pending, running, or was last run. |
CommandStatus | Get the status of the command that is pending, running, or was last run. |
EstimatedRemainingTime | Get the estimated remaining time before the command that is pending, running, or was last run completes. |
Progress | Get the progress of the command that is pending, running, or was last run, as a normalised value. |
ProgressAsPercentage | Get the progress of the command that is pending, running, or was last run, as a percentage. |
Example
This sample shows how to handle the OperationalStatusChanged event.
// Subscribe to OperationalStatusChanged events. pixl.OperationalStatusChanged += (sender, status) => { // Publish an update to the Console. Console.WriteLine($"Current running command is {pixl.OperationalStatus.ProgressAsPercentage}% complete, and has an estimated {pixl.OperationalStatus.EstimatedRemainingTime} remaining."); };
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also