-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (24 loc) · 969 Bytes
/
Copy pathmain.py
File metadata and controls
30 lines (24 loc) · 969 Bytes
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
import mysql.connector
from tkinter import Tk
from config import Config
from database.connection import get_connection # Certifique-se de que get_connection está em um arquivo chamado db.py
from view.login_view import LoginView
from view.home_secretary_view import SecretaryView
from controller.home_secretary_controller import SecretaryController
from utils.window_utils import center_window
from utils.styles import BACKGROUND_COLOR
if __name__ == "__main__":
# Conecta ao banco
conn = get_connection()
# Cria a janela principal
root = Tk()
root.resizable(False, False)
center_window(root, 1400, 900) # Define o tamanho da janela
root.configure(bg=BACKGROUND_COLOR)
# Instancia o controller com a conexão
secretary_controller = SecretaryController(root, conn)
# Exibe a tela desejada
app = LoginView(root)
# app = SecretaryView(root, secretary_controller)
# Inicia o loop da interface
root.mainloop()