-
Notifications
You must be signed in to change notification settings - Fork 0
/
smartkey.py
42 lines (32 loc) · 1.07 KB
/
smartkey.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
import tkinter as tk
from resources.button_panel import ButtonPanel
from resources.smartdatabase import SmartKeyDatabase
class App:
def __init__(
self,
):
self.root = tk.Tk()
self.root.title("SmartKey")
self.root.minsize(750, 600)
# DATABASE
smart_key_db = SmartKeyDatabase()
smart_key_db.create_table()
try:
smart_key_db.add_admin_user()
except Exception:
error_label = tk.Label(
self.root,
text="Dogodila se greska sa databazom".upper(),
fg="red",
font=("System", 20),
)
error_label.pack()
else:
# BUTTONS PANEL
self.buttons_panel = tk.LabelFrame(self.root, text="Buttons Panel")
self.button_frame = ButtonPanel(self.buttons_panel, self.root)
self.button_frame.frame.pack(fill="both", expand=True)
self.buttons_panel.pack(expand=True, fill="x", side="top")
if __name__ == "__main__":
app = App()
app.root.mainloop()