Exemplo n.º 1
0
 def play_record(self):
     # assumption: in record tab
     if not self.record:
         self.record = Record.load()
     cm.waiter.record = self.record
     cm.waiter.add_job('start_playing')
     self.on_start_playing_record()
Exemplo n.º 2
0
 def on_open(self):
     dialog = wx.FileDialog(self,
                            message="Select a record",
                            defaultDir=Record.directory,
                            defaultFile=Record.autosave_filename,
                            wildcard="*" + Record.extension)
     if dialog.ShowModal() == wx.ID_OK:
         filename = dialog.GetFilename()
         directory = dialog.GetDirectory()
         self.set_record(
             Record.load(op.join(directory, filename), filename=filename))
Exemplo n.º 3
0
 def on_open_last(self):
     if op.exists(Record.autosave_path):
         self.set_record(Record.load())
     else:
         print("There is no last record")
Exemplo n.º 4
0
 def open_last_record(self):
     # TODO: in separate thread
     self.record = Record.load()
     print("last record loaded")
Exemplo n.º 5
0
 def stop(self):
     self._stop()
     self.callback(Record(actions=self.actions))
     print("recorder ended.")
Exemplo n.º 6
0
 def open_last_record(self):
     if op.exists(Record.autosave_path):
         self.record = Record.load()
     else:
         print("There is no autosaved record!")
Exemplo n.º 7
0
 def open_callback(path):
     record = Record.load(path=path)
     dialog.dismiss()
     self.record = record