From 66786f85648c3c81b932decba339ffb359a7bf25 Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期一, 25 十一月 2024 17:46:56 +0800
Subject: [PATCH] 1.完成初版轴管理类 2.实现基本的轴设定界面的交互
---
SourceCode/Bond/BondEq/BondEqDlg.cpp | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/SourceCode/Bond/BondEq/BondEqDlg.cpp b/SourceCode/Bond/BondEq/BondEqDlg.cpp
index c9a019f..0fb1060 100644
--- a/SourceCode/Bond/BondEq/BondEqDlg.cpp
+++ b/SourceCode/Bond/BondEq/BondEqDlg.cpp
@@ -191,13 +191,36 @@
// 初始化运行日志表
try {
if (!logManager.initializeLogTable()) {
- AfxMessageBox("初始化系统日志表失败!");
+ AfxMessageBox("初始化系统日志模块失败!");
return FALSE;
}
}
catch (const std::exception& ex) {
CString errorMsg;
- errorMsg.Format(_T("初始化系统日志表失败:%s"), CString(ex.what()));
+ errorMsg.Format(_T("初始化系统日志模块失败:%s"), CString(ex.what()));
+ AfxMessageBox(errorMsg, MB_ICONERROR);
+ return FALSE;
+ }
+
+ // 设置轴设定模块的数据库连接
+ AxisManager& axisManager = AxisManager::getInstance();
+ axisManager.setDatabase(db.get());
+
+ // 初始化轴设定表
+ try {
+ if (!axisManager.initializeTables()) {
+ AfxMessageBox("创建轴设定表失败!");
+ return FALSE;
+ }
+
+ if (!axisManager.initializeDefaultData()) {
+ AfxMessageBox("初始化轴设定默认数据失败!");
+ return FALSE;
+ }
+ }
+ catch (const std::exception& ex) {
+ CString errorMsg;
+ errorMsg.Format(_T("初始化轴设定模块失败:%s"), CString(ex.what()));
AfxMessageBox(errorMsg, MB_ICONERROR);
return FALSE;
}
--
Gitblit v1.9.3