Ejemplo n.º 1
0
 def register_dialog(self, win=None):
     if win is None:
         return
     Logger.add_debug("Registering window: %s" % win)
     self.windows.append(win)
     if not self.execution_started:
         Logger.add_instruction("Execution of instructions start")
         self.execution_started = True
         wx.CallLater(TIME_TO_WAIT_BEFORE_CONTINUING_IN_MILLISECONDS, self.execute_next_instruction)
Ejemplo n.º 2
0
 def register_dialog(self, win=None):
     if win is None:
         return
     Logger.add_debug("Registering window: %s" % win)
     self.windows.append(win)
     if not self.execution_started:
         Logger.add_instruction("Execution of instructions start")
         self.execution_started = True
         wx.CallLater(TIME_TO_WAIT_BEFORE_CONTINUING_IN_MILLISECONDS,
                      self.execute_next_instruction)
Ejemplo n.º 3
0
 def execute_next_instruction(self):
     try:
         instruction = self._next_instruction()
         instruction._replace_placeholders()
         self._display_instruction_in_popup_window(instruction)
         if isinstance(instruction, AddPlaceholderInstruction):
             delay = 0
         else:
             # TODO: We have some timing problem so we can't set
             #       waiting time to 0. 40 seems to be ok,
             delay = max(40, self.timedelay * 1000)
         Logger.add_debug("Preparing instruction '%s' for execution with delay %d" % (instruction, delay))
         wx.CallLater(delay, self._execute_instruction, instruction)
     except NoMoreInstructionsException:
         Logger.add_instruction("The last instruction has been executed")
Ejemplo n.º 4
0
 def execute_next_instruction(self):
     try:
         instruction = self._next_instruction()
         instruction._replace_placeholders()
         self._display_instruction_in_popup_window(instruction)
         if isinstance(instruction, AddPlaceholderInstruction):
             delay = 0
         else:
             # TODO: We have some timing problem so we can't set
             #       waiting time to 0. 40 seems to be ok,
             delay = max(40, self.timedelay * 1000)
         Logger.add_debug(
             "Preparing instruction '%s' for execution with delay %d" %
             (instruction, delay))
         wx.CallLater(delay, self._execute_instruction, instruction)
     except NoMoreInstructionsException:
         Logger.add_instruction("The last instruction has been executed")
Ejemplo n.º 5
0
 def _execute_instruction(self, instruction):
     Logger.add_instruction(instruction)
     current_window = self._get_current_window()
     instruction.execute(self, current_window)
Ejemplo n.º 6
0
 def _execute_instruction(self, instruction):
     Logger.add_instruction(instruction)
     current_window = self._get_current_window()
     instruction.execute(self, current_window)