void Controller_ReceiverChange(object sender, XBox360ControllerChangeEventArgs e) { currentReceiver = e.XBox360Controller; if (currentReceiver[0] == "65535") controllerText(previousReceiver); else { previousReceiver = currentReceiver; controllerText(currentReceiver); } }
private void ChangeXBox360Controller(string[] XBox360Controller) { XBox360ControllerChangeEventArgs XBox360ControllerEvents = new XBox360ControllerChangeEventArgs(XBox360Controller); // Now, raise the event by invoking the delegate. Pass in // the objects that initiated the event (this) as wel as // XBox360ControllerChangeEventArgs. // The call must match the signature of the XBox360ControllerChangeEventHandler. if (XBox360ControllerChange != null) { XBox360ControllerChange(this, XBox360ControllerEvents); } }
void Controller_ReceiverChange(object sender, XBox360ControllerChangeEventArgs e) { XBox360ControllerText(e.XBox360Controller); }