42 lines
1.0 KiB
Python
42 lines
1.0 KiB
Python
import sys
|
|
import os
|
|
import threading
|
|
import tkinter as tk
|
|
from .core.app_controller import AppController
|
|
from .gui.main_window import MainWindow
|
|
|
|
def main():
|
|
"""
|
|
Main entry point for the PyMsc application.
|
|
Initializes the Core Logic and the GUI.
|
|
"""
|
|
# Initialize the root Tkinter window
|
|
root = tk.Tk()
|
|
root.title("PyMsc - Python Mission Computer")
|
|
root.geometry("1200x800")
|
|
|
|
# Initialize the Application Controller (Core Logic)
|
|
# Pass root to controller if needed for event loop management,
|
|
# or keep them separate via callbacks.
|
|
app_core = AppController()
|
|
|
|
# Initialize the GUI, passing the controller to allow two-way communication
|
|
gui = MainWindow(root, app_core)
|
|
|
|
# Handle graceful shutdown
|
|
def on_closing():
|
|
app_core.stop()
|
|
root.destroy()
|
|
sys.exit(0)
|
|
|
|
root.protocol("WM_DELETE_WINDOW", on_closing)
|
|
|
|
# Start the application logic
|
|
app_core.start()
|
|
|
|
# Start the GUI event loop
|
|
print("PyMsc Started.")
|
|
root.mainloop()
|
|
|
|
if __name__ == "__main__":
|
|
main() |