v0.2
Sauvegarde du 09/04/2020
This commit is contained in:
parent
df7309284c
commit
276edc9dad
5 changed files with 37 additions and 2 deletions
1
main.pyw
1
main.pyw
|
@ -14,4 +14,5 @@ for file in os.listdir(PATH_MODULE): # On cherche les modules dans leur dossier
|
|||
exec(module.read()) # On les executes
|
||||
|
||||
|
||||
|
||||
mainloop() # On "active" la fênetre
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class display():
|
||||
def __init__(self):
|
||||
def __init__(self): # Cette fonction est automatiquement éxécuter lors de la création de l'objet
|
||||
self.frame = LabelFrame(Fen, text = "Display") # On créer une sous-fenêtre
|
||||
self.frame.grid(row = 1, column = 1, sticky = "NEWS") # On l'affiche
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
class safe():
|
||||
def __init__(self): # Cette fonction est automatiquement éxécuter lors de la création de l'objet
|
||||
self.frame = LabelFrame(Fen, text = "Safe") # On créer une sous-fenêtre
|
||||
self.frame.grid(row = 1, column = 3, sticky = "NEWS") # On l'affiche
|
||||
|
||||
self.label = Label(self.frame, text = "", background = "lightgray", relief = SUNKEN, width = 2, height = 1) # On créer la led
|
||||
self.label.grid(row = 1, column = 1)
|
||||
|
||||
self.scale = Scale(self.frame, from_ = 1, to_ = 4, orient = HORIZONTAL) # On créer un scroller pour sélectionner une valeur entre 1 et 4
|
||||
self.scale.grid(row = 2, column = 1)
|
||||
|
||||
classModule["safe"] = safe()
|
|
@ -0,0 +1,22 @@
|
|||
class simon():
|
||||
def __init__(self): # Cette fonction est automatiquement éxécuter lors de la création de l'objet
|
||||
self.frame = LabelFrame(Fen, text = "Simon") # On créer une sous-fenêtre
|
||||
self.frame.grid(row = 2, column = 1, sticky = "NEWS") # On l'affiche
|
||||
|
||||
self.dico_but = {} # On créer un dictionnaire qui va contenir les objets bouttons.
|
||||
|
||||
self.dico_but["Up"] = Button(self.frame, text = "", background = "lightgreen", width = 2, height = 1) # On créer le boutton du haut
|
||||
self.dico_but["Up"].grid(row = 2, column = 2)
|
||||
|
||||
self.dico_but["Left"] = Button(self.frame, text = "", background = "lightblue", width = 2, height = 1) # On créer le boutton à gauche
|
||||
self.dico_but["Left"].grid(row = 3, column = 1)
|
||||
|
||||
self.dico_but["Right"] = Button(self.frame, text = "", background = "indianred", width = 2, height = 1) # On créer le boutton à droite
|
||||
self.dico_but["Right"].grid(row = 3, column = 3)
|
||||
|
||||
self.dico_but["Down"] = Button(self.frame, text = "", background = "lightyellow", width = 2, height = 1) # On créer le boutton en bas
|
||||
self.dico_but["Down"].grid(row = 4, column = 2)
|
||||
|
||||
|
||||
|
||||
classModule["simon"] = simon()
|
|
@ -1,5 +1,5 @@
|
|||
class wire():
|
||||
def __init__(self):
|
||||
def __init__(self): # Cette fonction est automatiquement éxécuter lors de la création de l'objet
|
||||
self.frame = LabelFrame(Fen, text = "Wire") # On créer une sous-fenêtre
|
||||
self.frame.grid(row = 1, column = 2, sticky = "NEWS") # On l'affiche
|
||||
|
||||
|
|
Loading…
Reference in a new issue