add app files

This commit is contained in:
skylights
2024-03-30 06:46:09 +03:00
committed by GitHub
parent 0a7410c34c
commit 8d203a0069
12 changed files with 413 additions and 0 deletions

23
notebooks/app/main.py Normal file
View File

@@ -0,0 +1,23 @@
from tkinter import messagebox
from Start import Start
import platform
def on_closing():
if messagebox.askokcancel("Подтверждение закрытия", "Вы уверены, что хотите закрыть приложение?"):
app.destroy()
app = Start()
app.geometry(f"{app.winfo_screenwidth()}x{app.winfo_screenheight()}")
app.protocol("WM_DELETE_WINDOW", on_closing)
app.mainloop()
system = platform.system()
if system == "Windows":
app.after(0, lambda: app.state('zoomed'))
elif system == "Linux":
app.attributes("-fullscreen", True)
app.bind("<F12>", lambda event: app.attributes("-fullscreen",
not app.attributes("-fullscreen")))
app.bind("<Escape>", lambda event: app.attributes("-fullscreen", False))