-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadminScreen.py
80 lines (69 loc) · 2.8 KB
/
adminScreen.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
69
70
71
72
73
74
75
76
77
78
79
80
from tkinter import *
import admin_user
import admin_cashes
import admin_product
def newWindow(new, vendingState):
'''
@params: main
added a new window
if clicked admin pannel will show up
'''
new = Toplevel(new)
new.state("zoomed")
new.title("Vending Admin Pannel")
photo = PhotoImage(file = "public/vending.png")
new.iconphoto(False, photo)
frame = Frame(new, width=1700,height=800,bg="#000000")
frame.place(x=1, y=1)
listbox = Listbox(new, width=130, height=35,bg="#6A6161",fg="#FFFFFF")
listbox.place(x=90,y=60)
def record_of_users():
'''
@params: no
added record button
if clicked users window will be displayed
'''
admin_user.record_of_users(new)
def record_of_cashes():
'''
@params: no
added record button
if clicked cash window will be displayed
'''
admin_cashes.record_of_cashes(new, vendingState)
def record_of_drinks():
'''
@params: no
added drinks button
if clicked drinks window appears
'''
admin_product.record_of_product(new, "Drinks")
def record_of_biscuits():
'''
@params: no
added record button
if clicked biscuits window appear
'''
admin_product.record_of_product(new, "Biscuits")
def record_of_chocolates():
'''
@params: no
added chocolate button
if clicked chocolate window appears
'''
print("chocolate")
admin_product.record_of_product(new, "Chocolates")
def record_of_chips():
'''
@params: no
added record button
if clicked chips window will be displayed
'''
admin_product.record_of_product(new, "Chips")
# buttons on left site bar
Button(frame, text="Users",command=record_of_users,padx=17,border=4,bg="#00FF7F",pady=2,activebackground="#000000",activeforeground="#FFFFFF").place(x=10,y=80)
Button(frame, text="Cashes",command=record_of_cashes,padx=13,border=4,bg="#00FF7F",pady=2,activebackground="#000000",activeforeground="#FFFFFF").place(x=10,y=140)
Button(frame, text="Drinks",command=record_of_drinks,padx=15,border=4,bg="#00FF7F",pady=2,activebackground="#000000",activeforeground="#FFFFFF").place(x=10,y=200)
Button(frame, text="Biscuits",command=record_of_biscuits,padx=11,border=4,bg="#00FF7F",pady=2,activebackground="#000000",activeforeground="#FFFFFF").place(x=10,y=260)
Button(frame, text="Chocolates",command=record_of_chocolates,padx=2,border=4,bg="#00FF7F",pady=2,activebackground="#000000",activeforeground="#FFFFFF").place(x=10,y=320)
Button(frame, text="Chips",command=record_of_chips,padx=16,border=4,bg="#00FF7F",pady=2,activebackground="#000000",activeforeground="#FFFFFF").place(x=10,y=380)