Esempio n. 1
0
    def __init__(self, *args, **kwds):
        # begin wxGlade: GestionProduits.__init__
        kwds["style"] = wx.TAB_TRAVERSAL
        wx.Panel.__init__(self, *args, **kwds)

        self.label_serveur = wx.StaticText(self, -1, "Serveur SMTP")
        self.tc_serveur = wx.TextCtrl(self, -1, "", validator=GenericTextValidator())
        self.label_port = wx.StaticText(self, -1, "Port")
        self.tc_port = wx.TextCtrl(self, -1, "", validator=GenericTextValidator(flag=VALIDATE_INT))
        self.label_securite = wx.StaticText(self, -1, "Cryptage")
        self.cb_securite = wx.ComboBox(self, -1, choices=["Aucun", "STARTTLS", "SSL/TLS"], style=wx.CB_DROPDOWN|wx.CB_READONLY)
        self.label_login = wx.StaticText(self, -1, "Login")
        self.tc_login = wx.TextCtrl(self, -1, "")
        self.label_mdp = wx.StaticText(self, -1, "Mot de passe")
        self.tc_mdp = wx.TextCtrl(self, -1, "", style=wx.TE_PASSWORD)
        self.bouton_test_serveur = wx.Button(self, -1, u"Tester les paramètres du Serveur")
        self.bouton_sauvegarder = wx.Button(self, -1, u"Sauvegarder la configuration SMTP")
        
        self.throbber = AnimationCtrl(self)
        self.throbber.SetAnimation(Animation("../icons/32x32/throbber6.gif"))
        self.throbber.Play()
        
        self.server = None
        self.thread = None

        self.__set_properties()
        self.__set_values()
        self.__do_layout()

        self.throbber.Hide()

        self.Bind(wx.EVT_BUTTON, self.OnTestServeur, self.bouton_test_serveur)
        self.Bind(wx.EVT_BUTTON, self.OnSauvegarde, self.bouton_sauvegarder)
Esempio n. 2
0
    def __init__(self, parent, log):
        self.controls = [None] * 5
        self.timeStart = None
        self.log = log

        wx.StatusBar.__init__(self, parent, -1)
        self.SetFieldsCount(len(self.controls))

        self.controls[0] = wx.StaticText(self, label=self.TEXT_GENERAL,
                                         style=wx.ST_NO_AUTORESIZE)
        self.controls[1] = wx.StaticText(self, label=self.TEXT_INFO,
                                         style=wx.ST_NO_AUTORESIZE)
        self.controls[2] = Led(self, label=self.TEXT_GPS)
        self.controls[3] = wx.Gauge(self, -1,
                                    style=wx.GA_HORIZONTAL | wx.GA_SMOOTH)
        animation = Animation(get_resource_path('busy.gif'))
        busy = AnimationCtrl(self, anim=animation)
        busy.SetToolTipString('Updating plot')
        self.controls[4] = busy

        self.controls[3].Hide()
        self.controls[4].Hide()

        self.SetStatusWidths([-1, -1, -1, -1, busy.GetSize()[0] * 4])

        self.Bind(wx.EVT_SIZE, self.__on_size)
        wx.CallAfter(self.__on_size, None)

        self.Fit()
Esempio n. 3
0
 def init(self, parent):
     """ Finishes initializing the editor by creating the underlying toolkit
         widget.
     """
     self._animate = Animation(self.value)
     self.control = AnimationCtrl(parent, -1, self._animate)
     self.control.SetUseWindowBackgroundColour()
     self.sync_value(self.factory.playing, "playing", "from")
     self.set_tooltip()