-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
86 lines (65 loc) · 2.47 KB
/
main.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
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
import tkinter as tk
from tkinter import ttk
from calculator import *
from notes import *
from todolist import *
from clock import *
from tkinter import messagebox
import webbrowser
# Made by @Temane with ❤️ and with the help of ChatGPT and Youtube // hole4.co 😉
# Thanks for your help 🫡 (if you are here, you are a programmer)
# This code is very easy to understand 😊
# A fews updates are coming soon...
# version = Alpha-0
def update_checker():
messagebox.askyesno(title="Redirection", message="Do you want to be redirected to the update checker website ?",detail="Click no to quit")
if False:
pass
else:
webbrowser.open("https://hole4.readthedocs.io/en/latest/update-checker/#alpha-0")
def about_me():
messagebox.askyesno(title="About me/Redirection", message="By @ImTemane, do you want to be redirected to the Github project page ? ",detail="Click no to quit")
if False:
pass
else:
webbrowser.open("https://github.com/ImTemane/hole4")
root = tk.Tk()
root.title("Hole4")
root.geometry("800x400")
root.iconbitmap("_internal/logohole4.ico")
calculator = Calculator
note = Note
tdl = Todolist
clock = Clock
menubar = tk.Menu(root)
moremenu = tk.Menu(menubar)
moremenu.add_command(label="Update Checker",command=update_checker)
moremenu.add_separator()
moremenu.add_command(label="About me",command=about_me)
menubar.add_cascade(label="More", menu=moremenu)
root.config(menu=menubar)
frame_left = tk.Frame(root)
frame_right = tk.Frame(root)
frame_left.pack(side="left",expand=True,fill="both")
frame_right.pack(side="right",expand=True,fill="both")
notebook_left = ttk.Notebook(frame_left)
notebook_right = ttk.Notebook(frame_right)
notebook_left.pack(expand=True,fill="both")
notebook_right.pack(expand=True,fill="both")
tdl_frame = tk.Frame(notebook_left) #tdl = To-do-list
tdl_frame.pack(fill="both",expand=True)
tdl(tdl_frame)
clock_frame = tk.Frame(notebook_left)
clock_frame.pack(fill="both",expand=True)
clock(clock_frame)
calculator_frame = tk.Frame(notebook_right)
calculator_frame.pack(fill="both",expand=True)
calculator(calculator_frame)
note_frame = tk.Frame(notebook_right)
note_frame.pack(fill="both",expand=True)
note(note_frame)
notebook_left.add(tdl_frame,text="To-do-list")
notebook_left.add(clock_frame,text="Clock")
notebook_right.add(calculator_frame,text="Calculator")
notebook_right.add(note_frame,text="Note")
root.mainloop()