-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.py
68 lines (52 loc) · 1.37 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 os
from tkinter import *
from tkinter import messagebox
main = Tk()
main.geometry("1366x768")
main.title("Billing System")
main.resizable(0, 0)
def Exit():
sure = messagebox.askyesno("Exit","Are you sure you want to exit?", parent=main)
if sure == True:
main.destroy()
main.protocol("WM_DELETE_WINDOW", Exit)
def emp():
main.withdraw()
os.system("python employee.py")
main.deiconify()
def adm():
main.withdraw()
os.system("python admin.py")
main.deiconify()
label1 = Label(main)
label1.place(relx=0, rely=0, width=1366, height=768)
img = PhotoImage(file="./images/main.png")
label1.configure(image=img)
button1 = Button(main)
button1.place(relx=0.316, rely=0.446, width=146, height=90)
img2 = PhotoImage(file="./images/1.png")
button1.configure(
relief="flat",
cursor="hand2",
activebackground="#fff",
foreground="#fff",
background="#fff",
borderwidth="0",
image=img2,
command=emp
)
button2 = Button(main)
button2.place(relx=0.566, rely=0.448, width=146, height=90)
img3 = PhotoImage(file="./images/2.png")
button2.configure(
relief="flat",
overrelief="flat",
activebackground="#ffffff",
cursor="hand2",
foreground="#ffffff",
background="#ffffff",
borderwidth="0",
image=img3,
command=adm,
)
main.mainloop()