-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI.py
More file actions
187 lines (125 loc) · 5.49 KB
/
GUI.py
File metadata and controls
187 lines (125 loc) · 5.49 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
import tkinter as tk
from tkinter import messagebox
from tkinter import ttk
from tkinter import *
from PIL import ImageTk, Image
def notlar():
not_penceresi = tk.Tk()
not_penceresi.geometry("1024x700")
label=tk.Label(not_penceresi,text="Dönem")
label.place(x=10,y=5)
def combobox_degisim(event):
secili_deger=combox1.get()
print("Seçili deger:",secili_deger)
deger=tk.StringVar()
deger.set("Donem Seç")
secenekler=("2025-Güz","2025-Bahar")
combox1=ttk.Combobox(not_penceresi,values=secenekler,textvariable=deger)
combox1.bind("<<ComboboxSelected>>",combobox_degisim)
combox1.place(x=65,y=5)
frame =ttk.Frame(not_penceresi)
frame.pack(fill=tk.BOTH, expand=True, padx=10, pady=20)
not_tablosu = ttk.Treeview(not_penceresi,columns=("Şb","Ders Kodu","Ders Adı","Sonuç Durumu","Sınav Notları","Ort","Not","Durumu"),show="headings")
not_tablosu.heading("Şb",text="Şb")
not_tablosu.heading("Ders Kodu",text="Ders Kodu")
not_tablosu.heading("Ders Adı",text="Ders Adı")
not_tablosu.heading("Sonuç Durumu",text="Sonuç Durumu")
not_tablosu.heading("Sınav Notları",text="Sınav Notları")
not_tablosu.heading("Ort",text="Ort")
not_tablosu.heading("Not",text="Not")
not_tablosu.heading("Durumu",text="Durumu")
not_tablosu.column("Şb",width=80)
not_tablosu.column("Ders Kodu",width=100)
not_tablosu.column("Ders Adı",width=150)
not_tablosu.column("Sonuç Durumu",width=120)
not_tablosu.column("Sınav Notları",width=150)
not_tablosu.column("Ort",width=80)
not_tablosu.column("Not",width=80)
not_tablosu.column("Durumu",width=100)
not_tablosu.pack(fill=tk.BOTH, expand=False,padx=20,pady=20)
not_tablosu.place(x=80,y=50)
not_penceresi.mainloop()
def devamsizlik():
pass
def Ayarlar():
pass
def Ogrenci_Ekrani():
ogrenci_sayfa = tk.Tk()
ogrenci_sayfa.geometry("1024x700")
ogrenci_sayfa.resizable(width=False,height=False)
ogrenci_sayfa.title("ögrenci sayfası")
ogrenci_sayfa.iconbitmap("profile.png")
profile_icon = ImageTk.PhotoImage(Image.open('resources/profile.png'))
profile_icon.height=30
profile_icon.width=30
if profile_icon:
label=tk.Label(ogrenci_sayfa,image=profile_icon)
label.place(x=5,y=30)
graduation_icon =ImageTk.PhotoImage(Image.open('resources/graduation-cap.png'))
if graduation_icon:
label2=tk.Label(ogrenci_sayfa,image=graduation_icon)
label2.place(x=800,y=20)
menu_bar = Menu(ogrenci_sayfa)
ogrenci_sayfa.config(menu=menu_bar)
settings_icon=ImageTk.PhotoImage(Image.open('resources/settings.png'))
settings_icon.height=5
settings_icon.width=5
#menu_icon=ImageTk.PhotoImage(Image.open('menu-burger.png'))
quit_icon=ImageTk.PhotoImage(Image.open('resources/exit.png'))
dosya_menu = Menu(menu_bar, tearoff=0)
menu_bar.add_cascade(label="Genel İşlemler", menu=dosya_menu,underline=0)
dosya_menu.add_command(label="Ayarlar",command=Ayarlar,underline=0,image=settings_icon,compound=tk.LEFT)
dosya_menu.add_separator()
dosya_menu.add_command(label="Çıkış", command=ogrenci_sayfa.destroy,underline=0,image=quit_icon,compound=tk.LEFT)
yeni_menu = Menu(menu_bar,tearoff=0,background="#B0C4DE")
menu_bar.add_cascade(label="Ders ve Dönem İşlemleri",menu=yeni_menu,foreground="Red")
yeni_menu.add_command(label="Not Listesi",command=notlar)
yeni_menu.add_command(label="Devamsızlık Bilgisi",command=devamsizlik)
label = tk.Label(ogrenci_sayfa,text="")
label.pack(expand=NO,fill=BOTH)
#file_menu.add_command(label="Exit",command=ogrenci_sayfa.destroy())
not_listesi=ttk.Frame(ogrenci_sayfa,width=6)
tablo = ttk.Treeview(not_listesi)
tablo.pack()
ogrenci_sayfa.mainloop()
def giris():
ogrenci_no= ogr_no_entry.get()
sifre = sifre_entry.get()
print(ogrenci_no,sifre)
if sifre == "":
Login_ekrani.destroy() # kullanici_verileri[ogrenci_no]
Ogrenci_Ekrani()
else:
print("Erorr")
Login_ekrani = tk.Tk()
Login_ekrani.geometry("550x350+500+300")
Login_ekrani.resizable(width=False,height=False)
Login_ekrani.title("Ögrenci Bilgi Sistemi")
try:
bg = ImageTk.PhotoImage(Image.open('resources/background.jpg'))
bg.width=400
bg.height=550
except:
print("Hata,not file")
if bg:
label = tk.Label(Login_ekrani,image=bg)
label.place(x=0,y=0)
label1 = tk.Label(Login_ekrani,text="Ögrenci Numarası:",fg="Black",bg="#9E9E9E")
label1.place(x=95,y=150)
label2 = tk.Label(Login_ekrani,text="Şifre:",fg="Black",bg="#9E9E9E")
label2.place(x=95,y=200)
giris_button = tk.Button(Login_ekrani,text="Giriş",background="#00ffff",activebackground="#7FFF00",command=giris,padx=5,pady=-2)
giris_button.place(x=282,y=230)
ogr_no_entry = ttk.Entry(Login_ekrani) #placeholder="ögrenci No..")
ogr_no_entry.place(x=200,y=150)
sifre_entry = ttk.Entry(Login_ekrani)
sifre_entry.place(x=200,y=200)
sifre_entry.config(show="*")
#sifre_entry.insert(0,'Sifre')
profile_icon = ImageTk.PhotoImage(Image.open('resources/profile.png'))
profile_icon.height=30
profile_icon.width=30
if profile_icon:
label=tk.Label(Login_ekrani,image=profile_icon)
label.place(x=200,y=10)
Login_ekrani.mainloop()