LAPTOP-T815PCOQ\25526
2024-11-25 6365b1d493ca23688fa1fb9a8fc51513dc6bb6d8
SourceCode/Bond/BondEq/BondEqDlg.cpp
@@ -9,13 +9,13 @@
#include "Common.h"
#include "CBonder.h"
#include "SettingsDlg.h"
#include "InputDialog.h"
#include "LoginDlg.h"
#include "ChangePasswordDlg.h"
#include "InputDialog.h"
#include "UserManagerDlg.h"
// test
#include "SystemLogManagerDlg.h"
#include "AxisSettingsDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -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;
   }
@@ -473,8 +496,14 @@
void CBondEqDlg::OnMenuFileSettings()
{
   CAxisSettingsDlg axisDlg;
   axisDlg.SetPLC(theApp.m_model.getBonder().getPLC("PLC(1)"));
   axisDlg.DoModal();
   /*
   CSettingsDlg dlg;
   dlg.DoModal();
   */
}
void CBondEqDlg::OnUpdateMenuFileSettings(CCmdUI* pCmdUI)