Пример #1
0
    def on_stop_tool_clicked(self, event):
        paused = ciclop_scan._inactive
        ciclop_scan.pause()
        dlg = wx.MessageDialog(self,
                               _("Your current scanning will be stopped.\n"
                                 "Are you sure you want to stop?"),
                               _("Stop scanning"), wx.YES_NO | wx.ICON_QUESTION)
        result = dlg.ShowModal() == wx.ID_YES
        dlg.Destroy()

        if result:
            self.scanning = False
            ciclop_scan.stop()
            # Flush video
            image_capture.capture_texture()
            image_capture.capture_texture()
            image_capture.capture_texture()
            self.on_scan_finished()
        else:
            if not paused:
                ciclop_scan.resume()
Пример #2
0
 def on_pause_tool_clicked(self, event):
     self._enable_tool_scan(self.play_tool, True)
     self._enable_tool_scan(self.pause_tool, False)
     ciclop_scan.pause()