Files
diskmanager2/main_tkinter.py
2026-02-09 03:14:35 +08:00

44 lines
868 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Linux 存储管理工具 - Tkinter 版本
适配低版本系统(如 CentOS 8
"""
import tkinter as tk
from tkinter import ttk
import sys
import os
# 将当前目录添加到路径
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from mainwindow_tkinter import MainWindow
def main():
"""主程序入口"""
root = tk.Tk()
root.title("Linux 存储管理工具")
root.geometry("1200x800")
# 设置最小窗口大小
root.minsize(800, 600)
# 尝试设置 DPI 感知(仅在 Windows 上有效)
try:
from ctypes import windll
windll.shcore.SetProcessDpiAwareness(1)
except Exception:
pass
# 创建应用
app = MainWindow(root)
# 运行主循环
root.mainloop()
if __name__ == "__main__":
main()