private void ExtensionDetached(object sender, WiimoteExtensionEventArgs args) { Gtk.Application.Invoke(delegate { GtkAlignment2.Remove(_ExtensionInformation.Widget); _ExtensionInformation = null; }); }
private void ExtensionAttached(object sender, WiimoteExtensionEventArgs args) { Gtk.Application.Invoke(delegate { if (_Wiimote.Extension is NunchukExtension) { _ExtensionInformation = new NunchukInformation((NunchukExtension)_Wiimote.Extension); GtkAlignment2.Add(_ExtensionInformation.Widget); } else if (_Wiimote.Extension is GuitarExtension) { _ExtensionInformation = new GuitarInformation((GuitarExtension)_Wiimote.Extension); GtkAlignment2.Add(_ExtensionInformation.Widget); } else if (_Wiimote.Extension is ClassicControllerExtension) { _ExtensionInformation = new ClassicControllerInformation((ClassicControllerExtension)_Wiimote.Extension); GtkAlignment2.Add(_ExtensionInformation.Widget); } }); }