Beispiel #1
0
    def OnDownload(self, event):
        self.filename = None
        self.busy = True
        if len(self.servers) == 0:
            rc = Messages.messageChoice(
                "SAP Server configuration not found. Do you want to configure?",
                "Server configuration")
            if rc == wx.ID_YES:
                ConfigWindow.showConfigWindow(self)

        else:
            Download.Show(self)
        self.busy = False
        event.Skip()
Beispiel #2
0
    def OnSyntaxis(self, event):
        if len(self.servers) == 0:
            dlg = wx.MessageDialog(
                None,
                'No se han configurado servidores. Desea configurar ahora?',
                "Configurar servidores", wx.YES_NO | wx.ICON_QUESTION)
            retCode = dlg.ShowModal()
            if (retCode == wx.ID_YES):
                ConfigWindow.showConfigWindow(self)
        else:
            #program = self.t_pr.GetValue()
            if True:
                ix = self.choice2.GetCurrentSelection()

                if ix < 0:
                    Messages.messageError('Seleccione un servidor destino',
                                          'Ejecutar codigo')
                else:

                    code = self.codetext.GetValue()
                    code = code.split('\n')
                    syntax = sap.syntaxCheck(self.servers[ix], code)

                    if syntax != None:
                        self.outtext.SetValue(syntax)
                        self.outtext.SetStyle(
                            0, len(syntax),
                            wx.TextAttr("red", "white", self.f))
                        Messages.messageError(
                            'Error en la syntaxis del codigo fuente',
                            'Verificacion')
                    else:
                        self.outtext.SetValue('')
                        Messages.messageInformation(
                            'No se encontraron errores de syntaxis',
                            'Verificacion')
        event.Skip()
Beispiel #3
0
 def OnConfig(self, event):
     ConfigWindow.showConfigWindow(self)
     event.Skip()