コード例 #1
0
 def PageOne():
   self._header.SetLabel(i18n.translate("running_title"))
   self._subheader.SetLabel(i18n.translate('running_msg'))
   self._check_mark.Hide()
   self._settings_img.Hide()
   self._running_img.Show()
   self.Layout()
コード例 #2
0
ファイル: controller.py プロジェクト: anthrax3/Gooey
 def OnCancelButton(self, widget, event):
     msg = i18n.translate('sure_you_want_to_exit')
     dlg = wx.MessageDialog(None, msg, i18n.translate('close_program'),
                            wx.YES_NO)
     result = dlg.ShowModal()
     print result
     if result == YES:
         dlg.Destroy()
         self._base.Destroy()
         sys.exit()
     dlg.Destroy()
コード例 #3
0
 def _init_components(self):
     '''
 initialize all of the gui used in the footer
 TODO:
   Add Checkmark image for when the program has finished running.
   Refactor image tools into their own module. The resize code is
   getting spread around a bit.
 '''
     self.cancel_button = self._Button(i18n.translate('cancel'),
                                       wx.ID_CANCEL)
     self.start_button = self._Button(i18n.translate('start'), wx.ID_OK)
     self.running_animation = wx.animate.GIFAnimationCtrl(
         self, -1, image_repository.loader)
     self.close_button = self._Button(i18n.translate("close"), wx.ID_OK)
コード例 #4
0
 def _init_components(self):
     self.text = wx.StaticText(self, label=i18n.translate("status"))
     self.cmd_textbox = wx.TextCtrl(self,
                                    -1,
                                    "",
                                    style=wx.TE_MULTILINE | wx.TE_READONLY
                                    | wx.TE_RICH)
コード例 #5
0
ファイル: controller.py プロジェクト: anthrax3/Gooey
 def OnStartButton(self, widget, event):
     cmd_line_args = self._base.GetOptions()
     if not self._client_app.IsValidArgString(cmd_line_args):
         error_msg = self._client_app.GetErrorMsg(cmd_line_args)
         self.ShowDialog(i18n.translate('error_title'), error_msg,
                         wx.ICON_ERROR)
         return
     self._client_app.AddToArgv(cmd_line_args)
     self._base.NextPage()
     self._payload_runner.start()
コード例 #6
0
ファイル: base_window.py プロジェクト: anthrax3/Gooey
 def _init_components(self, BodyPanel):
     # init gui
     self.head_panel = header.FrameHeader(
         heading=i18n.translate("settings_title"),
         subheading=self._client_app.description,
         parent=self)
     self.config_panel = BodyPanel(self)
     self.runtime_display = RuntimeDisplay(self)
     self.foot_panel = footer.Footer(self, self._controller)
     self.panels = [self.head_panel, self.config_panel, self.foot_panel]
コード例 #7
0
 def OnStartButton(self, widget, event):
     if len(sys.argv) < 2:
         cmd_line_args = self._base.GetOptions()
         if not self._client_app.IsValidArgString(cmd_line_args):
             error_msg = self._client_app.GetErrorMsg(cmd_line_args)
             self.ShowDialog(i18n.translate('error_title'), error_msg,
                             wx.ICON_ERROR)
             return
         self._client_app.AddToArgv(cmd_line_args)
     self._base.NextPage()
     Process(target=self.RunClientCode).start()
コード例 #8
0
 def PageTwo():
   self._header.SetLabel(i18n.translate('finished_title'))
   self._subheader.SetLabel(i18n.translate('finished_msg'))
   self._running_img.Hide()
   self._check_mark.Show()
   self.Layout()
コード例 #9
0
 def _init_components(self):
     self._msg_req_args = (styling.H1(self,
                                      i18n.translate("required_args_msg"))
                           if self._positionals else None)
     self._msg_opt_args = styling.H1(self,
                                     i18n.translate("optional_args_msg"))
コード例 #10
0
ファイル: controller.py プロジェクト: anthrax3/Gooey
 def ShowBadFinishedDialog(self, error_msg):
     msg = i18n.translate('uh_oh').format(error_msg)
     self.ShowDialog(i18n.translate('error_title'), msg, wx.ICON_ERROR)
コード例 #11
0
ファイル: controller.py プロジェクト: anthrax3/Gooey
 def ShowGoodFinishedDialog(self):
     self.ShowDialog(i18n.translate("execution_finished"),
                     i18n.translate('success_message'), wx.ICON_INFORMATION)
コード例 #12
0
 def _init_components(self):
     self.header_msg = self._bold_static_text(
         i18n.translate('simple_config'))
     self.cmd_textbox = wx.TextCtrl(self, -1, "")