def __init__(self, parent, titre=_(u"Saisie d'une compagnie")): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX) self.parent = parent self.titre = titre # Nom self.staticbox_nom_staticbox = wx.StaticBox(self, -1, _(u"Nom de la compagnie")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, u"") # Coords self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél. :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"restaurateur")) self.label_fax = wx.StaticText(self, -1, _(u"Fax. :")) self.ctrl_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL(self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL(self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX) self.parent = parent self.staticbox_adresse_staticbox = wx.StaticBox(self, -1, _(u"Adresse")) self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.staticbox_identite_staticbox = wx.StaticBox(self, -1, _(u"Identité")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, "") self.label_prenom = wx.StaticText(self, -1, _(u"Prénom :")) self.ctrl_prenom = wx.TextCtrl(self, -1, "") self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, "") self.label_cp = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél. Cabinet :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"cabinet")) self.label_mobile = wx.StaticText(self, -1, _(u"Tél. Mobile :")) self.ctrl_mobile = CTRL_Saisie_tel.Tel(self, intitule=_(u"mobile")) self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL(self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL(self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.ctrl_nom.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocusNom)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE) self.parent = parent self.staticbox_identite_staticbox = wx.StaticBox(self, -1, _(u"Nom")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, "") self.ctrl_nom.SetMinSize((400, -1)) self.staticbox_adresse_staticbox = wx.StaticBox( self, -1, _(u"Adresse")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE) self.label_cp = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
def __init__(self, parent, titre=_(u"Saisie d'un lieu")): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX) self.parent = parent self.titre = titre self.staticbox_nom_staticbox = wx.StaticBox(self, -1, u"") self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, u"") self.label_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)
def __init__(self, parent, IDcontact=None): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX) self.parent = parent self.IDcontact = IDcontact self.staticbox_identite_staticbox = wx.StaticBox( self, -1, _(u"Identité")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, "") self.label_prenom = wx.StaticText(self, -1, _(u"Prénom :")) self.ctrl_prenom = wx.TextCtrl(self, -1, "") self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, "") self.label_cp = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél. fixe :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"domicile")) self.label_mobile = wx.StaticText(self, -1, _(u"Tél. portable :")) self.ctrl_mobile = CTRL_Saisie_tel.Tel(self, intitule=_(u"mobile")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.label_site = wx.StaticText(self, -1, _(u"Site internet :")) self.ctrl_site = wx.TextCtrl(self, -1, "") self.staticbox_memo_staticbox = wx.StaticBox(self, -1, _(u"Mémo")) self.ctrl_memo = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE) self.ctrl_memo.SetMinSize((300, 90)) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) # Init if self.IDcontact: self.Importation()
def __init__(self, parent, titre=_(u"Géolocalisation GPS")): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.THICK_FRAME) self.parent = parent # Bandeau intro = _( u"Cette fonctionnalité vous permet d'obtenir les coordonnées GPS d'un lieu. Saisissez une adresse complète ou une ville avant de cliquer sur Rechercher." ) titre = _(u"Géolocalisation GPS") self.SetTitle(titre) self.ctrl_bandeau = CTRL_Bandeau.Bandeau( self, titre=titre, texte=intro, hauteurHtml=30, nomImage="Images/32x32/Carte.png") # Recherche self.box_recherche_staticbox = wx.StaticBox(self, -1, _(u"Recherche")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_ville = wx.StaticText(self, -1, _(u"CP :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.bouton_rechercher = CTRL_Bouton_image.CTRL( self, texte=_(u"Rechercher"), cheminImage="Images/32x32/Loupe.png") # Résultats self.box_resultats_staticbox = wx.StaticBox(self, -1, _(u"Résultats")) self.ctrl_resultats = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Fermer"), cheminImage="Images/32x32/Fermer.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonRechercher, self.bouton_rechercher) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.Bind(wx.EVT_BUTTON, self.OnBoutonFermer, self.bouton_ok)
def __init__(self, parent, IDindividu=None, size=(-1, -1)): wx.Panel.__init__(self, parent, id=-1, size=size, style=wx.TAB_TRAVERSAL) self.SetMinSize(size) self.IDindividu = IDindividu self.ctrl_adresse_auto = CTRL_Adresse_auto(self, IDindividu=IDindividu, size=(size[0], -1)) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE) self.label_cp = wx.StaticText(self, -1, _(u"CP :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) # Layout grid_sizer_base = wx.FlexGridSizer(rows=5, cols=1, vgap=5, hgap=5) grid_sizer_base.Add(self.ctrl_adresse_auto, 0, wx.EXPAND, 0) grid_sizer_adresse_manuelle = wx.FlexGridSizer(rows=2, cols=2, vgap=5, hgap=5) grid_sizer_adresse_manuelle.Add( self.label_rue, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 0) grid_sizer_adresse_manuelle.Add(self.ctrl_rue, 0, wx.EXPAND, 0) grid_sizer_adresse_manuelle.Add( self.label_cp, 0, wx.ALIGN_RIGHT | wx.ALIGN_CENTER_VERTICAL, 0) grid_sizer_adresse_manuelle.Add(self.ctrl_ville, 0, wx.EXPAND, 0) grid_sizer_adresse_manuelle.AddGrowableCol(1) grid_sizer_base.Add(grid_sizer_adresse_manuelle, 0, wx.EXPAND, 0) grid_sizer_base.AddGrowableCol(0) self.SetSizer(grid_sizer_base) self.Layout() # Binds self.Bind(wx.EVT_CHOICE, self.OnChoix, self.ctrl_adresse_auto) # Init self.ctrl_adresse_auto.MAJ() self.OnChoix()
def Remplissage(self): """ Remplissage """ self.dictControles = {} # Création des colonnes largeurColonneDonnee = 300 self.InsertColumn(0, _(u"Champ"), width=180) self.InsertColumn(1, _(u"Valeur"), width=largeurColonneDonnee + 5, format=ULC.ULC_FORMAT_LEFT) # Création des lignes self.liste_lignes = [ { "code": "nom", "label": _(u"Nom de famille"), "ctrl": wx.TextCtrl(self, -1, "", size=(largeurColonneDonnee, -1)) }, { "code": "prenom", "label": _(u"Prénom"), "ctrl": wx.TextCtrl(self, -1, "", size=(largeurColonneDonnee, -1)) }, { "code": "date_naiss", "label": _(u"Date de naissance"), "ctrl": CTRL_Saisie_date.Date2(self, size=(largeurColonneDonnee, -1)) }, { "code": "ville_naiss", "label": _(u"Ville de naissance"), "ctrl": CTRL_Saisie_adresse.Adresse(self, size=(largeurColonneDonnee, -1)) }, { "code": "adresse", "label": _(u"Adresse"), "ctrl": Adresse(self, IDindividu=self.IDindividu, size=(largeurColonneDonnee, 100)) }, { "code": "tel_domicile", "label": _(u"Tél. Domicile"), "ctrl": CTRL_Saisie_tel.Tel(self, intitule=_(u"Domicile"), size=(largeurColonneDonnee, -1)) }, { "code": "tel_mobile", "label": _(u"Tél. Mobile"), "ctrl": CTRL_Saisie_tel.Tel(self, intitule=_(u"Mobile"), size=(largeurColonneDonnee, -1)) }, { "code": "mail", "label": _(u"Email"), "ctrl": CTRL_Saisie_mail.Mail(self, size=(largeurColonneDonnee, -1)) }, { "code": "profession", "label": _(u"Profession"), "ctrl": wx.TextCtrl(self, -1, "", size=(largeurColonneDonnee, -1)) }, { "code": "employeur", "label": _(u"Employeur"), "ctrl": wx.TextCtrl(self, -1, "", size=(largeurColonneDonnee, -1)) }, { "code": "travail_tel", "label": _(u"Tél. Pro."), "ctrl": CTRL_Saisie_tel.Tel(self, intitule=_(u"Tél.Pro."), size=(largeurColonneDonnee, -1)) }, { "code": "travail_mail", "label": _(u"Email Pro."), "ctrl": CTRL_Saisie_mail.Mail(self, size=(largeurColonneDonnee, -1)) }, ] index = 0 for ligne in self.liste_lignes: # Colonne Nom de colonne label = _(u" Colonne %d") % (index + 1) self.InsertStringItem(index, ligne["label"], it_kind=1) self.SetItemPyData(index, ligne) # Type de donnée item = self.GetItem(index, 1) ctrl = ligne["ctrl"] ctrl.SetBackgroundColour(wx.Colour(255, 255, 255)) item.SetWindow(ctrl) self.SetItem(item) self.dictControles[index] = { "code": ligne["code"], "ctrl": ctrl, "item": item } index += 1
def __init__(self, parent, empecheAnnulation=False): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE) self.parent = parent self.empecheAnnulation = empecheAnnulation self.logo = None intro = _( u"Saisissez ici les informations concernant l'organisateur. Ces données seront utilisées dans les différents documents édités par le logiciel." ) titre = _(u"L'organisateur") self.ctrl_bandeau = CTRL_Bandeau.Bandeau( self, titre=titre, texte=intro, hauteurHtml=30, nomImage="Images/32x32/Organisateur.png") self.staticbox_nom_staticbox = wx.StaticBox( self, -1, _(u"Nom de l'organisateur")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, u"") self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_adresse = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_adresse = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"siège")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.label_fax = wx.StaticText(self, -1, _(u"Fax :")) self.ctrl_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_site = wx.StaticText(self, -1, _(u"Site internet :")) self.ctrl_site = wx.TextCtrl(self, -1, u"") self.staticbox_numeros_staticbox = wx.StaticBox( self, -1, _(u"Numéros d'identification")) self.label_agrement = wx.StaticText(self, -1, _(u"Numéro agrément :")) self.ctrl_agrement = wx.TextCtrl(self, -1, u"") self.label_siret = wx.StaticText(self, -1, _(u"Numéro SIRET :")) self.ctrl_siret = wx.TextCtrl(self, -1, u"") self.label_ape = wx.StaticText(self, -1, _(u"Code APE :")) self.ctrl_ape = wx.TextCtrl(self, -1, u"") self.staticbox_logo_staticbox = wx.StaticBox(self, -1, _(u"Logo")) self.ctrl_logo = CTRL_Logo.CTRL(self, qualite=100, couleurFond=wx.Colour(255, 255, 255), size=(83, 83)) self.bouton_modifier = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Modifier.png"), wx.BITMAP_TYPE_ANY)) self.bouton_supprimer = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Supprimer.png"), wx.BITMAP_TYPE_ANY)) self.bouton_visualiser = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Loupe.png"), wx.BITMAP_TYPE_ANY)) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") # Empêche l'annulation if self.empecheAnnulation == True: self.bouton_annuler.Show(False) self.EnableCloseButton(False) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonModifierLogo, self.bouton_modifier) self.Bind(wx.EVT_BUTTON, self.OnBoutonSupprimerLogo, self.bouton_supprimer) self.Bind(wx.EVT_BUTTON, self.OnBoutonVisualiserLogo, self.bouton_visualiser) self.Importation()
def __init__(self, parent, IDindividu=None): wx.Panel.__init__(self, parent, id=-1, name="panel_identite", style=wx.TAB_TRAVERSAL) self.parent = parent self.IDindividu = IDindividu self.majEffectuee = False # Identité self.staticbox_etatcivil_staticbox = wx.StaticBox( self, -1, _(u"Etat-civil")) self.label_civilite = wx.StaticText(self, -1, _(u"Civilité/genre :")) self.ctrl_civilite = CTRL_Saisie_civilite.Civilite(self) self.label_nomjfille = wx.StaticText(self, -1, _(u"Nom de jeune fille :")) self.ctrl_nomjfille = wx.TextCtrl(self, -1, u"") self.label_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_nom = wx.TextCtrl(self, -1, "") self.label_prenom = wx.StaticText(self, -1, _(u"Prénom :")) self.ctrl_prenom = wx.TextCtrl(self, -1, "") self.label_numsecu = wx.StaticText(self, -1, _(u"Num. sécu. :")) self.ctrl_numsecu = CTRL_Saisie_numSecu.NumSecu(self) self.label_nationalite = wx.StaticText(self, -1, _(u"Nationalité :")) self.ctrl_nationalite = CTRL_Saisie_pays.SaisiePays(self, mode="nationalite") # Naissance self.staticbox_naiss_staticbox = wx.StaticBox(self, -1, _(u"Naissance")) self.label_datenaiss = wx.StaticText(self, -1, _(u"Date :")) self.ctrl_datenaiss = CTRL_Saisie_date.Date(self) self.ctrl_age = wx.TextCtrl(self, -1, "", style=wx.TE_CENTRE, size=(46, -1)) self.label_paysnaiss = wx.StaticText(self, -1, _(u"Pays de naissance :")) self.ctrl_paysnaiss = CTRL_Saisie_pays.SaisiePays(self, mode="pays") self.label_lieunaiss = wx.StaticText(self, -1, _(u"Lieu | C.P. :")) self.ctrl_adressenaiss = CTRL_Saisie_adresse.Adresse(self) # Décès self.staticbox_deces = wx.StaticBox(self, -1, _(u"Décès")) self.ctrl_deces = wx.CheckBox(self, -1, u"") self.label_deces = wx.StaticText(self, -1, _(u"Année :")) self.ctrl_annee_deces = wx.TextCtrl(self, -1, u"") # Sieste self.staticbox_sieste = wx.StaticBox(self, -1, _(u"Sieste")) self.ctrl_sieste = Sieste(self) self.bouton_sieste = wx.Button(self, -1, "...", size=(20, 20)) # Mémo self.staticbox_memo = wx.StaticBox(self, -1, _(u"Mémo")) self.ctrl_memo = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_CHOICE, self.OnChoiceCivilite, self.ctrl_civilite) self.ctrl_nom.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocusNom) self.ctrl_prenom.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocusPrenom) self.ctrl_datenaiss.Bind(wx.EVT_TEXT, self.OnKillFocusDatenaiss) self.ctrl_nom.Bind(wx.EVT_TEXT, self.OnTextNomOuPrenom) self.ctrl_prenom.Bind(wx.EVT_TEXT, self.OnTextNomOuPrenom) self.ctrl_deces.Bind(wx.EVT_CHECKBOX, self.OnCheckDeces) self.Bind(wx.EVT_BUTTON, self.OnGestionSieste, self.bouton_sieste) self.OnCheckDeces(None) self.ctrl_nationalite.SetValue(IDpays=73) self.ctrl_paysnaiss.SetValue(IDpays=73)
def __init__(self, parent, IDactivite=None, nouvelleActivite=False): wx.Panel.__init__(self, parent, id=-1, name="panel_generalites", style=wx.TAB_TRAVERSAL) self.parent = parent self.IDactivite = IDactivite self.listeInitialeGroupes = [] # Nom Activité self.staticbox_nom_staticbox = wx.StaticBox(self, -1, _(u"Nom de l'activité")) self.label_nom_complet = wx.StaticText(self, -1, _(u"Nom complet :")) self.ctrl_nom_complet = wx.TextCtrl(self, -1, u"") self.label_nom_abrege = wx.StaticText(self, -1, _(u"Nom abrégé :")) self.ctrl_nom_abrege = wx.TextCtrl(self, -1, u"") # Coords self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.radio_coords_org = wx.RadioButton(self, -1, u"", style=wx.RB_GROUP) self.label_coords_org = wx.StaticText( self, -1, _(u"Identique à l'organisateur")) self.radio_coords_autres = wx.RadioButton(self, -1, u"") self.label_coords_autres = wx.StaticText(self, -1, _(u"Autres coordonnées :")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél :")) self.ctrl_tel = CTRL_Saisie_tel.Tel( self, intitule=_(u"contact pour cette activité")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.label_fax = wx.StaticText(self, -1, _(u"Fax :")) self.ctrl_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_site = wx.StaticText(self, -1, _(u"Site internet :")) self.ctrl_site = wx.TextCtrl(self, -1, u"") # Responsables self.staticbox_responsables_staticbox = wx.StaticBox( self, -1, _(u"Responsables de l'activité")) self.ctrl_responsables = OL_Responsables_activite.ListView( self, IDactivite=IDactivite, id=-1, name="OL_responsables", style=wx.LC_REPORT | wx.SUNKEN_BORDER | wx.LC_SINGLE_SEL | wx.LC_HRULES | wx.LC_VRULES) self.ctrl_responsables.SetMinSize((-1, 40)) self.ctrl_responsables.MAJ() self.bouton_ajouter_responsable = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Ajouter.png"), wx.BITMAP_TYPE_ANY)) self.bouton_modifier_responsable = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Modifier.png"), wx.BITMAP_TYPE_ANY)) self.bouton_supprimer_responsable = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Supprimer.png"), wx.BITMAP_TYPE_ANY)) self.bouton_defaut_responsable = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Ok.png"), wx.BITMAP_TYPE_ANY)) # Code comptable self.staticbox_code_comptable_staticbox = wx.StaticBox( self, -1, _(u"Code comptable")) self.ctrl_code_comptable = wx.TextCtrl(self, -1, "") # Groupes d'activités self.staticbox_groupes_staticbox = wx.StaticBox( self, -1, _(u"Regroupement d'activités")) self.ctrl_groupes = CTRL_Groupes_activite(self) self.ctrl_groupes.SetMinSize((-1, 40)) # Logo self.staticbox_logo_staticbox = wx.StaticBox(self, -1, _(u"Logo")) self.radio_logo_org = wx.RadioButton(self, -1, u"", style=wx.RB_GROUP) self.label_logo_org = wx.StaticText(self, -1, _(u"Identique a l'organisateur")) self.radio_logo_autre = wx.RadioButton(self, -1, u"") self.label_logo_autre = wx.StaticText(self, -1, _(u"Autre logo :")) self.ctrl_logo = CTRL_Logo.CTRL(self, qualite=100, couleurFond=wx.Colour(255, 255, 255), size=(83, 83)) self.bouton_modifier_logo = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Modifier.png"), wx.BITMAP_TYPE_ANY)) self.bouton_supprimer_logo = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Supprimer.png"), wx.BITMAP_TYPE_ANY)) self.bouton_visualiser_logo = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Loupe.png"), wx.BITMAP_TYPE_ANY)) # Validité self.staticbox_validite_staticbox = wx.StaticBox( self, -1, _(u"Dates de validité")) self.radio_illimitee = wx.RadioButton(self, -1, u"", style=wx.RB_GROUP) self.label_illimitee = wx.StaticText(self, -1, _(u"Illimitée")) self.radio_limitee = wx.RadioButton(self, -1, u"") self.label_validite_du = wx.StaticText(self, -1, u"Du") self.ctrl_validite_du = CTRL_Saisie_date.Date(self) self.label_validite_au = wx.StaticText(self, -1, _(u"au")) self.ctrl_validite_au = CTRL_Saisie_date.Date(self) # Public self.staticbox_public_staticbox = wx.StaticBox(self, -1, _(u"Public")) self.ctrl_public = CTRL_Public(self) listePublic = [ (1, _(u"Représentants"), False), (2, _(u"Enfants"), False), ] self.ctrl_public.SetData(listePublic) self.ctrl_public.SetMinSize((-1, 40)) # Nombre max d'inscrits self.staticbox_limitation_inscrits_staticbox = wx.StaticBox( self, -1, _(u"Limitation du nombre d'inscrits")) self.check_limitation_inscrits = wx.CheckBox( self, -1, _(u"Nombre d'inscrits max. :")) self.ctrl_limitation_inscrits = wx.SpinCtrl(self, -1, size=(80, -1), min=1, max=99999) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioCoords, self.radio_coords_org) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioCoords, self.radio_coords_autres) self.Bind(wx.EVT_BUTTON, self.OnAjouterResponsable, self.bouton_ajouter_responsable) self.Bind(wx.EVT_BUTTON, self.OnModifierResponsable, self.bouton_modifier_responsable) self.Bind(wx.EVT_BUTTON, self.OnSupprimerResponsable, self.bouton_supprimer_responsable) self.Bind(wx.EVT_BUTTON, self.OnResponsableDefaut, self.bouton_defaut_responsable) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioLogo, self.radio_logo_org) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioLogo, self.radio_logo_autre) self.Bind(wx.EVT_BUTTON, self.OnModifierLogo, self.bouton_modifier_logo) self.Bind(wx.EVT_BUTTON, self.OnSupprimerLogo, self.bouton_supprimer_logo) self.Bind(wx.EVT_BUTTON, self.OnVisualiserLogo, self.bouton_visualiser_logo) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioValidite, self.radio_illimitee) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioValidite, self.radio_limitee) self.Bind(wx.EVT_CHECKBOX, self.OnCheckLimitationInscrits, self.check_limitation_inscrits) # Importation if nouvelleActivite == False: self.Importation() # Initialisation des contrôles self.OnRadioCoords(None) self.OnRadioLogo(None) self.OnRadioValidite(None) self.OnCheckLimitationInscrits(None)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, name="DLG_Horaires_soleil", style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX) self.parent = parent # Bandeau titre = _(u"Horaires du soleil") intro = _(u"Cette fonctionnalité permet d'afficher les heures de lever et de coucher du soleil d'une ville sur un mois donné. Cette fonction utilise la géolocalisation GPS de la ville et un agorithme intégré de calcul de la position du soleil.") self.SetTitle(titre) self.ctrl_bandeau = CTRL_Bandeau.Bandeau(self, titre=titre, texte=intro, hauteurHtml=30, nomImage="Images/32x32/Soleil.png") # Paramètres self.box_ville_staticbox = wx.StaticBox(self, -1, _(u"Ville")) self.radio_ville = wx.RadioButton(self, -1, _(u"Selon une ville :"), style=wx.RB_GROUP) self.label_ville = wx.StaticText(self, -1, _(u"CP :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.radio_gps = wx.RadioButton(self, -1, _(u"Selon une position GPS :")) self.label_lat = wx.StaticText(self, -1, _(u"Lat. :")) self.ctrl_lat = wx.TextCtrl(self, -1, u"") self.label_long = wx.StaticText(self, -1, _(u"Long. :")) self.ctrl_long = wx.TextCtrl(self, -1, u"") self.box_mois_staticbox = wx.StaticBox(self, -1, _(u"Mois")) self.label_mois = wx.StaticText(self, -1, _(u"Mois :")) self.ctrl_mois = wx.Choice(self, -1, choices=[_(u"Janvier"), _(u"Février"), _(u"Mars"), _(u"Avril"), _(u"Mai"), _(u"Juin"), _(u"Juillet"), _(u"Août"), _(u"Septembre"), _(u"Octobre"), _(u"Novembre"), _(u"Décembre")]) self.label_annee = wx.StaticText(self, -1, _(u"Année :")) self.ctrl_annee = wx.SpinCtrl(self, -1, u"", min=1970, max=2999) dateDuJour = datetime.date.today() self.ctrl_mois.SetSelection(dateDuJour.month-1) self.ctrl_annee.SetValue(dateDuJour.year) # Bouton actualiser self.bouton_actualiser = CTRL_Bouton_image.CTRL(self, texte=_(u"Rafraîchir la liste"), cheminImage="Images/32x32/Actualiser.png") # Résultats self.ctrl_resultats = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) # Boutons self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_fermer = CTRL_Bouton_image.CTRL(self, texte=_(u"Fermer"), cheminImage="Images/32x32/Fermer.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioVille, self.radio_ville) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioVille, self.radio_gps) self.Bind(wx.EVT_CHOICE, self.OnChoixMois, self.ctrl_mois) self.Bind(wx.EVT_SPINCTRL, self.OnChoixAnnee, self.ctrl_annee) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.Bind(wx.EVT_BUTTON, self.OnBoutonFermer, self.bouton_fermer) self.Bind(wx.EVT_BUTTON, self.OnBoutonActualiser, self.bouton_actualiser) # Init contrôles self.OnRadioVille(None) self.dictOrganisateur = self.GetOrganisateur() if self.dictOrganisateur != None : try : self.ctrl_ville.SetValueCP(self.dictOrganisateur["cp"]) self.ctrl_ville.SetValueVille(self.dictOrganisateur["ville"]) except : pass
def __init__(self, parent, IDindividu=None): wx.Panel.__init__(self, parent, id=-1, name="panel_coords", style=wx.TAB_TRAVERSAL) self.parent = parent self.IDindividu = IDindividu self.cp = None self.ville = None self.majEffectuee = False # Adresse self.staticbox_adresse = wx.StaticBox(self, -1, _(u"Adresse de résidence")) self.radio_adresse_auto = wx.RadioButton(self, -1, "", style=wx.RB_GROUP) self.label_adresse_auto = wx.StaticText(self, -1, _(u"L'adresse de :")) self.ctrl_adresse_auto = Adresse_auto(self) self.radio_adresse_manuelle = wx.RadioButton(self, -1, "") self.label_adresse_manuelle = wx.StaticText(self, -1, _(u"L'adresse suivante :")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_rue = wx.TextCtrl(self, -1, "", style=wx.TE_MULTILINE) self.label_cp = wx.StaticText(self, -1, _(u"CP :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_secteur = wx.StaticText(self, -1, _(u"Secteur :")) self.ctrl_secteur = Secteur(self) self.bouton_secteurs = wx.Button(self, -1, "...", size=(20, 20)) # Coordonnées self.staticbox_coords = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_tel_domicile = wx.StaticText(self, -1, _(u"Domicile :")) self.ctrl_tel_domicile = CTRL_Saisie_tel.Tel(self, intitule=_(u"Domicile")) self.label_tel_mobile = wx.StaticText(self, -1, _(u"Mobile :")) self.ctrl_tel_mobile = CTRL_Saisie_tel.Tel(self, intitule=_(u"mobile")) self.label_tel_fax = wx.StaticText(self, -1, _(u"Fax :")) self.ctrl_tel_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) self.bouton_mail_perso = wx.BitmapButton( self, 900, wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Emails_exp.png"), wx.BITMAP_TYPE_ANY)) # Activité professionnelle self.staticbox_travail = wx.StaticBox(self, -1, _(u"Activité professionnelle")) self.label_categorie = wx.StaticText(self, -1, _(u"Catégorie :")) self.ctrl_categorie = Categorie(self) self.label_travail_tel = wx.StaticText(self, -1, _(u"Tél :")) self.ctrl_travail_tel = CTRL_Saisie_tel.Tel(self, intitule=_(u"travail")) self.label_profession = wx.StaticText(self, -1, _(u"Profession :")) self.ctrl_profession = wx.TextCtrl(self, -1, "") self.label_travail_fax = wx.StaticText(self, -1, _(u"Fax :")) self.ctrl_travail_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_employeur = wx.StaticText(self, -1, _(u"Employeur :")) self.ctrl_employeur = wx.TextCtrl(self, -1, "") self.label_travail_mail = wx.StaticText(self, -1, _(u"Mail :")) self.ctrl_travail_mail = CTRL_Saisie_mail.Mail(self) self.bouton_mail_travail = wx.BitmapButton( self, 800, wx.Bitmap(Chemins.GetStaticPath("Images/16x16/Emails_exp.png"), wx.BITMAP_TYPE_ANY)) # Listes de diffusion self.staticbox_listesdiff = wx.StaticBox(self, -1, _(u"Listes de diffusion")) self.label_listesdiff = wx.StaticText( self, -1, _(u"Inscrire aux listes suivantes :")) self.ctrl_listesdiff = CTRL_diff(self) self.__set_properties() self.__do_layout() self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioAdresse, self.radio_adresse_auto) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioAdresse, self.radio_adresse_manuelle) self.Bind(wx.EVT_BUTTON, self.OnGestionSecteurs, self.bouton_secteurs) self.Bind(wx.EVT_BUTTON, self.OnEnvoiEmail, self.bouton_mail_travail) self.Bind(wx.EVT_BUTTON, self.OnEnvoiEmail, self.bouton_mail_perso) self.ctrl_adresse_auto.Bind(wx.EVT_CHOICE, self.OnTextAdresse) self.ctrl_rue.Bind(wx.EVT_TEXT, self.OnTextAdresse) self.ctrl_ville.ctrl_cp.Bind(wx.EVT_TEXT, self.OnTextAdresse) self.ctrl_ville.ctrl_ville.Bind(wx.EVT_TEXT, self.OnTextAdresse)
def __init__(self, parent, IDfamille=None, IDmandat=None): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.MAXIMIZE_BOX|wx.MINIMIZE_BOX|wx.THICK_FRAME) self.parent = parent self.IDfamille = IDfamille self.IDmandat = IDmandat # Mandat self.box_mandat_staticbox = wx.StaticBox(self, -1, _(u"Caractéristiques du mandat")) self.label_reference_mandat = wx.StaticText(self, -1, _(u"Référence Unique du Mandat (RUM) :")) self.ctrl_reference_mandat = wx.TextCtrl(self, -1, str(self.IDfamille), style=wx.TE_CENTRE) self.label_date_mandat = wx.StaticText(self, -1, _(u"Date de signature du mandat :")) self.ctrl_date_mandat = CTRL_Saisie_date.Date2(self) self.label_type_mandat = wx.StaticText(self, -1, _(u"Type de mandat :")) self.ctrl_type_mandat = wx.Choice(self, -1, choices=[_(u"Récurrent"), _(u"Ponctuel")]) self.ctrl_type_mandat.Select(0) self.ctrl_actif = wx.CheckBox(self, -1, "") self.ctrl_actif.SetValue(True) # RIB self.box_rib_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées bancaires")) # IBAN self.label_iban = wx.StaticText(self, -1, _(u"IBAN")) self.label_bic = wx.StaticText(self, -1, _(u"BIC")) self.ctrl_iban = wx.TextCtrl(self, -1, u"", style=wx.TE_CENTRE) self.ctrl_bic = wx.TextCtrl(self, -1, u"", style=wx.TE_CENTRE) self.image_valide = wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Ok4.png"), wx.BITMAP_TYPE_ANY) self.image_nonvalide = wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Interdit2.png"), wx.BITMAP_TYPE_ANY) self.ctrl_controle = wx.StaticBitmap(self, -1, self.image_nonvalide) self.label_analyse_iban = wx.StaticText(self, -1, _(u"Analyse IBAN")) self.label_analyse_iban.SetForegroundColour((130, 130, 130)) ## # Etablissement ## self.label_banque = wx.StaticText(self, -1, _(u"Etablissement")) ## self.ctrl_banque = CTRL_Banque(self) ## self.bouton_banques = wx.BitmapButton(self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Mecanisme.png"), wx.BITMAP_TYPE_ANY)) # Titulaire self.box_titulaire_staticbox = wx.StaticBox(self, -1, _(u"Titulaire du compte bancaire")) self.radio_membre = wx.RadioButton(self, -1, _(u"Le membre :"), style=wx.RB_GROUP) self.ctrl_membre = CTRL_Titulaire(self, IDfamille=IDfamille) self.radio_individu = wx.RadioButton(self, -1, _(u"Le titulaire suivant :")) self.label_individu_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_individu_nom = wx.TextCtrl(self, -1, u"") self.label_individu_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_individu_rue = wx.TextCtrl(self, -1, u"") self.label_individu_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_individu_ville = CTRL_Saisie_adresse.Adresse(self) # Options self.box_options_staticbox = wx.StaticBox(self, -1, _(u"Options")) self.label_sequence = wx.StaticText(self, -1, _(u"Séquence suiv. :")) self.ctrl_sequence = CTRL_Sequence(self) self.ctrl_sequence.Select(0) self.label_memo = wx.StaticText(self, -1, _(u"Observations :")) self.ctrl_memo = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_actif = wx.StaticText(self, -1, _(u"Mandat activé :")) # Liste des prélèvements self.box_prelevements_staticbox = wx.StaticBox(self, -1, _(u"Prélèvements rattachés")) self.notebook = wx.Notebook(self, -1, style=wx.BK_TOP) if self.IDmandat == None : IDmandatTemp = 0 else : IDmandatTemp = self.IDmandat self.ctrl_prelevements = OL_Prelevements.ListView(self.notebook, id=-1, IDmandat=IDmandatTemp, style=wx.LC_REPORT|wx.SUNKEN_BORDER|wx.LC_SINGLE_SEL|wx.LC_HRULES|wx.LC_VRULES) self.ctrl_prelevements.SetMinSize((50, 180)) self.ctrl_prelevements.MAJ() if self.IDmandat == None : IDmandatTemp = 0 else : IDmandatTemp = self.IDmandat self.ctrl_pieces = OL_PES_mandat.ListView(self.notebook, id=-1, IDmandat=IDmandatTemp, style=wx.LC_REPORT|wx.SUNKEN_BORDER|wx.LC_SINGLE_SEL|wx.LC_HRULES|wx.LC_VRULES) self.ctrl_pieces.SetMinSize((50, 180)) self.ctrl_pieces.MAJ() self.notebook.AddPage(self.ctrl_prelevements, _(u"Prélèvements directs SEPA (%d)") % len(self.ctrl_prelevements.donnees)) self.notebook.AddPage(self.ctrl_pieces, _(u"Prélèvements PES ORMC (%d)") % len(self.ctrl_pieces.donnees)) self.notebook.SetMinSize((50, 180)) # Boutons self.bouton_aide = CTRL_Bouton_image.CTRL(self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_email = CTRL_Bouton_image.CTRL(self, texte=_(u"Envoyer par Email"), cheminImage="Images/32x32/Emails_exp.png") self.bouton_imprimer = CTRL_Bouton_image.CTRL(self, texte=_(u"Imprimer"), cheminImage="Images/32x32/Imprimante.png") self.bouton_ok = CTRL_Bouton_image.CTRL(self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL(self, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() # Binds self.Bind(wx.EVT_TEXT, self.OnSaisieIBAN, self.ctrl_iban) self.Bind(wx.EVT_TEXT, self.OnSaisieIBAN, self.ctrl_bic) ## self.Bind(wx.EVT_BUTTON, self.OnBoutonBanques, self.bouton_banques) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioTitulaire, self.radio_membre) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioTitulaire, self.radio_individu) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.Bind(wx.EVT_BUTTON, self.OnBoutonImprimer, self.bouton_imprimer) self.Bind(wx.EVT_BUTTON, self.OnBoutonEmail, self.bouton_email) self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAnnuler, self.bouton_annuler) # Init contrôles if self.IDmandat != None : self.SetTitle(_(u"Modification d'un mandat SEPA")) self.Importation() else : self.SetTitle(_(u"Saisie d'un mandat SEPA")) self.ctrl_reference_mandat.SetValue(self.GetProchainRUM()) self.ImportationAncienRIB() self.OnSaisieIBAN(None) self.OnRadioTitulaire(None)
def __init__(self, parent, IDfamille=None): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE) self.parent = parent self.IDfamille = IDfamille self.SetTitle(_(u"Saisie du RIB")) # RIB self.box_rib_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées bancaires")) self.label_cle_iban = wx.StaticText(self, -1, _(u"Clé IBAN")) self.label_etab = wx.StaticText(self, -1, _(u"Etab.")) self.label_guichet = wx.StaticText(self, -1, _(u"Guichet")) self.label_numero = wx.StaticText(self, -1, _(u"Compte")) self.label_cle_rib = wx.StaticText(self, -1, _(u"Clé RIB")) self.ctrl_cle_iban = wx.TextCtrl(self, -1, _(u"FR76"), style=wx.TE_CENTRE) self.ctrl_code_etab = wx.TextCtrl(self, -1, u"", style=wx.TE_CENTRE, validator=MyValidator()) self.ctrl_code_guichet = wx.TextCtrl(self, -1, u"", style=wx.TE_CENTRE, validator=MyValidator()) self.ctrl_numero = wx.TextCtrl(self, -1, u"", style=wx.TE_CENTRE, validator=MyValidator()) self.ctrl_cle_rib = wx.TextCtrl(self, -1, u"", style=wx.TE_CENTRE, validator=MyValidator()) self.image_valide = wx.Bitmap( Chemins.GetStaticPath(u"Images/16x16/Ok4.png"), wx.BITMAP_TYPE_ANY) self.image_nonvalide = wx.Bitmap( Chemins.GetStaticPath(u"Images/16x16/Interdit2.png"), wx.BITMAP_TYPE_ANY) self.ctrl_controle = wx.StaticBitmap(self, -1, self.image_nonvalide) # Etablissement self.label_banque = wx.StaticText(self, -1, _(u"Etablissement")) self.ctrl_banque = CTRL_Banque(self) self.bouton_banques = wx.BitmapButton( self, -1, wx.Bitmap(Chemins.GetStaticPath(u"Images/16x16/Mecanisme.png"), wx.BITMAP_TYPE_ANY)) # Titulaire self.box_titulaire_staticbox = wx.StaticBox( self, -1, _(u"Titulaire du compte bancaire")) self.radio_membre = wx.RadioButton(self, -1, _(u"Le membre :"), style=wx.RB_GROUP) self.ctrl_membre = CTRL_Titulaire(self, IDfamille=IDfamille) self.radio_individu = wx.RadioButton(self, -1, _(u"Le titulaire suivant :")) self.label_individu_nom = wx.StaticText(self, -1, _(u"Nom :")) self.ctrl_individu_nom = wx.TextCtrl(self, -1, u"") self.label_individu_rue = wx.StaticText(self, -1, _(u"Rue :")) self.ctrl_individu_rue = wx.TextCtrl(self, -1, u"") self.label_individu_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_individu_ville = CTRL_Saisie_adresse.Adresse(self) # Mémo self.box_memo_staticbox = wx.StaticBox(self, -1, _(u"Observations")) self.ctrl_memo = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) # Boutons self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() # Binds self.Bind(wx.EVT_TEXT, self.OnSaisieRIB, self.ctrl_cle_iban) self.Bind(wx.EVT_TEXT, self.OnSaisieRIB, self.ctrl_code_etab) self.Bind(wx.EVT_TEXT, self.OnSaisieRIB, self.ctrl_code_guichet) self.Bind(wx.EVT_TEXT, self.OnSaisieRIB, self.ctrl_numero) self.Bind(wx.EVT_TEXT, self.OnSaisieRIB, self.ctrl_cle_rib) self.Bind(wx.EVT_BUTTON, self.OnBoutonBanques, self.bouton_banques) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioTitulaire, self.radio_membre) self.Bind(wx.EVT_RADIOBUTTON, self.OnRadioTitulaire, self.radio_individu) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide) self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAnnuler, self.bouton_annuler) # Init contrôles self.Importation() self.OnSaisieRIB(None) self.OnRadioTitulaire(None)
def __init__(self, parent): wx.Dialog.__init__(self, parent, -1, style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER | wx.MAXIMIZE_BOX | wx.MINIMIZE_BOX | wx.THICK_FRAME) self.parent = parent # Nom self.staticbox_nom_staticbox = wx.StaticBox(self, -1, _(u"Nom de l'école")) self.label_nom = wx.StaticText(self, -1, _(u"Nom :"), size=(60, -1), style=wx.ALIGN_RIGHT) self.ctrl_nom = wx.TextCtrl(self, -1, u"") # Coords self.staticbox_coords_staticbox = wx.StaticBox(self, -1, _(u"Coordonnées")) self.label_rue = wx.StaticText(self, -1, _(u"Rue :"), size=(60, -1), style=wx.ALIGN_RIGHT) self.ctrl_rue = wx.TextCtrl(self, -1, u"", style=wx.TE_MULTILINE) self.label_ville = wx.StaticText(self, -1, _(u"C.P. :")) self.ctrl_ville = CTRL_Saisie_adresse.Adresse(self) self.label_tel = wx.StaticText(self, -1, _(u"Tél. :")) self.ctrl_tel = CTRL_Saisie_tel.Tel(self, intitule=u"école") self.label_fax = wx.StaticText(self, -1, _(u"Fax. :")) self.ctrl_fax = CTRL_Saisie_tel.Tel(self, intitule=_(u"fax")) self.label_mail = wx.StaticText(self, -1, _(u"Email :")) self.ctrl_mail = CTRL_Saisie_mail.Mail(self) # Secteurs self.staticbox_secteurs_staticbox = wx.StaticBox( self, -1, _(u"Secteurs rattachés")) self.label_secteurs = wx.StaticText(self, -1, _(u"Secteurs :"), size=(60, -1), style=wx.ALIGN_RIGHT) self.ctrl_secteurs = CTRL_Secteurs(self) self.ctrl_secteurs.SetMinSize((-1, 100)) self.bouton_aide = CTRL_Bouton_image.CTRL( self, texte=_(u"Aide"), cheminImage="Images/32x32/Aide.png") self.bouton_ok = CTRL_Bouton_image.CTRL( self, texte=_(u"Ok"), cheminImage="Images/32x32/Valider.png") self.bouton_annuler = CTRL_Bouton_image.CTRL( self, id=wx.ID_CANCEL, texte=_(u"Annuler"), cheminImage="Images/32x32/Annuler.png") self.__set_properties() self.__do_layout() self.Bind(wx.EVT_BUTTON, self.OnBoutonOk, self.bouton_ok) self.Bind(wx.EVT_BUTTON, self.OnBoutonAide, self.bouton_aide)