2001-05-18 17:59:59 -04:00
|
|
|
|
|
|
|
from wxPython.wx import *
|
2002-01-23 20:24:39 -05:00
|
|
|
from Main import opj
|
2001-05-18 17:59:59 -04:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
class TestPanel(wxPanel):
|
|
|
|
def __init__(self, parent):
|
|
|
|
wxPanel.__init__(self, parent, -1)
|
|
|
|
|
2002-03-13 17:26:55 -05:00
|
|
|
b = wxButton(self, -1, "Play Sound 1", (25, 25))
|
|
|
|
EVT_BUTTON(self, b.GetId(), self.OnButton1)
|
2001-05-18 17:59:59 -04:00
|
|
|
|
2002-03-13 17:26:55 -05:00
|
|
|
b = wxButton(self, -1, "Play Sound 2", (25, 65))
|
|
|
|
EVT_BUTTON(self, b.GetId(), self.OnButton2)
|
2001-05-18 17:59:59 -04:00
|
|
|
|
2002-03-13 17:26:55 -05:00
|
|
|
|
|
|
|
def OnButton1(self, evt):
|
|
|
|
try:
|
|
|
|
wave = wxWave(opj('data/anykey.wav'))
|
|
|
|
wave.Play()
|
|
|
|
except NotImplementedError, v:
|
|
|
|
wxMessageBox(str(v), "Exception Message")
|
|
|
|
|
|
|
|
|
|
|
|
def OnButton2(self, evt):
|
2001-05-18 17:59:59 -04:00
|
|
|
try:
|
2002-03-13 17:26:55 -05:00
|
|
|
wave = wxWave(opj('data/plan.wav'))
|
2001-05-18 17:59:59 -04:00
|
|
|
wave.Play()
|
|
|
|
except NotImplementedError, v:
|
|
|
|
wxMessageBox(str(v), "Exception Message")
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
def runTest(frame, nb, log):
|
|
|
|
win = TestPanel(nb)
|
|
|
|
return win
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
overview = """\
|
|
|
|
"""
|