Compare commits
157 Commits
fff0364a49
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
ff2f226713
|
|||
|
8177d0f56d
|
|||
|
b606108871
|
|||
|
be09b39bbe
|
|||
|
fafb9d5a5c
|
|||
|
998d52b56c
|
|||
|
3e6a82764a
|
|||
|
3cd8161afb
|
|||
|
02b8de6d18
|
|||
|
7a321eae48
|
|||
|
ad19268e5a
|
|||
|
8bc170e170
|
|||
|
1d618d1624
|
|||
|
9eb3bde649
|
|||
|
62ef4c733c
|
|||
|
27dbd31434
|
|||
|
74ef1a7b4d
|
|||
|
43282354cd
|
|||
|
f92d92aec0
|
|||
|
3a00c47125
|
|||
|
bca3395cb9
|
|||
|
766cb78377
|
|||
|
84acb67061
|
|||
|
9c07251669
|
|||
|
19272d6cbe
|
|||
|
f268cfeda8
|
|||
|
37b5d4e4d2
|
|||
|
29bd71ccc8
|
|||
|
d5f4891d4e
|
|||
|
9a500b9191
|
|||
|
180fa6aa7d
|
|||
|
4325118562
|
|||
|
2adf3f9efe
|
|||
|
648bbb8a63
|
|||
|
f73bba3e20
|
|||
|
e321fd7e28
|
|||
|
6215f061c8
|
|||
|
72a948da68
|
|||
|
c69a8543c6
|
|||
|
c16e50157e
|
|||
|
2cd705b5ba
|
|||
|
f70e75f1a6
|
|||
|
861cf9a2da
|
|||
|
437977ef63
|
|||
|
123c248f43
|
|||
|
1461cc41c6
|
|||
|
34af75245e
|
|||
|
6e3d5fc4c5
|
|||
|
16d5f214d8
|
|||
|
f669130e33
|
|||
|
8fe8ed5f86
|
|||
|
e070bb839e
|
|||
|
90c47745d7
|
|||
|
e832e3c27f
|
|||
|
3391874151
|
|||
|
b02528f14b
|
|||
|
addb984c8e
|
|||
|
1d837b5441
|
|||
|
99a82242d7
|
|||
|
b2ae30b45c
|
|||
|
bd0749c058
|
|||
|
d87827a098
|
|||
|
92feadc228
|
|||
|
4c020dbfd3
|
|||
|
67b9cfee2d
|
|||
|
76f80bb6b1
|
|||
|
ac2cfe3974
|
|||
|
f4fd4a4d86
|
|||
|
07261d5438
|
|||
|
5d9c14b5d4
|
|||
| daca32d4fe | |||
|
a5d478ce56
|
|||
|
830bc8d211
|
|||
|
08bb139476
|
|||
|
92702fdc04
|
|||
|
55b4dc9748
|
|||
|
e6a3b79733
|
|||
|
e5f91e0c0a
|
|||
|
8287822fe4
|
|||
|
1c2ebf6b8b
|
|||
|
d713121a86
|
|||
|
de73446f73
|
|||
|
e7878d63b0
|
|||
|
9927f0550b
|
|||
|
c4c7df1f21
|
|||
|
4fa4478d77
|
|||
|
ccd9466b77
|
|||
|
a8caafb292
|
|||
|
7e1070e740
|
|||
|
01a3fdfce5
|
|||
|
9d0c276db5
|
|||
|
fd4ec3aff0
|
|||
|
0cbde8077e
|
|||
|
7c1620c0f0
|
|||
|
6cca8f1082
|
|||
|
a74d05aeda
|
|||
|
31a69f11ed
|
|||
|
726662d8b7
|
|||
|
1aa9a50e62
|
|||
|
08ee060f34
|
|||
|
4bb95b61ff
|
|||
|
17ee226a5a
|
|||
|
a1af2b0b74
|
|||
|
e5fe0d096c
|
|||
|
f4ad80d17e
|
|||
|
e28b2f1e2e
|
|||
|
7d03615916
|
|||
|
0184376076
|
|||
|
17851b86de
|
|||
|
b5d2c13259
|
|||
|
659172cdd3
|
|||
|
ec543c6db2
|
|||
|
a02c05bd69
|
|||
|
c674c7a53b
|
|||
|
1ab7c5c40f
|
|||
|
64d63bdd24
|
|||
|
f932b2ac10
|
|||
|
73568fe48c
|
|||
|
0d35587940
|
|||
|
ee87f92252
|
|||
|
a627f76197
|
|||
|
d7722c044e
|
|||
|
9bf970e5fb
|
|||
|
c4e12c4194
|
|||
|
92aaac7b5a
|
|||
|
782e61ad9a
|
|||
|
149e6ea1ef
|
|||
|
69bff3f757
|
|||
|
9b9d0a5bcd
|
|||
|
10607f9c3d
|
|||
|
390082fa50
|
|||
|
ca1b1b2efd
|
|||
|
4817b6768f
|
|||
|
9c7fc247a1
|
|||
|
fe7c6f92a8
|
|||
|
93b7ca8cfc
|
|||
|
151a085a9c
|
|||
|
a241484e24
|
|||
|
3ac2009737
|
|||
|
59b310b6df
|
|||
|
fb02cedd8d
|
|||
|
204c56efac
|
|||
|
fc1edefa79
|
|||
|
a915ce396b
|
|||
|
e4afe9a112
|
|||
|
d34a8a39d5
|
|||
|
9aaf1e8f3b
|
|||
|
bcbe10d291
|
|||
|
69a612dc55
|
|||
|
b8b59e7dbc
|
|||
|
41e2d188b9
|
|||
|
107392a900
|
|||
|
8ccb3d3d22
|
|||
|
694d88a339
|
|||
|
17964cbd9a
|
|||
|
f26dffa221
|
|||
| 2f44074400 |
@@ -8,6 +8,7 @@ from MCE.custom_widgets.ctk_timeentry import CTkTimeEntry
|
||||
from MCE.custom_widgets.ctk_integerspinbox import CTkIntegerSpinbox
|
||||
from MCE.custom_widgets.ctk_templatedialog import CTkTemplateDialog
|
||||
from MCE.custom_widgets.ctk_notification import CTkNotification
|
||||
from MCE.custom_widgets.ctk_add_button import CTkAddButton
|
||||
from MCE.utils import Linker, Config
|
||||
from filelock import FileLock, Timeout
|
||||
import threading
|
||||
@@ -117,7 +118,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
|
||||
# Helper method to create Mission Tabview with Template and Queue Tabs
|
||||
def create_mission_tabview(self):
|
||||
self.mission_tabview = customtkinter.CTkTabview(self, height=500)
|
||||
self.mission_tabview = customtkinter.CTkTabview(self)
|
||||
self.mission_tabview.grid(row=17, column=0, columnspan=3, padx=20)
|
||||
|
||||
self.tab_template = self.mission_tabview.add('Template')
|
||||
@@ -138,7 +139,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
self.mode_label.grid(row=1, column=0, padx=(130, 0), pady=5)
|
||||
|
||||
self.stage_label = customtkinter.CTkLabel(self.template_labels, text="Stage:", font=customtkinter.CTkFont(underline=True))
|
||||
self.stage_tooltip = CTkToolTip(self.stage_label, message="Valid format for Mission: 1-1\nValid format for Commissions/Event: 01")
|
||||
self.stage_tooltip = CTkToolTip(self.stage_label, message="Valid format\nMission: 1-1, 3-A\nCommissions & Event: 01", justify=tk.LEFT)
|
||||
self.stage_label.grid(row=1, column=1, padx=(40, 20), pady=5)
|
||||
|
||||
self.run_times_label = customtkinter.CTkLabel(self.template_labels, text="Number of Sweeps:", font=customtkinter.CTkFont(underline=True))
|
||||
@@ -151,7 +152,8 @@ class MCE_Manager(customtkinter.CTk):
|
||||
self.highlight_label = customtkinter.CTkLabel(self.template_buttons_frame, text="*You can double click an entry and press up or down arrow to change its position", font=customtkinter.CTkFont(family="Inter", size=12))
|
||||
self.highlight_label.grid(row=0, column=0, columnspan=3)
|
||||
|
||||
self.add_button = customtkinter.CTkButton(self.template_buttons_frame , text="Add", command=lambda queue=queue: self.add_frame(queue=queue))
|
||||
self.add_button = CTkAddButton(master=self.template_buttons_frame)
|
||||
self.add_button.button.configure(command=lambda queue=queue, button=self.add_button.button: self.add_frame(queue=queue, button=button))
|
||||
self.add_button.grid(row=1, column=0, padx=5, pady=5)
|
||||
|
||||
# Clear button to clear all frames
|
||||
@@ -166,10 +168,10 @@ class MCE_Manager(customtkinter.CTk):
|
||||
|
||||
# Helper method to create Template Frame and Queue Frame
|
||||
def create_template_and_queue_frames(self):
|
||||
self.template_frame = customtkinter.CTkScrollableFrame(self.tab_template, width=400, height=350)
|
||||
self.template_frame = customtkinter.CTkScrollableFrame(self.tab_template, width=435, height=350)
|
||||
self.template_frame.grid(row=1, column=0, sticky="nsew")
|
||||
|
||||
self.queue_frame = customtkinter.CTkScrollableFrame(self.tab_queue, width=400, height=350)
|
||||
self.queue_frame = customtkinter.CTkScrollableFrame(self.tab_queue, width=435, height=350)
|
||||
self.queue_frame.grid(row=1, column=0, sticky="nsew")
|
||||
|
||||
# Helper method to create Lists to Store Frame Widgets
|
||||
@@ -211,7 +213,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
self.template_optionmenu.set(self.previous_selected)
|
||||
return
|
||||
elif template_name in self.templates_list:
|
||||
CTkMessagebox(title="Error", message="Name is invalid.", icon="cancel")
|
||||
CTkMessagebox(title="Error", message="Name is invalid.", icon="MCE\icons\cancel.png")
|
||||
self.template_optionmenu.set(self.previous_selected)
|
||||
return
|
||||
else:
|
||||
@@ -232,7 +234,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
|
||||
def delete_template(self):
|
||||
msg = CTkMessagebox(title="Template Deletetion", message=f"Are you sure you want to delete Template {self.previous_selected}?",
|
||||
icon="question", option_1="No", option_2="Yes")
|
||||
icon="MCE\icons\question.png", option_1="No", option_2="Yes")
|
||||
response = msg.get()
|
||||
if response=="Yes":
|
||||
if len(self.templates) != 1:
|
||||
@@ -250,18 +252,19 @@ class MCE_Manager(customtkinter.CTk):
|
||||
self.template_optionmenu.configure(values=self.templates_list)
|
||||
self.template_optionmenu.set(self.preferred_template)
|
||||
else:
|
||||
CTkMessagebox(title="Error", message="At least one template must exist!!!", icon="cancel")
|
||||
CTkMessagebox(title="Error", message="At least one template must exist!!!", icon="MCE\icons\cancel.png")
|
||||
return
|
||||
|
||||
# Function to add a frame with widgets
|
||||
def add_frame(self, inner_list=None, queue=False, state="normal"):
|
||||
def add_frame(self, inner_list=None, queue=False, state="normal", button=None):
|
||||
position = button.cget("text") if button else "Add Down"
|
||||
frames = self.queue_frames if queue else self.template_frames
|
||||
parent_frame = self.queue_frame if queue else self.template_frame
|
||||
row_index = len(frames) + 1 # Calculate the row for the new frame
|
||||
# Create a frame
|
||||
frame = tk.Frame(parent_frame, bg="gray17")
|
||||
frame.grid(row=row_index, column=0, columnspan=4, padx=10, pady=10, sticky="w")
|
||||
frames.append(frame)
|
||||
frames.append(frame) if position == "Add Down" else frames.insert(0, frame)
|
||||
# "Up" button to move the frame up
|
||||
up_button = customtkinter.CTkButton(frame, text="Up", width=5, command=lambda f=frame, queue=queue: self.move_frame_up(f, queue), state=state)
|
||||
up_button.grid(row=0, column=0, padx=5, pady=5, sticky="w")
|
||||
@@ -288,7 +291,9 @@ class MCE_Manager(customtkinter.CTk):
|
||||
delete_button = customtkinter.CTkButton(frame, text="Delete", width=5, command=lambda f=frame, queue=queue: self.delete_frame(f, queue), state=state)
|
||||
delete_button.grid(row=0, column=5, padx=5, pady=5, sticky="w")
|
||||
|
||||
frame.bind("<Double-Button-1>", lambda event, f=frame: self.highlight_frame(f))
|
||||
frame.bind("<Double-Button-1>", lambda event, f=frame: self.highlight_frame(f))
|
||||
if position == "Add Up":
|
||||
self.update_frame_positions(queue=queue)
|
||||
|
||||
# Function to clear all frames
|
||||
def clear_frames(self, queue=False):
|
||||
@@ -306,7 +311,7 @@ class MCE_Manager(customtkinter.CTk):
|
||||
mode_optionmenu = frame.winfo_children()[2]
|
||||
stage_entry = frame.winfo_children()[3]
|
||||
if not self.check_entry(mode_optionmenu, stage_entry):
|
||||
CTkMessagebox(title="Error", message="Configuration not saved. Some entries are incomplete or have incorect input.", icon="cancel")
|
||||
CTkMessagebox(title="Error", message="Configuration not saved. Some entries are incomplete or have incorect input.", icon="MCE\icons\cancel.png")
|
||||
return
|
||||
mode = frame.winfo_children()[2].get()
|
||||
stage = frame.winfo_children()[3].get().strip()
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import customtkinter
|
||||
|
||||
class CTkAddButton(customtkinter.CTkFrame):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.button = customtkinter.CTkButton(self, text="Add Down", corner_radius=0, width=120)
|
||||
self.button.grid(row=0, column=0)
|
||||
self.option_menu = customtkinter.CTkOptionMenu(
|
||||
self, values= ["Add Up", "Add Down"], width=10, command=self.set_button, corner_radius=0
|
||||
)
|
||||
self.option_menu.set("")
|
||||
self.option_menu.grid(row=0, column=1)
|
||||
|
||||
def set_button(self, value):
|
||||
self.option_menu.set("")
|
||||
self.button.configure(text=value)
|
||||
|
||||
def configure(self, *args, **kwargs):
|
||||
self.button.configure(*args, **kwargs)
|
||||
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 8.9 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.9 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 4.8 KiB |
@@ -377,6 +377,7 @@ pre.rich-traceback-code {
|
||||
#pywebio-scope-scheduler-bar,
|
||||
#pywebio-scope-log-bar,
|
||||
#pywebio-scope-log,
|
||||
#pywebio-scope-daemon-log-bar,
|
||||
#pywebio-scope-daemon-overview #pywebio-scope-groups {
|
||||
font-weight: 500;
|
||||
margin: 0.3125rem;
|
||||
|
||||
@@ -133,12 +133,13 @@ pre.rich-traceback-code {
|
||||
color: #c9d1d9;
|
||||
}
|
||||
|
||||
#pywebio-scope-scheduler-bar,
|
||||
#pywebio-scope-log-bar,
|
||||
#pywebio-scope-log,
|
||||
#pywebio-scope-running,
|
||||
#pywebio-scope-pending,
|
||||
#pywebio-scope-waiting,
|
||||
#pywebio-scope-scheduler-bar,
|
||||
#pywebio-scope-log-bar,
|
||||
#pywebio-scope-log,
|
||||
#pywebio-scope-daemon-log-bar,
|
||||
#pywebio-scope-daemon-overview #pywebio-scope-groups {
|
||||
background-color: #2f3136;
|
||||
border: 1px solid #21262d;
|
||||
|
||||
@@ -133,12 +133,13 @@ pre.rich-traceback-code {
|
||||
border: 1px solid lightgrey;
|
||||
}
|
||||
|
||||
#pywebio-scope-scheduler-bar,
|
||||
#pywebio-scope-log-bar,
|
||||
#pywebio-scope-log,
|
||||
#pywebio-scope-running,
|
||||
#pywebio-scope-pending,
|
||||
#pywebio-scope-waiting,
|
||||
#pywebio-scope-scheduler-bar,
|
||||
#pywebio-scope-log-bar,
|
||||
#pywebio-scope-log,
|
||||
#pywebio-scope-daemon-log-bar,
|
||||
#pywebio-scope-daemon-overview #pywebio-scope-groups {
|
||||
background-color: white;
|
||||
border: 1px solid lightgrey;
|
||||
|
||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 148 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 8.6 KiB |
|
After Width: | Height: | Size: 6.1 KiB |