-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathapp.py
57 lines (41 loc) · 1.84 KB
/
app.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
import sys
from tkinter import *
from windows import loading, login_win
from PIL import Image, ImageTk
l = loading.loading()
# making the mainwindow
class gui(Tk):
def __init__(self):
super().__init__()
self.minsize(width=1200, height=700)
# self.state("zoomed")
self.geometry("1400x790+60+10")
self.resizable(False, False)
self.title("Student Management System")
self.iconbitmap("Images/student_icon.ico")
self.load_images()
self.img_list = [self.img1, self.img2, self.img3, self.img4,
self.img5, self.img6, self.img7, self.img8, self.img9]
login_win.login(self, self.img_list)
def load_images(self):
self.img1 = Image.open("Images/back_img.png").resize((1400, 790))
self.img1 = ImageTk.PhotoImage(self.img1)
self.img2 = Image.open("Images/login.png").resize((140, 100))
self.img2 = ImageTk.PhotoImage(self.img2)
self.img3 = Image.open("Images/reset.png").resize((40, 40)).rotate(270)
self.img3 = ImageTk.PhotoImage(self.img3)
self.img4 = Image.open("Images/home.png").resize((30, 30))
self.img4 = ImageTk.PhotoImage(self.img4)
self.img5 = Image.open("Images/Superadmin.png").resize((200, 200))
self.img5 = ImageTk.PhotoImage(self.img5)
self.img6 = Image.open("Images/admin.png").resize((90, 90))
self.img6 = ImageTk.PhotoImage(self.img6)
self.img7 = Image.open("Images/search.png").resize((30, 30))
self.img7 = ImageTk.PhotoImage(self.img7)
self.img8 = Image.open("Images/faculty.png").resize((200, 200))
self.img8 = ImageTk.PhotoImage(self.img8)
self.img9 = Image.open("Images/student.png").resize((130, 130))
self.img9 = ImageTk.PhotoImage(self.img9)
if __name__ == "__main__":
g = gui()
g.mainloop()