예제 #1
0
 private void ExtensionDetached(object sender, WiimoteExtensionEventArgs args)
 {
     Gtk.Application.Invoke(delegate
     {
         GtkAlignment2.Remove(_ExtensionInformation.Widget);
         _ExtensionInformation = null;
     });
 }
예제 #2
0
 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);
         }
     });
 }