|
|
|
@ -109,7 +109,14 @@ def lancerTest(): |
|
|
|
affichageResultats.configure(text="La consommation électrique devrait être d'environ " + str(ConsoMoy) +"MW") |
|
|
|
|
|
|
|
def changeDistance(): |
|
|
|
print("e") |
|
|
|
global DistanceEuclidienne |
|
|
|
if DistanceEuclidienne: |
|
|
|
boutonDistance.config(text='Distance de Manhattan') |
|
|
|
else: |
|
|
|
boutonDistance.config(text='Distance euclidienne') |
|
|
|
DistanceEuclidienne = not DistanceEuclidienne |
|
|
|
|
|
|
|
DistanceEuclidienne = False |
|
|
|
|
|
|
|
fenetre = tk.Tk() |
|
|
|
fenetre['bg'] = "snow" |
|
|
|
@ -157,11 +164,11 @@ canvaRecup.grid(row = 9, columnspan = 2) |
|
|
|
|
|
|
|
boutonRecup = tk.Button(fenetre, command = lancerTest, bg = 'snow',text='Valider', |
|
|
|
cursor='hand2') |
|
|
|
boutonRecup.grid(row = 10) |
|
|
|
boutonRecup.grid(row = 10,column = 1) |
|
|
|
|
|
|
|
boutonDistance = tk.Button(fenetre, command = changeDistance, text="Distance de Manhattan" |
|
|
|
,bg='snow',cursor='hand2') |
|
|
|
boutonDistance.grid(row=10, column=1) |
|
|
|
boutonDistance.grid(row=10, column=0) |
|
|
|
|
|
|
|
affichageResultats = tk.Label(fenetre, bg='snow', text='',font='TkDefaultFont 8 bold') #J'ai du chercher parce qu'on ne peut |
|
|
|
affichageResultats.grid(row=11) |
|
|
|
|