Commit a400222aaab534cbfebeae02f04ab555e8de6825
1 parent
648e6a93
deut application
Showing
1 changed file
with
61 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,61 @@ |
1 | +""" | |
2 | +Created on Thu Jan 11 15:22:56 2018 | |
3 | +@author: Robin Cavalieri | |
4 | +IMA5SC - PFE 2018 | |
5 | +P32 - Détection automatique de DoS sur réseau LoRa | |
6 | +Main - prédictions, affichage, vérification du trafic | |
7 | +""" | |
8 | +############################################################################### | |
9 | +#LIBRAIRIES UTILES | |
10 | +############################################################################### | |
11 | +import tkinter as tkr; | |
12 | +import time; | |
13 | +############################################################################### | |
14 | + | |
15 | +############################################################################### | |
16 | +#FONCTIONS UTILES | |
17 | +############################################################################### | |
18 | +def Draw(): | |
19 | + #FRAME INFORMATIONS | |
20 | + infos=tkr.Frame(root,width=1000,height=5000,relief='groove',background='white',bd=3); | |
21 | + infos.place(x=10,y=10); | |
22 | + #DATE - HEURE | |
23 | + global text; | |
24 | + text=tkr.Label(infos,text='HELLO'); | |
25 | + text.config(font=('arial', 20, 'bold')); | |
26 | + text.config(bg='white', fg='black'); | |
27 | + text.pack(); | |
28 | + global ping; | |
29 | + ping=tkr.Label(infos,text='\n\nPING(ms) : '); | |
30 | + ping.config(font=('arial', 20, 'bold')); | |
31 | + ping.config(bg='white', fg='black'); | |
32 | + ping.pack(); | |
33 | + global rssi; | |
34 | + rssi=tkr.Label(infos,text='\n\nRSSI(dBm) :'); | |
35 | + rssi.config(font=('arial', 20, 'bold')); | |
36 | + rssi.config(bg='white', fg='black'); | |
37 | + rssi.pack(); | |
38 | + global trame; | |
39 | + trame=tkr.Label(infos,text='\n\nTrame :'); | |
40 | + trame.config(font=('arial', 20, 'bold')); | |
41 | + trame.config(bg='white', fg='black'); | |
42 | + trame.pack(); | |
43 | + | |
44 | + #FRAME CHART | |
45 | + chart=tkr.Frame(root,width=985,height=530,relief='groove',background='white',bd=3); | |
46 | + chart.place(x=370,y=10); | |
47 | + | |
48 | + #PIED DE PAGE | |
49 | + footer=tkr.Frame(root,width=1350,height=150,relief='groove',background='white',bd=3); | |
50 | + footer.place(x=10,y=550); | |
51 | + | |
52 | +def Refresher(): | |
53 | + global text; | |
54 | + text.configure(text=time.asctime()); | |
55 | + root.after(1000, Refresher);#Refresh toutes les secondes | |
56 | + | |
57 | +root=tkr.Tk(); | |
58 | +Draw(); | |
59 | +Refresher(); | |
60 | +root.mainloop(); | |
61 | +############################################################################### | |
0 | 62 | \ No newline at end of file | ... | ... |