-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDashboard.py
More file actions
221 lines (191 loc) · 8.92 KB
/
Dashboard.py
File metadata and controls
221 lines (191 loc) · 8.92 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
import sys
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
try:
import ttk
py3 = False
except ImportError:
import tkinter.ttk as ttk
py3 = True
from add import *
from issue import *
from Return import *
from view import *
from member import *
from control import *
from renew import *
w = None
def create_Toplevel1(rt):
global w, w_win, root,top
#rt = root
root = rt
w = tk.Toplevel (root)
top = Toplevel1 (w)
init(w, top)
return (w, top)
def destroy_Toplevel1():
global w
w.destroy()
w = None
class Toplevel1(home,issue,Return,view,member,control,renew):
def __init__(self, top=None):
_bgcolor = '#d9d9d9'
_fgcolor = '#000000'
_compcolor = '#d9d9d9'
_ana1color = '#d9d9d9'
_ana2color = '#ececec'
self.style = ttk.Style()
if sys.platform == "win32":
self.style.theme_use('winnative')
self.style.configure('.',background=_bgcolor)
self.style.configure('.',foreground=_fgcolor)
self.style.configure('.',font="TkDefaultFont")
self.style.map('.',background=
[('selected', _compcolor), ('active',_ana2color)])
top.geometry("704x480+352+105")
top.minsize(116, 1)
top.maxsize(1366, 746)
top.resizable(1, 1)
top.title("New Toplevel")
top.configure(background="#d9d9d9")
self.Frame1 = tk.Frame(top)
self.Frame1.place(relx=0.267, rely=0.11, relheight=0.879, relwidth=0.724)
self.Frame1.configure(relief='groove')
self.Frame1.configure(borderwidth="2")
self.Frame1.configure(relief="groove")
self.Frame1.configure(background="#d9d9d9")
greet = Label(self.Frame1)
greet.place(relx=0.314, rely=0.271, height=31, width=174)
greet.configure(background="#d9d9d9")
greet.configure(disabledforeground="#a3a3a3")
greet.configure(font="-family {Poppins Medium} -size 24")
greet.configure(foreground="#000000")
greet.configure(text='''Welcome''')
L = Label(self.Frame1)
L.place(relx=0.200, rely=0.335, height=41, width=294)
L.configure(background="#d9d9d9")
L.configure(disabledforeground="#a3a3a3")
L.configure(font="-family {Segoe UI} -size 10")
L.configure(foreground="#000000")
L.configure(text='''Manage your library easily and efficiently''')
self.Button1 = tk.Button(top)
self.Button1.place(relx=0.028, rely=0.125, height=44, width=127)
self.Button1.configure(activebackground="#ececec")
self.Button1.configure(activeforeground="#000000")
self.Button1.configure(background="#000000")
self.Button1.configure(disabledforeground="#a3a3a3")
self.Button1.configure(font="-family {Poppins SemiBold} -size 13 -weight bold")
self.Button1.configure(foreground="#ffffff")
self.Button1.configure(highlightbackground="#d9d9d9")
self.Button1.configure(highlightcolor="black")
self.Button1.configure(pady="0")
self.Button1.configure(command=self.addBooks)
self.Button1.configure(text='''Add Book''')
self.Button1_1 = tk.Button(top)
self.Button1_1.place(relx=0.028, rely=0.25, height=44, width=127)
self.Button1_1.configure(activebackground="#ececec")
self.Button1_1.configure(activeforeground="#000000")
self.Button1_1.configure(background="#000000")
self.Button1_1.configure(disabledforeground="#a3a3a3")
self.Button1_1.configure(font="-family {Poppins SemiBold} -size 13 -weight bold")
self.Button1_1.configure(foreground="#ffffff")
self.Button1_1.configure(highlightbackground="#d9d9d9")
self.Button1_1.configure(highlightcolor="black")
self.Button1_1.configure(pady="0")
self.Button1_1.configure(command=self.issueBooks)
self.Button1_1.configure(text='''Issue Book''')
self.Button1_2 = tk.Button(top)
self.Button1_2.place(relx=0.028, rely=0.375, height=44, width=127)
self.Button1_2.configure(activebackground="#ececec")
self.Button1_2.configure(activeforeground="#000000")
self.Button1_2.configure(background="#000000")
self.Button1_2.configure(disabledforeground="#a3a3a3")
self.Button1_2.configure(font="-family {Poppins SemiBold} -size 13 -weight bold")
self.Button1_2.configure(foreground="#ffffff")
self.Button1_2.configure(highlightbackground="#d9d9d9")
self.Button1_2.configure(highlightcolor="black")
self.Button1_2.configure(pady="0")
self.Button1_2.configure(text='''Renew Book''')
self.Button1_2.configure(command=self.renewBooks)
self.Button1_3 = tk.Button(top)
self.Button1_3.place(relx=0.028, rely=0.5, height=44, width=127)
self.Button1_3.configure(activebackground="#ececec")
self.Button1_3.configure(activeforeground="#000000")
self.Button1_3.configure(background="#000000")
self.Button1_3.configure(disabledforeground="#a3a3a3")
self.Button1_3.configure(font="-family {Poppins SemiBold} -size 13 -weight bold")
self.Button1_3.configure(foreground="#ffffff")
self.Button1_3.configure(highlightbackground="#d9d9d9")
self.Button1_3.configure(highlightcolor="black")
self.Button1_3.configure(pady="0")
self.Button1_3.configure(command=self.returnBooks)
self.Button1_3.configure(text='''Return Book''')
self.Button1_4 = tk.Button(top)
self.Button1_4.place(relx=0.028, rely=0.625, height=44, width=127)
self.Button1_4.configure(activebackground="#ececec")
self.Button1_4.configure(activeforeground="#000000")
self.Button1_4.configure(background="#000000")
self.Button1_4.configure(disabledforeground="#a3a3a3")
self.Button1_4.configure(font="-family {Poppins SemiBold} -size 13 -weight bold")
self.Button1_4.configure(foreground="#ffffff")
self.Button1_4.configure(highlightbackground="#d9d9d9")
self.Button1_4.configure(highlightcolor="black")
self.Button1_4.configure(pady="0")
self.Button1_4.configure(command=self.viewBooks)
self.Button1_4.configure(text='''Search Book''')
self.Canvas1 = tk.Canvas(top)
self.Canvas1.place(relx=-0.017, rely=-0.023, relheight=0.119
, relwidth=1.038)
self.Canvas1.configure(background="#000000")
self.Canvas1.configure(borderwidth="2")
self.Canvas1.configure(insertbackground="black")
self.Canvas1.configure(relief="ridge")
self.Canvas1.configure(selectbackground="blue")
self.Canvas1.configure(selectforeground="white")
self.Message1 = tk.Message(self.Canvas1)
self.Message1.place(relx=0.178, rely=0.351, relheight=0.404
, relwidth=0.726)
self.Message1.configure(background="#000000")
self.Message1.configure(font="-family {Poppins Medium} -size 16 -weight bold")
self.Message1.configure(foreground="#ffffff")
self.Message1.configure(highlightbackground="#d9d9d9")
self.Message1.configure(highlightcolor="black")
self.Message1.configure(text='''Library Management System''')
self.Message1.configure(width=531)
self.Button1_5 = tk.Button(top)
self.Button1_5.place(relx=0.028, rely=0.75, height=44, width=127)
self.Button1_5.configure(activebackground="#ececec")
self.Button1_5.configure(activeforeground="#000000")
self.Button1_5.configure(background="#000000")
self.Button1_5.configure(disabledforeground="#a3a3a3")
self.Button1_5.configure(font="-family {Poppins SemiBold} -size 13 -weight bold")
self.Button1_5.configure(foreground="#ffffff")
self.Button1_5.configure(highlightbackground="#d9d9d9")
self.Button1_5.configure(highlightcolor="black")
self.Button1_5.configure(pady="0")
self.Button1_5.configure(command=self.memberDetails)
self.Button1_5.configure(text='''Members''')
self.Button1_5_1 = tk.Button(top)
self.Button1_5_1.place(relx=0.028, rely=0.875, height=44, width=127)
self.Button1_5_1.configure(activebackground="#ececec")
self.Button1_5_1.configure(activeforeground="#000000")
self.Button1_5_1.configure(background="#000000")
self.Button1_5_1.configure(disabledforeground="#a3a3a3")
self.Button1_5_1.configure(font="-family {Poppins SemiBold} -size 13 -weight bold")
self.Button1_5_1.configure(foreground="#ffffff")
self.Button1_5_1.configure(highlightbackground="#d9d9d9")
self.Button1_5_1.configure(highlightcolor="black")
self.Button1_5_1.configure(pady="0")
self.Button1_5_1.configure(command=self.adminControl)
self.Button1_5_1.configure(text='''Controls''')
def init(top, gui):
global w, top_level, root
w = gui
top_level = top
root = top
def destroy_window():
global top_level
top_level.destroy()
top_level = None