ButtonPressed Event

Occurs when the button on an XJLink2 has been pressed.

Type: XJLink

Namespace: XJTAG.Integration

Syntax

public event EventHandler<XJLinkEventArgs> ButtonPressed

Example

This example shows how to handle the ButtonPressed event and start testing when the button on the XJLink2 is pressed.

class Program
{
    TestCollection testsToRun;
    XJLink xjlink2;
    Runner runner;

    void InitialiseSystem()
    {
        /*
         * Code initialising RunnerProject here
         */

        // Get connected XJLink
        xjlink2 = XJLink.GetXJLink();

        // Subscribe to the ButtonPressed event.
        xjlink2.ButtonPressed += XJLink_ButtonPressed;

        runner = project.GetRunner(xjlink2);
    }

    void XJLink_ButtonPressed(object sender, XJLinkEventArgs e)
    {
        // Start testing when the button is pressed.
        runner.StartTesting(testsToRun);
    }
}