-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainUI.py
104 lines (67 loc) · 3.31 KB
/
MainUI.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import customtkinter as ctk
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("green")
main = ctk.CTk()
main.geometry("650x400")
main.title('Login')
def button_Teacher():
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("green")
app = ctk.CTk()
app.geometry("650x400")
app.title('Authorized_Login')
def button_function():
print("Done")
frame = ctk.CTkFrame(app)
frame.pack(pady=20, padx=60, fill="both", expand=True)
l1=ctk.CTkLabel(master=frame, text="Teacher's Login",font=('Century Gothic', 30))
l1.place(x=50, y=45)
entry1=ctk.CTkEntry(master=frame, width=220, placeholder_text='Username')
entry1.place(x=50, y=110)
entry2=ctk.CTkEntry(master=frame, width=220, placeholder_text='Password', show="*")
entry2.place(x=50, y=165)
button1 = ctk.CTkButton(master=frame, width=220, text="Login", command=button_function, corner_radius=6)
button1.place(x=50, y=240)
app.mainloop()
def button_Student():
window = ctk.CTk()
window.title('Student_Attendance')
window.geometry("650x400")
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("green")
def generate_dataset():
print("Test")
def detect_face():
print("Test")
def train_classifier():
print("Test")
def Excel():
print("Test")
frame = ctk.CTkFrame(window)
frame.pack(pady=10, padx=50, fill="both", expand=True)
label = ctk.CTkLabel(master=frame, text="Student's Login", font=("Century Gothic", 30 ),text_color='white')
label.grid(row=0 , column=0 , sticky='nsew' , pady= 20)
entry1 = ctk.CTkEntry(master=frame, placeholder_text="Student Name", width=150)
entry1.grid(row=1 , column=0 , sticky='ew' , padx = 70 , pady=30)
entry2 = ctk.CTkEntry(master=frame, placeholder_text="Student ID" , width=150)
entry2.grid(row=1 , column=1 , sticky='ew', padx = 20 , pady =30)
button1 = ctk.CTkButton(master=frame, text="Generate Dataset" ,width=220 , font= ("Comic Sans MS",15) , command = generate_dataset , corner_radius=6 )
button1.grid(row=2 , column=0 , sticky='se' , pady = 20)
button2 = ctk.CTkButton(master=frame, text="Detect Face", width=220 , font= ("Comic Sans MS",15 ) , command = detect_face , corner_radius=6)
button2.grid(row=2 , column=1, sticky='s' , pady = 20)
button3 = ctk.CTkButton(master=frame, text="Train Classifier", width=220 , font= ("Comic Sans MS",15) , command = train_classifier , corner_radius=6 )
button3.grid(row=3 , column=0 , sticky='ne' )
button4 = ctk.CTkButton(master=frame, text="View Attendance", width=220 , font= ("Comic Sans MS",15 ) , command = Excel , corner_radius=6)
button4.grid(row=3 , column=1 , sticky='n' , padx = 5)
window.columnconfigure((0,1,2,3) , weight= 1)
window.rowconfigure((0,1,2,3) , weight= 1)
window.mainloop()
frame = ctk.CTkFrame(main)
frame.pack(pady=10, padx=50, fill="both", expand=True)
l1=ctk.CTkLabel(master=frame, text="Select Your Profile",font=('Century Gothic', 30))
l1.place(x=50, y=45)
button1 = ctk.CTkButton(master=frame, width=180, text="Teacher", command=button_Teacher, corner_radius=6)
button1.place(x=50, y=140)
button2 = ctk.CTkButton(master=frame, width=180, text="Student", command=button_Student, corner_radius=6)
button2.place(x=300, y=140)
main.mainloop()