mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2025-12-23 23:36:46 +00:00
feat(core): 优化主窗口和UI管理功能
- 移除不再使用的UI组件,简化主窗口代码结构。 - 更新按钮状态管理,统一通过UIManager控制安装按钮状态,提升代码可读性。 - 优化解压和下载管理逻辑,确保在操作过程中提供清晰的用户反馈。 - 增强日志记录,确保在关键操作中提供详细的调试信息,便于后续排查和用户反馈。
This commit is contained in:
@@ -268,7 +268,7 @@ class PatchDetector:
|
||||
QMessageBox.critical(self.main_window, f"文件校验失败 - {APP_NAME}", message)
|
||||
|
||||
self.main_window.setEnabled(True)
|
||||
self.main_window.ui.start_install_text.setText("开始安装")
|
||||
self.main_window.ui_manager.set_install_button_state("ready")
|
||||
QTimer.singleShot(100, self.main_window.show_result)
|
||||
|
||||
def on_offline_pre_hash_finished(self, updated_status, game_dirs):
|
||||
@@ -333,7 +333,7 @@ class PatchDetector:
|
||||
"\n未检测到任何需要安装补丁的游戏。\n\n请确保游戏文件夹位于选择的目录中。\n",
|
||||
)
|
||||
|
||||
self.main_window.ui.start_install_text.setText("开始安装")
|
||||
self.main_window.ui_manager.set_install_button_state("ready")
|
||||
return
|
||||
|
||||
from PySide6 import QtWidgets
|
||||
@@ -367,7 +367,7 @@ class PatchDetector:
|
||||
|
||||
result = dialog.exec()
|
||||
if result != QtWidgets.QDialog.DialogCode.Accepted or not list_widget.selectedItems():
|
||||
self.main_window.ui.start_install_text.setText("开始安装")
|
||||
self.main_window.ui_manager.set_install_button_state("ready")
|
||||
return
|
||||
|
||||
selected_games = [item.text() for item in list_widget.selectedItems()]
|
||||
|
||||
Reference in New Issue
Block a user