-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain copy.py
73 lines (56 loc) · 3.2 KB
/
main copy.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
from tkinter import *
from PIL import ImageTk, Image
import adminlogin,receplogin,doclogin
class LoginPage:
def __init__(self, window):
self.window = window
self.window.geometry('1366x768')
self.window.resizable(0, 0)
self.window.title('Login Page')
# ========================================================================
# ============================background image============================
# ========================================================================
self.bg_frame = Image.open('./images/main.png')
photo = ImageTk.PhotoImage(self.bg_frame)
self.bg_panel = Label(self.window, image=photo)
self.bg_panel.image = photo
self.bg_panel.place(width=1366,height=768)
# ========================================================================
# ============================admin button================================
# ========================================================================
def adminf():
self.window.destroy()
adminlogin.page()
self.admin = Button(self.window, text='ADMIN', font=("gotham", 13, "bold"), width=22, bd=0,
bg='#3047ff', cursor='hand2', activebackground='#3047ff', fg='white',command=adminf)
self.admin.place(relx=0.58, rely=0.45)
# ========================================================================
# ============================doc button================================
# ========================================================================
def docf():
self.window.destroy()
doclogin.page()
self.doc = Button(self.window, text='DOCTOR', font=("gotham", 13, "bold"), width=22, bd=0,
bg='#3047ff', cursor='hand2', activebackground='#3047ff', fg='white',command=docf)
self.doc.place(relx=0.58, rely=0.55)
# ========================================================================
# ============================recep button================================
# ========================================================================
def recepf():
self.window.destroy()
receplogin.page()
self.recep = Button(self.window, text='RECEPTIONIST', font=("gotham", 13, "bold"), width=22, bd=0,
bg='#3047ff', cursor='hand2', activebackground='#3047ff', fg='white',command=recepf)
self.recep.place(relx=0.58, rely=0.645)
#=========== EXIT ==================================================
def exitf():
self.window.destroy()
self.back_button_label = Button(self.window, text=">> Exit <<", font=("yu gothic ui", 13, "bold"), bg='black', cursor="hand2",
borderwidth=0, background="#040405", activebackground="black", fg="white",command=exitf)
self.back_button_label.place(relx=0.565, rely=0.72, width=300, height=25)
def page():
window = Tk()
LoginPage(window)
window.mainloop()
if __name__ == '__main__':
page()