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