-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
68 lines (60 loc) · 1.85 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import customtkinter as tk
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
from PIL import Image, ImageTk
a = tk
b = ttk
from my_package123 import *
window = tk.CTk()
m = "Monkey D Luffy"
placename = " "
def username_entry(u):
global m
m = u
print(m)
# def destroy_all_widgets():
# for widget in window.winfo_children():
# widget.destroy()
# def returnop(h,placename=""):
# if h == "Flight":
# destroy_all_widgets()
# booking.book(a,b,window,returnop,m,placename)
# if h == "Cust":
# destroy_all_widgets()
# cust.customer(a,b,window,returnop)
# if h == "Dash":
# destroy_all_widgets()
# dashboard.dashboardop(a,b,window,returnop,m)
# if h == "Map":
# destroy_all_widgets()
# explore.exploreop(a,b,window,returnop,m)
# dashboard.dashboardop(a,b,window,returnop,m)
def destroy_all_widgets():
for widget in window.winfo_children():
widget.destroy()
def return_handling(h):
print(h)
if h == "signin":
destroy_all_widgets()
signin.signop(a,b,window,return_handling,username_entry)
elif h == "login":
destroy_all_widgets()
login.loginop(a,b,window,return_handling,username_entry)
elif h == "dashboard":
destroy_all_widgets()
def returnop(h,placename=" "):
if h == "Flight":
destroy_all_widgets()
booking.book(a,b,window,returnop,m,placename)
if h == "Cust":
destroy_all_widgets()
cust.customer(a,b,window,returnop)
if h == "Dash":
destroy_all_widgets()
dashboard.dashboardop(a,b,window,returnop,m)
if h == "Map":
destroy_all_widgets()
explore.exploreop(a,b,window,returnop,m)
dashboard.dashboardop(a,b,window,returnop,m)
login.loginop(a,b,window,return_handling,username_entry)
window.mainloop()