Exemple #1
0
    def __init__(self, parent, id, title):
        self.parent = parent
        wx.Frame.__init__(
            self,
            parent,
            id,
            title,
            style=wx.DEFAULT_FRAME_STYLE
            & ~(wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MINIMIZE_BOX),
            size=(250, 190))
        panel = wx.Panel(self, -1)

        self.CreateStatusBar()
        toolbar = self.CreateToolBar()
        toolbar = Toolbars.getToolbar(self, toolbar, 'downloadwindow')
        toolbar.Realize()
        self.fields = []
        self.servers = db.getServers()

        servers = []
        for server in self.servers:
            servers.append(server[0])

        wx.StaticText(panel, -1, "SAP Server: ", pos=(20, 55))
        self.choice = wx.Choice(panel, -1, pos=(120, 50), choices=servers)

        y = 20

        y = Utils.createField(self, panel, 'Program name:', 100, y)
Exemple #2
0
    def __init__(self, parent, id, title):
        self.parent = parent
        wx.Frame.__init__(
            self,
            parent,
            id,
            title,
            style=wx.DEFAULT_FRAME_STYLE
            & ~(wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MINIMIZE_BOX),
            size=(250, 190))

        panel = wx.Panel(self, -1)

        self.CreateStatusBar()
        toolbar = self.CreateToolBar()
        toolbar = Toolbars.getToolbar(self, toolbar, 'selectserver')
        toolbar.Realize()
        self.servers = db.getServers()

        servers = []
        for server in self.servers:
            servers.append(server[0])

        wx.StaticText(panel, -1, "SAP Server: ", pos=(20, 25))
        self.choice = wx.Choice(panel, -1, pos=(120, 20), choices=servers)
Exemple #3
0
    def __init__(self, parent, id, title):
        #wx.Frame.__init__(self, parent, id, title, style= wx.MINIMIZE_BOX | wx.CLOSE_BOX, size=(600,300))
        wx.Frame.__init__(self, parent, id, title,   style = wx.DEFAULT_FRAME_STYLE , size=(600,300) )
        #wx.Dialog.__init__(self, parent, id, title)
        self.list = None
        
        panel1 = wx.Panel(self, -1)        
        #self.add_new = wx.BitmapButton(self, -1, wx.Bitmap(INSTALL_PATH + 'new.png'), pos=(4,10))
        #self.modify = wx.BitmapButton(self, -1, wx.Bitmap(INSTALL_PATH + 'modify.png'), pos=(4,40))
        #self.delete = wx.BitmapButton(self, -1, wx.Bitmap(INSTALL_PATH + 'delete.png'), pos=(4,70))
        #self.refresh = wx.BitmapButton(self, -1, wx.Bitmap(INSTALL_PATH + 'refresh.png'), pos=(4,100))
        
        #self.Bind(wx.EVT_BUTTON, self.OnNew, self.add_new)
        #self.Bind(wx.EVT_BUTTON, self.OnModify, self.modify)
        #self.Bind(wx.EVT_BUTTON, self.OnDelete, self.delete)
        #self.Bind(wx.EVT_BUTTON, self.OnrE, self.add_new)

        #panel2 = wx.Panel(self, -1)
        self.CreateStatusBar()
        toolbar = self.CreateToolBar()
        toolbar = Toolbars.getToolbar(self, toolbar, 'configwindow')
        toolbar.Realize()
        
        servers = db.getServers()
        
        cols = ['ID', 'Nombre', 'Direccion Ip', 'SYSNR', 'MANDT', 'USER']
        n_col = len(cols)
        
        self.totalservers = len(db.getServers())
        
        if True:
        #if self.totalservers > 0:
            self.list = wx.ListCtrl(self, -1, size=(600,300), pos = (30, 0), style=wx.LC_REPORT)
            self.list.Show()     
            
            for x in range(n_col): #columnas
                self.list.InsertColumn(x, cols[x])
                
            
            for server in servers: #
                y = 0
                for item in server:
                    if y == 0:
                        pos = self.list.InsertStringItem(y, item)
                    else:
                        self.list.SetStringItem(pos, y, item)                    
                    y +=1
         
        if self.list != None:
            self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnItemSelected, self.list)
            self.Bind(wx.EVT_LIST_ITEM_DESELECTED, self.OnItemDeselected, self.list)
        
        box = wx.BoxSizer(wx.VERTICAL)
        box.Add(panel1, 1, wx.EXPAND | wx.ALL)
Exemple #4
0
    def __init__(self, parent, id, title):
        self.parent = parent
        wx.Frame.__init__(self, parent, id, title, style=wx.DEFAULT_FRAME_STYLE & ~ ( wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MINIMIZE_BOX ) , size=(250, 190) )
        
        panel = wx.Panel(self, -1)

        self.CreateStatusBar()
        toolbar = self.CreateToolBar()
        toolbar = Toolbars.getToolbar(self, toolbar, 'selectserver')   
        toolbar.Realize()
        self.servers = db.getServers()        

        servers = []
        for server in self.servers:
            servers.append(server[0])

        wx.StaticText(panel, -1, "SAP Server: ", pos=(20, 25))
        self.choice = wx.Choice(panel, -1, pos=(120, 20), choices=servers )
 def __init__(self, parent, id, title):
     wx.Frame.__init__(self, parent, id, title, size=(300,300))
     #wx.Dialog.__init__(self, parent, id, title)
     
     panel_left = wx.Panel(self, -1)
     self.CreateStatusBar()
     toolbar = self.CreateToolBar()
     toolbar = Toolbars.getToolbar(self, toolbar, 'newconfigwindow')
     toolbar.Realize()
     
     y = 20
     
     y = Utils.createField(self, panel_left, 'ID:', 32, y)
     
     y = Utils.createField(self, panel_left, 'Nombre:', 100, y)
     y = Utils.createField(self, panel_left, 'Direccion IP:', 100, y)
     y = Utils.createField(self, panel_left, 'Numero de sistema:', 30, y)
     y = Utils.createField(self, panel_left, 'Mandante:', 32, y)
     y = Utils.createField(self, panel_left, 'Usuario:', 80, y)
     y = Utils.createField(self, panel_left, 'Password:', 80, y, True)
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title, size=(300, 300))
        #wx.Dialog.__init__(self, parent, id, title)

        panel_left = wx.Panel(self, -1)
        self.CreateStatusBar()
        toolbar = self.CreateToolBar()
        toolbar = Toolbars.getToolbar(self, toolbar, 'newconfigwindow')
        toolbar.Realize()

        y = 20

        y = Utils.createField(self, panel_left, 'ID:', 32, y)

        y = Utils.createField(self, panel_left, 'Nombre:', 100, y)
        y = Utils.createField(self, panel_left, 'Direccion IP:', 100, y)
        y = Utils.createField(self, panel_left, 'Numero de sistema:', 30, y)
        y = Utils.createField(self, panel_left, 'Mandante:', 32, y)
        y = Utils.createField(self, panel_left, 'Usuario:', 80, y)
        y = Utils.createField(self, panel_left, 'Password:', 80, y, True)
Exemple #7
0
    def __init__(self, parent, id, title):
        self.parent = parent
        wx.Frame.__init__(self, parent, id, title, style = wx.DEFAULT_FRAME_STYLE & ~ (  wx.RESIZE_BORDER | wx.RESIZE_BOX | wx.MINIMIZE_BOX ) , size=(250, 190) )
        panel = wx.Panel(self, -1)

        self.CreateStatusBar()
        toolbar = self.CreateToolBar()
        toolbar = Toolbars.getToolbar(self, toolbar, 'downloadwindow')
        toolbar.Realize()
        self.fields = []
        self.servers = db.getServers()

        servers = []
        for server in self.servers:
            servers.append(server[0])
        
        wx.StaticText(panel, -1, "SAP Server: ", pos=(20, 55))
        self.choice = wx.Choice(panel, -1, pos=(120, 50), choices=servers )


        y = 20

        y = Utils.createField(self, panel, 'Program name:', 100, y)
Exemple #8
0
    def __init__(self, parent, id, title, code=None):
        wx.Frame.__init__(self,
                          parent,
                          id,
                          title,
                          style=wx.DEFAULT_FRAME_STYLE)
        self.code = code
        self.saved = True
        menuBar = Menues.getMenuBar(self, 'mainwindow')

        self.SetMenuBar(menuBar)
        self.statusbar = self.CreateStatusBar()

        #Toolbar
        toolbar = self.CreateToolBar()
        toolbar = Toolbars.getToolbar(self, toolbar, 'mainwindow')
        toolbar.Realize()

        self.f = wx.Font(12, wx.MODERN, wx.NORMAL, wx.NORMAL)
        self.f2 = wx.Font(12, wx.MODERN, wx.ITALIC, wx.NORMAL)
        self.f3 = wx.Font(12, wx.MODERN, wx.NORMAL, wx.BOLD)

        #Panel
        self.panel = wx.Panel(self, -1)
        self.panel.SetBackgroundColour("aquamarine")

        # Navigation
        self.CreateTree("New Project")

        tree = ["A", "B", "C", "D", "E", "F", "G", "H", "I"]

        self.codetext = wx.TextCtrl(self,
                                    -1,
                                    "",
                                    style=wx.TE_MULTILINE | wx.TE_RICH2
                                    | wx.TE_PROCESS_ENTER | wx.HSCROLL)
        self.codetext.SetInsertionPoint(0)

        if code != None:
            # viene un codigo por parametro
            self.codetext.SetValue(self.code)
            self.ReloadHighlight()

        panel2 = wx.Panel(self, -1)
        l_rce = wx.StaticText(panel2, -1, "Resultado:", (0, 0))

        self.save_result = wx.BitmapButton(panel2,
                                           -1,
                                           wx.Bitmap(Config.IMG_PATH +
                                                     'save_result.png'),
                                           pos=(0, 20))
        self.Bind(wx.EVT_BUTTON, self.OnSaveResult, self.save_result)

        self.outtext = wx.TextCtrl(self,
                                   -1,
                                   "",
                                   style=wx.TE_MULTILINE | wx.TE_RICH2
                                   | wx.TE_READONLY)
        self.outtext.SetInsertionPoint(0)

        self.Bind(wx.EVT_TEXT, self.OnText, self.codetext)
        box2 = wx.BoxSizer(wx.VERTICAL)
        box2.Add(self.codetext, 4, wx.EXPAND | wx.ALL)
        box2.Add(panel2, 0, wx.EXPAND)
        box2.Add(self.outtext, 1, flag=wx.EXPAND)

        box = wx.BoxSizer(wx.HORIZONTAL)
        box.Add(self.panel, 0, wx.EXPAND)
        box.Add(box2, 1, wx.EXPAND)

        self.SetSizer(box)

        self.lastpath = os.getcwd()

        self.servers = db.getServers()
        self.local = True
Exemple #9
0
    def CreateToolbars(self):
	    Toolbars.CreateToolbars(self)