tests/wiimote/wxglade_hmi@wxglade_hmi/pyfile.xml
changeset 1157 72d14a74c643
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/wiimote/wxglade_hmi@wxglade_hmi/pyfile.xml	Thu May 16 17:40:32 2013 +0900
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<PyFile>
+  <variables/>
+  <globals>
+<![CDATA[
+from threading import Thread
+
+def OnConnectButton(self, event):
+  def OnWiiConnected(mac_addr):
+    self.label_2.SetLabel(
+      "Wiimote %s connected"%mac_addr 
+      if mac_addr else 
+      "Wiimote connection failed !")
+
+  def WiiConnected(mac_addr):
+    wx.CallAfter(OnWiiConnected,mac_addr)
+
+  Thread(target = Connect_Wiimote, args = (WiiConnected,)).start()
+  self.label_2.SetLabel("Press wiimote 1+2")
+  event.Skip()
+
+def OnDisconnectButton(self, event):
+  Disconnect_Wiimote()
+  self.label_2.SetLabel("Wiimote disconnected")
+  event.Skip()
+
+]]>
+  </globals>
+  <init>
+<![CDATA[
+]]>
+  </init>
+  <cleanup>
+<![CDATA[
+]]>
+  </cleanup>
+  <start>
+<![CDATA[
+]]>
+  </start>
+  <stop>
+<![CDATA[
+]]>
+  </stop>
+</PyFile>