PluggedIn Event

Occurs when and XJLink is attached to the system.

Type: XJLink

Namespace: XJTAG.Integration

Syntax

public static event EventHandler<XJLinkEventArgs> PluggedIn

Example

This example shows how to handle the PluggedIn event, showing a MessageBox displaying the serial number of the XJLink that has been plugged in.

class Program
{
    void InitialiseSystem()
    {
        // Subscribe to the PluggedIn event.
        XJLink.PluggedIn += XJLink_PluggedIn;
    }

    void XJLink_PluggedIn(object sender, XJLinkEventArgs e)
    {
        // Use the given XJLinkEventArgs object to find the serial number of the XJLink that
        // has been plugged in and then display a message in a MessageBox.
        var newLinkMessage = String.Format("XJLink {0} has been plugged in", e.SerialNumber);
        MessageBox.Show(newLinkMessage, "New XJLink Found", MessageBoxButtons.OK, MessageBoxIcon.Information);
    }
}