LAPTOP-SNT8I5JK\Boounion
2025-07-28 bfe14e41fa5b07771d78af4511ba18d706bc23cc
SourceCode/Bond/BondEq/BondEqDlg.cpp
@@ -16,6 +16,8 @@
#include "UserManagerDlg.h"
#include "SystemLogManagerDlg.h"
// 测试
#include "RecipeListDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
@@ -251,10 +253,12 @@
   // 设置配方文件夹路径
   RecipeManager& recipeManager = RecipeManager::getInstance();
   std::string strRecipePath =  CToolUnits::getCurrentExePath() + _T("\\Recipe");
   std::string strRecipePath =  CToolUnits::getRecipePath();
   CToolUnits::createDir(strRecipePath.c_str());
   recipeManager.setRecipeFolder(strRecipePath);
   if (!recipeManager.loadRecipe("Default")) {
      AfxMessageBox("Default 配方加载失败!");
   }
   // 菜单
   CMenu menu;
@@ -300,6 +304,13 @@
   // 更新登录状态
   UpdateLoginStatus();
   logManager.log(SystemLogManager::LogType::Info, _T("BondEq启动..."));
   // 自动启动
   theApp.m_model.getBonder().start();
   m_pTopToolbar->GetBtn(IDC_BUTTON_RUN)->EnableWindow(FALSE);
   m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(TRUE);
   logManager.log(SystemLogManager::LogType::Operation, _T("运行..."));
   return TRUE;  // 除非将焦点设置到控件,否则返回 TRUE
@@ -538,8 +549,11 @@
void CBondEqDlg::OnMenuFileSettings()
{
   CSettingsDlg dlg;
   CRecipeListDlg dlg;
   dlg.DoModal();
   //CSettingsDlg dlg;
   //dlg.DoModal();
}
void CBondEqDlg::OnUpdateMenuFileSettings(CCmdUI* pCmdUI)
@@ -825,6 +839,7 @@
{
   if (m_pAlarmWnd == nullptr) {
      m_pAlarmWnd = new CAlarmPopupDlg();
      m_pAlarmWnd->SetPLC(theApp.m_model.getBonder().getPLC("PLC(1)"));
      m_pAlarmWnd->Create(IDD_DIALOG_POPUP_ALARM, this);
      m_pAlarmWnd->CenterWindow();
   }
@@ -835,6 +850,7 @@
{
   if (m_pAlarmWnd == nullptr) {
      m_pAlarmWnd = new CAlarmPopupDlg();
      m_pAlarmWnd->SetPLC(theApp.m_model.getBonder().getPLC("PLC(1)"));
      m_pAlarmWnd->Create(IDD_DIALOG_POPUP_ALARM, this);
      m_pAlarmWnd->CenterWindow();
   }