WPKG-GP-Client.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:wpkg-gp-client 作者: sonicnkt 项目源码 文件源码
def OnStartButton(self, e):
        if wpkg_running():
            dlg_msg = _(u"WPKG is currently running,\n"
                        u"please wait a few seconds and try again.")
            dlg = wx.MessageDialog(self, dlg_msg, app_name, wx.OK | wx.ICON_EXCLAMATION)
            dlg.ShowModal()
            dlg.Destroy()
            return
        dlg_title = _(u"2. Warning")
        dlg_msg = _(u"Close all open programs!\n\nThe System could restart without further confirmation!\n\n" \
                    u"Continue?")
        dlg = wx.MessageDialog(self, dlg_msg, dlg_title, wx.YES_NO|wx.YES_DEFAULT|wx.ICON_EXCLAMATION)
        if dlg.ShowModal() == wx.ID_YES:
            dlg.Destroy()
            # Disable/enable buttons and disable Close Window option!
            self.startButton.Disable()
            self.abortButton.Enable()
            self.EnableCloseButton(enable=False)
            # Set Start Time
            self.wpkg_start_time = datetime.datetime.now()
            # Reset Log
            self.log = None
            startWorker(self.LongTaskDone, self.LongTask)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号