Singer Instruments PIXL Client
ActiveErrorChanged Event
Example 



SI.PIXL.Client Namespace > PIXLClient Class : ActiveErrorChanged Event
Occurs when the active error changes.
Syntax
'Declaration
 
Public Event ActiveErrorChanged As EventHandler(Of ActiveError)
'Usage
 
Dim instance As PIXLClient
Dim handler As EventHandler(Of ActiveError)
 
AddHandler instance.ActiveErrorChanged, handler
public event EventHandler<ActiveError> ActiveErrorChanged
public:
event EventHandler<ActiveError>^ ActiveErrorChanged
Event Data

The event handler receives an argument of type ActiveError containing data related to this event. The following ActiveError properties provide information specific to this event.

PropertyDescription
Get the code detailing the error.  
Get a description of the error.  
Get if there is an active error.  
Example
This sample shows how to handle the ActiveErrorChanged event.
// Subscribe to ActiveErrorChanged events.
pixl.ActiveErrorChanged += (sender, error) =>
{
    // Check if there is an error and handle updates accordingly.
    if (!error.HasActiveError)
    {
        // Publish an update to the Console.
        Console.WriteLine("There is no active error.");
    }
    else
    {
        // Publish an update to the Console displaying the error details.
        Console.WriteLine($"Active error has changed: Code: {error.Code}, Description: {error.Description}");
    }
};
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