22 lines
615 B
Python
22 lines
615 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""
|
||
|
|
探测器信号模拟器 V4.2 - GUI版本
|
||
|
|
"""
|
||
|
|
|
||
|
|
import customtkinter as ctk
|
||
|
|
from gui.main_window import MainWindow
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
# 禁用DPI缩放检查以避免CustomTkinter内部错误
|
||
|
|
ctk.deactivate_automatic_dpi_awareness()
|
||
|
|
|
||
|
|
# 设置CustomTkinter主题
|
||
|
|
ctk.set_appearance_mode("dark") # "light", "dark", "system"
|
||
|
|
ctk.set_default_color_theme("blue") # "blue", "green", "dark-blue"
|
||
|
|
|
||
|
|
# 创建主窗口
|
||
|
|
app = MainWindow()
|
||
|
|
# 设置窗口关闭时的回调函数
|
||
|
|
app.protocol("WM_DELETE_WINDOW", app.on_closing)
|
||
|
|
app.mainloop()
|