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)
评论列表
文章目录