-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathhelpsupport.py
More file actions
114 lines (81 loc) · 4.47 KB
/
Copy pathhelpsupport.py
File metadata and controls
114 lines (81 loc) · 4.47 KB
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
105
106
107
108
109
110
111
112
113
114
from tkinter import*
from PIL import Image,ImageTk
import webbrowser
class Helpsupport:
def __init__(self,root):
self.root=root
self.root.geometry("1250x700+0+0")
self.root.title("Hệ thống quản lý điểm danh sử dụng nhận dạng khuôn mặt")
# This part is image labels setting start
# first header image
img=Image.open(r"D:\VKU\STEM\Python-FYP-Face-Recognition-Attendence-System\Images_GUI\banner.jpg")
img=img.resize((1250,120),Image.ANTIALIAS)
self.photoimg=ImageTk.PhotoImage(img)
# set image as lable
f_lb1 = Label(self.root,image=self.photoimg)
f_lb1.place(x=0,y=0,width=1250,height=120)
# backgorund image
bg1=Image.open(r"D:\VKU\STEM\Python-FYP-Face-Recognition-Attendence-System\Images_GUI\bg4.png")
bg1=bg1.resize((1250,768),Image.ANTIALIAS)
self.photobg1=ImageTk.PhotoImage(bg1)
# set image as lable
bg_img = Label(self.root,image=self.photobg1)
bg_img.place(x=0,y=130,width=1250,height=768)
#title section
title_lb1 = Label(bg_img,text="Hỗ Trợ",font=("verdana",30,"bold"),bg="white",fg="navyblue")
title_lb1.place(x=0,y=0,width=1366,height=45)
# Create buttons below the section
# -------------------------------------------------------------------------------------------------------------------
# student button 1
std_img_btn=Image.open(r"D:\VKU\STEM\Python-FYP-Face-Recognition-Attendence-System\Images_GUI\web.png")
std_img_btn=std_img_btn.resize((180,180),Image.ANTIALIAS)
self.std_img1=ImageTk.PhotoImage(std_img_btn)
std_b1 = Button(bg_img,command=self.website,image=self.std_img1,cursor="hand2")
std_b1.place(x=250,y=200,width=180,height=180)
std_b1_1 = Button(bg_img,command=self.website,text="Website",cursor="hand2",font=("tahoma",15,"bold"),bg="white",fg="navyblue")
std_b1_1.place(x=250,y=380,width=180,height=45)
# Detect Face button 2
det_img_btn=Image.open(r"D:\VKU\STEM\Python-FYP-Face-Recognition-Attendence-System\Images_GUI\fb.png")
det_img_btn=det_img_btn.resize((180,180),Image.ANTIALIAS)
self.det_img1=ImageTk.PhotoImage(det_img_btn)
det_b1 = Button(bg_img,command=self.facebook,image=self.det_img1,cursor="hand2",)
det_b1.place(x=480,y=200,width=180,height=180)
det_b1_1 = Button(bg_img,command=self.facebook,text="Facebook",cursor="hand2",font=("tahoma",15,"bold"),bg="white",fg="navyblue")
det_b1_1.place(x=480,y=380,width=180,height=45)
# Attendance System button 3
att_img_btn=Image.open(r"D:\VKU\STEM\Python-FYP-Face-Recognition-Attendence-System\Images_GUI\yt.png")
att_img_btn=att_img_btn.resize((180,180),Image.ANTIALIAS)
self.att_img1=ImageTk.PhotoImage(att_img_btn)
att_b1 = Button(bg_img,command=self.youtube,image=self.att_img1,cursor="hand2",)
att_b1.place(x=710,y=200,width=180,height=180)
att_b1_1 = Button(bg_img,command=self.youtube,text="Youtube",cursor="hand2",font=("tahoma",15,"bold"),bg="white",fg="navyblue")
att_b1_1.place(x=710,y=380,width=180,height=45)
# Help Support button 4
hlp_img_btn=Image.open(r"D:\VKU\STEM\Python-FYP-Face-Recognition-Attendence-System\Images_GUI\gmail.png")
hlp_img_btn=hlp_img_btn.resize((180,180),Image.ANTIALIAS)
self.hlp_img1=ImageTk.PhotoImage(hlp_img_btn)
hlp_b1 = Button(bg_img,command=self.gmail,image=self.hlp_img1,cursor="hand2",)
hlp_b1.place(x=940,y=200,width=180,height=180)
hlp_b1_1 = Button(bg_img,command=self.gmail,text="Gmail",cursor="hand2",font=("tahoma",15,"bold"),bg="white",fg="navyblue")
hlp_b1_1.place(x=940,y=380,width=180,height=45)
# create function for button
def website(self):
self.new = 1
self.url = "http://www.stemsquare.vn/"
webbrowser.open(self.url,new=self.new)
def facebook(self):
self.new = 1
self.url = "https://www.facebook.com/stemsquare"
webbrowser.open(self.url,new=self.new)
def youtube(self):
self.new = 1
self.url = "https://www.youtube.com/channel/UCzmueccz-WuanzMaJ1ds1Tg"
webbrowser.open(self.url,new=self.new)
def gmail(self):
self.new = 1
self.url = "https://www.gmail.com"
webbrowser.open(self.url,new=self.new)
if __name__ == "__main__":
root=Tk()
obj=Helpsupport(root)
root.mainloop()