-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
29 lines (24 loc) · 1.11 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import PySimpleGUI as sg
import new_record, list_records, del_records, stats, table_map
layout = [
[sg.Button("Foglalás rögzítése", key="-NEW-", expand_y=True, expand_x=True, font=("Arial", 14)), ],
[sg.Button("Foglalás törlése", key="-DEL-", expand_y=True, expand_x=True, font=("Arial", 14)), ],
[sg.Button("Foglalások listája", key="-LIST-", expand_y=True, expand_x=True, font=("Arial", 14)), ],
[sg.Button("Asztaltérkép", key="-TABLEMAP-", expand_y=True, expand_x=True, font=("Arial", 14)), ],
[sg.Button("Statisztika", key="-STAT-", expand_y=True, expand_x=True, font=("Arial", 14)), ],
[sg.Button("Kilépés", key="-EXIT-", expand_y=True, expand_x=True, font=("Arial", 14)), ],
]
window = sg.Window('Foglalás - MENÜ', layout, resizable=True, size=(200, 270))
window.finalize()
window.set_min_size((200, 270))
while True:
event, values = window.read()
print(event, values)
match event:
case "-NEW-": new_record.run()
case "-DEL-": del_records.run()
case "-LIST-": list_records.run()
case "-TABLEMAP-": table_map.run()
case "-STAT-": stats.run()
case sg.WIN_CLOSED | "-EXIT-": break
window.close()