1 Star 0 Fork 0

伟大航路/Auto_Simulated_Universe

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gui.py 1.24 KB
一键复制 编辑 原始数据 按行查看 历史
ZYX 提交于 2023-09-10 23:30 . v5.4
import atexit
import flet as ft
import pyuac
import win32gui
from gui.choose import choose_view
from gui.config import config_view
from gui.abyss import abyss_view
from gui.common import cleanup, mynd, Page, init_page
def main(page: Page):
def on_route_change(e: Page):
page.views.clear()
choose_view(page)
if e.route == "/config":
config_view(page)
if e.route == '/abyss':
abyss_view(page)
page.update()
def view_pop():
page.views.pop()
top_view = page.views[-1]
page.go(top_view.route)
init_page(page)
page.theme = ft.Theme(
color_scheme_seed=ft.colors.PINK,
)
page.title = "AutoSimulatedUniverse"
page.vertical_alignment = "center"
page.horizontal_alignment = "center"
page.on_route_change = on_route_change
page.on_view_pop = view_pop
page.window_min_width = 800
page.window_width = 800
page.window_height = 670
page.window_min_height = 650
page.go(page.route)
if __name__ == "__main__":
atexit.register(cleanup)
if not pyuac.isUserAdmin():
pyuac.runAsAdmin()
else:
try:
win32gui.ShowWindow(mynd, 0)
except:
pass
ft.app(target=main)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/lks17/Auto_Simulated_Universe.git
git@gitee.com:lks17/Auto_Simulated_Universe.git
lks17
Auto_Simulated_Universe
Auto_Simulated_Universe
main

搜索帮助