Beispiel #1
0
    def __init__(self, *args, **kwargs):

        ConfigPanel.__init__(self, *args, **kwargs)
        wdr.ProgramUpdateSetupFunc(self)
        self.Bind(wx.EVT_BUTTON, self.OnConnTest, id=wdr.ID_BTNTEST)
        self.Bind(wx.EVT_BUTTON, self.OnPathFind, id=wdr.ID_BTNFIND)
        self.Bind(wx.EVT_BUTTON, self.OnSave,     id=wdr.ID_BTNOK)
Beispiel #2
0
 def setConfig(self, *args, **kwargs):
     ConfigPanel.setConfig(self, *args, **kwargs)
     def cn(x):
         return self.FindWindowByName(x)
     up = cn('Updates_folder')
     if ':' in up.GetValue():
         up.SetValue('')
Beispiel #3
0
 def __init__(self, *args, **kwargs):
     
     ConfigPanel.__init__(self, *args, **kwargs)
     wdr.ProgramUpdateSetupFunc(self)
     self.Bind(wx.EVT_BUTTON, self.OnConnTest, id=wdr.ID_BTNTEST)
     self.Bind(wx.EVT_BUTTON, self.OnPathFind, id=wdr.ID_BTNFIND)
     self.Bind(wx.EVT_BUTTON, self.OnSave,     id=wdr.ID_BTNOK)
Beispiel #4
0
 def __init__(self, *args, **kwargs):
     self.codes = []
     ConfigPanel.__init__(self, *args, **kwargs)
     wdr.ActivationCodesFunc(self)
     p = self.FindWindowById(wdr.ID_PANGRIDCODES)
     self.grid = ActivationCodesGrid(p, self.codes)
     self.Bind(wx.EVT_BUTTON, self.OnSave, id=wdr.ID_BTNOK)
Beispiel #5
0
 def setConfig(self, *args, **kwargs):
     ConfigPanel.setConfig(self, *args, **kwargs)
     def cn(x):
         return self.FindWindowByName(x)
     up = cn('Updates_folder')
     if ':' in up.GetValue():
         up.SetValue('')
Beispiel #6
0
 def __init__(self, *args, **kwargs):
     self.codes = []
     ConfigPanel.__init__(self, *args, **kwargs)
     wdr.ActivationCodesFunc(self)
     p = self.FindWindowById(wdr.ID_PANGRIDCODES)
     self.grid = ActivationCodesGrid(p, self.codes)
     self.Bind(wx.EVT_BUTTON, self.OnSave, id=wdr.ID_BTNOK)
Beispiel #7
0
 def __init__(self, *args, **kwargs):
     ConfigPanel.__init__(self, *args, **kwargs)
     wdr.LicenseSetup(self)
     cn = self.FindWindowByName
     if version.OSS():
         di = "Intestatario della registrazione:"
         dl = "Codice registrazione:"
     else:
         di = "Intestatario della licenza d'uso:"
         dl = "Codice licenza:"
     cn('desint').SetLabel(di)
     cn('deslic').SetLabel(dl)
     self.Layout()
     self.Bind(wx.EVT_BUTTON, self.OnSave, id=wdr.ID_BTNOK)
Beispiel #8
0
 def __init__(self, *args, **kwargs):
     ConfigPanel.__init__(self, *args, **kwargs)
     wdr.LicenseSetup(self)
     cn = self.FindWindowByName
     if version.OSS():
         di = "Intestatario della registrazione:"
         dl = "Codice registrazione:"
     else:
         di = "Intestatario della licenza d'uso:"
         dl = "Codice licenza:"
     cn('desint').SetLabel(di)
     cn('deslic').SetLabel(dl)
     self.Layout()
     self.Bind(wx.EVT_BUTTON, self.OnSave, id=wdr.ID_BTNOK)
Beispiel #9
0
 def Save(self):
     cfg = self.config
     lic = cfg._sections['License']
     cfg._sections.clear()
     cfg._sections['License'] = lic
     for key, code in self.codes:
         cfg.add_section(key)
         cfg.set(key, 'pswd', code)
     ConfigPanel.Save(self)
Beispiel #10
0
 def Read(self):
     ConfigPanel.Read(self)
     del self.codes[:]
     cfg = self.config
     for sec in cfg.sections():
         if sec != 'License':
             code = cfg.get(sec, 'pswd')
             self.codes.append([code[:4], code])
     self.grid.ResetView()
     self.grid.SetGridCursor(len(self.codes) - 1, 1)
Beispiel #11
0
 def GetValue(self, sec, opt):
     if sec == 'License':
         out = ConfigPanel.GetValue(self, sec, opt)
     else:
         out = [x[1] for x in self.codes if x[0] == sec][0]
     return out