修复图标加载问题并生成使用说明书
This commit is contained in:
+13
-1
@@ -10,16 +10,28 @@ import serial.tools.list_ports
|
||||
import threading
|
||||
import time
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
def resource_path(relative_path):
|
||||
if hasattr(sys, '_MEIPASS'):
|
||||
return os.path.join(sys._MEIPASS, relative_path)
|
||||
return os.path.join(os.path.abspath('.'), relative_path)
|
||||
|
||||
|
||||
class LaserTracingConfigApp:
|
||||
def __init__(self, root):
|
||||
self.root = root
|
||||
self.root.title("激光示踪配置工具")
|
||||
self.root.title("边坡变形监测-变形(位移)自动测量系统配置工具")
|
||||
self.root.geometry("900x700")
|
||||
self.root.resizable(True, True)
|
||||
|
||||
icon_path = resource_path("传感器.ico")
|
||||
if os.path.exists(icon_path):
|
||||
self.root.iconbitmap(icon_path)
|
||||
|
||||
self.serial_port = None
|
||||
self.serial_thread = None
|
||||
self.running = False
|
||||
|
||||
Reference in New Issue
Block a user