Example #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()
Example #2
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()
Example #3
0
 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()
   if result == YES:
     dlg.Destroy()
     self.core_gui.Destroy()
     sys.exit()
   dlg.Destroy()
Example #4
0
 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()
   if result == YES:
     dlg.Destroy()
     self.core_gui.Destroy()
     sys.exit()
   dlg.Destroy()
Example #5
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)
   self.stop_button = self._Button('Stop', wx.ID_OK)  # TODO: i18n
   self.restart_button = self._Button('Restart', wx.ID_OK)  # TODO: i18n
Example #6
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)
     self.stop_button = self._Button('Stop', wx.ID_OK)  # TODO: i18n
     self.restart_button = self._Button('Restart', wx.ID_OK)  # TODO: i18n
Example #7
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)
Example #8
0
 def _init_components(self, BodyPanel):
   # init gui
   _desc = self.build_spec['program_description']
   self.head_panel = header.FrameHeader(
       heading=i18n.translate("settings_title"),
       subheading=_desc or '',
       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]
Example #9
0
 def _init_components(self, BodyPanel):
     # init gui
     _desc = self.build_spec['program_description']
     self.head_panel = header.FrameHeader(
         heading=i18n.translate("settings_title"),
         subheading=_desc or '',
         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]
Example #10
0
  def OnStartButton(self, widget, event):
    cmd_line_args = self.core_gui.GetOptions()

    _required = self.core_gui.GetRequiredArgs()
    if _required and any(req == '' for req in _required):
      self.ShowDialog(i18n.translate('error_title'), "Must fill in all fields in the Required section!", wx.ICON_ERROR)
      return

    command = '{0} {1}'.format(self.build_spec['target'], cmd_line_args)
    self.core_gui.NextPage()
    self.RunClientCode(command)
Example #11
0
  def OnStartButton(self, widget, event):
    cmd_line_args = self.core_gui.GetOptions()

    if not self.build_spec['manual_start']:
      _required = self.core_gui.GetRequiredArgs()
      if _required and any(req == '' for req in _required):
        self.ShowDialog(i18n.translate('error_title'), "Must fill in all fields in the Required section!", wx.ICON_ERROR)
        return

    command = '{0} {1}'.format(self.build_spec['target'], cmd_line_args)
    self.core_gui.NextPage()
    self.RunClientCode(command)
Example #12
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"))
 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)
Example #14
0
 def _init_components(self):
     self.header_msg = self._bold_static_text(
         i18n.translate('simple_config'))
     self.cmd_textbox = wx.TextCtrl(self, -1, "")
Example #15
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"))
Example #16
0
 def ShowBadFinishedDialog(self, error_msg):
   msg = i18n.translate('uh_oh').format(error_msg)
   self.ShowDialog(i18n.translate('error_title'), msg, wx.ICON_ERROR)
Example #17
0
 def ShowBadFinishedDialog(self, error_msg):
     msg = i18n.translate('uh_oh').format(error_msg)
     self.ShowDialog(i18n.translate('error_title'), msg, wx.ICON_ERROR)
Example #18
0
 def _init_components(self):
   self.header_msg = self._bold_static_text(i18n.translate('simple_config'))
   self.cmd_textbox = wx.TextCtrl(self, -1, "")
Example #19
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()
Example #20
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()
Example #21
0
 def ShowGoodFinishedDialog(self):
     self.ShowDialog(i18n.translate("execution_finished"),
                     i18n.translate('success_message'), wx.ICON_INFORMATION)
Example #22
0
 def ShowGoodFinishedDialog(self):
   self.ShowDialog(i18n.translate("execution_finished"),
                   i18n.translate('success_message'),
                   wx.ICON_INFORMATION)