コード例 #1
0
ファイル: animators.py プロジェクト: likaiwen123/VERAview
    def Run(self,
            file_path,
            frame_delay=aob.DEFAULT_frameDelay,
            show_selections=aob.DEFAULT_showSelections):
        """Must be called from the UI event thread.
Creates a worker thread with the _RunBegin() and _Runend() methods.
    Args:
        file_path (str): path to GIF file to create
	frame_delay (float): delay in seconds b/w frames
	show_selections (bool): toggle
"""

        if Config.IsWindows():
            dialog = wx.GenericProgressDialog(
                'Save Animated Image',
                'Initializing...',
                style=wx.PD_APP_MODAL | wx.PD_AUTO_HIDE | wx.PD_CAN_ABORT)
        else:
            dialog = wx.ProgressDialog('Save Animated Image',
                                       'Initializing...',
                                       style=wx.PD_APP_MODAL | wx.PD_AUTO_HIDE
                                       | wx.PD_CAN_ABORT)
        dialog.Show()

        wxlibdr.startWorker(
            self._RunEnd,
            self._RunBackground,
            wargs=[dialog, file_path, frame_delay, show_selections])