Exemplo n.º 1
0
def ecran_login():
    minitel.efface()

    image = Image.open('Dotclear-logo.png')
    image = image.resize((80,36), Image.ANTIALIAS)
    image_minitel = ImageMinitel(minitel)
    image_minitel.importer(image)
    image_minitel.envoyer(1,1)

    bouton_envoi()

    conteneur = Conteneur(minitel, 1, 13, 40, 4, 'blanc', 'noir')

    labelLogin = Label(minitel, 1, 15, "Nom d'utilisatrice ou d'utilisateur", 'rouge')
    champLogin = DCInput(minitel, 1, 16, 40, 60, envoi_callback = validate_login, update_callback = login_form.updateLogin)

    labelPass = Label(minitel, 1, 18, "Mot de passe", 'rouge')
    champPass = DCInput(minitel, 1, 19, 40, 60, champ_cache=True, envoi_callback = validate_login, update_callback = login_form.updatePassword)


    conteneur.ajoute(labelLogin)
    conteneur.ajoute(champLogin)
    conteneur.ajoute(labelPass)
    conteneur.ajoute(champPass)
    conteneur.affiche()

    conteneur.executer()
Exemplo n.º 2
0
def ecran_write():
    minitel.efface()
    

    minitel.position(1,1)
    minitel.effet(False,False, True)
    minitel.envoyer('Dotclear: nouveau billet')
    minitel.effet(False, False, False)
    
    conteneur = Conteneur(minitel, 1, 3, 40, 4, 'blanc', 'noir')
    labelTitre = Label(minitel, 1, 3, "Titre", 'rouge')
    champTitre = DCInput(minitel, 1, 4, 40, 60, envoi_callback = validate_write, update_callback = post_form.updateTitle)

    labelChapo = Label(minitel, 1, 6, 'Extrait', 'rouge')
    champChapo = DCInput(minitel, 1, 7, 40, 60, envoi_callback = validate_write, update_callback = post_form.updateExtract)

    labelContent = Label(minitel, 1, 9, 'Contenu', 'rouge')
    champContent1 = DCInput(minitel, 1, 10, 40, 40, envoi_callback = validate_write, update_callback = post_form.updateContent1)
    champContent2 = DCInput(minitel, 1, 11, 40, 40, envoi_callback = validate_write, update_callback = post_form.updateContent2)
    champContent3 = DCInput(minitel, 1, 12, 40, 40, envoi_callback = validate_write, update_callback = post_form.updateContent3)
    champContent4 = DCInput(minitel, 1, 13, 40, 40, envoi_callback = validate_write, update_callback = post_form.updateContent4)
    champContent5 = DCInput(minitel, 1, 14, 40, 40, envoi_callback = validate_write, update_callback = post_form.updateContent5)

    conteneur.ajoute(labelTitre)
    conteneur.ajoute(champTitre)
    conteneur.ajoute(labelChapo)
    conteneur.ajoute(champChapo)
    conteneur.ajoute(labelContent)
    conteneur.ajoute(champContent1)
    conteneur.ajoute(champContent2)
    conteneur.ajoute(champContent3)
    conteneur.ajoute(champContent4)
    conteneur.ajoute(champContent5)

    conteneur.affiche()
    
    bouton_envoi()
    conteneur.executer()
Exemplo n.º 3
0
  'Rétablir',
  '-',
  'Aperçu',
  'Imprimer...',
  '-',
  'Fermer',
  'Quitter'
]

labelMenu = Label(minitel, 2, 2, "Menu", 'rouge')
menu = Menu(minitel, options, 9, 1)

labelNom = Label(minitel, 2, 15, "Nom", 'rouge')
champNom = ChampTexte(minitel, 10, 15, 20, 60)

labelPrenom = Label(minitel, 2, 16, "Prénom", 'rouge')
champPrenom = ChampTexte(minitel, 10, 16, 20, 60)

conteneur.ajoute(labelMenu)
conteneur.ajoute(menu)
conteneur.ajoute(labelNom)
conteneur.ajoute(champNom)
conteneur.ajoute(labelPrenom)
conteneur.ajoute(champPrenom)
conteneur.affiche()

conteneur.executer()

minitel.close()