| | |
| | | return FALSE; |
| | | } |
| | | |
| | | // 初始化报警模块 |
| | | AlarmManager& alarmManager = AlarmManager::getInstance(); |
| | | alarmManager.setDatabase(db.get()); |
| | | try { |
| | | if (!alarmManager.initializeAlarmTable()) { |
| | | AfxMessageBox("初始化报警模块失败!"); |
| | | return FALSE; |
| | | } |
| | | } |
| | | catch (const std::exception& ex) { |
| | | CString errorMsg; |
| | | errorMsg.Format(_T("初始化报警模块失败:%s"), CString(ex.what())); |
| | | AfxMessageBox(errorMsg, MB_ICONERROR); |
| | | return FALSE; |
| | | } |
| | | |
| | | // 设置配方文件夹路径 |
| | | RecipeManager& recipeManager = RecipeManager::getInstance(); |
| | | std::string strRecipePath = CToolUnits::getCurrentExePath() + _T("\\Recipe"); |