Singer Instruments PIXL Client
OperationalStatusChanged Event
Example 



SI.PIXL.Client Namespace > PIXLClient Class : OperationalStatusChanged Event
Occurs when the PIXLClient.OperationalStatus property changes.
Syntax
'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.

PropertyDescription
Get the name of the command that is pending, running, or was last run.  
Get the status of the command that is pending, running, or was last run.  
Get the estimated remaining time before the command that is pending, running, or was last run completes.  
Get the progress of the command that is pending, running, or was last run, as a normalised value.  
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