Unplugged Event
Syntax
public static event EventHandler<XJLinkEventArgs> Unplugged
Example
This example shows how to handle the Unplugged event, showing a MessageBox displaying the serial number of the XJLink that has been unplugged.
class Program { void InitialiseSystem() { // Subscribe to the PluggedIn event. XJLink.Unplugged += XJLink_Unplugged; } void XJLink_Unplugged(object sender, XJLinkEventArgs e) { // Use the given XJLinkEventArgs object to find the serial number of the XJLink that // has been unplugged 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); } }
XJTAG v4.2.5
