| | |
| | | #include "AlarmManager.h" |
| | | #include "SECSRuntimeManager.h" |
| | | #include "TransferManager.h" |
| | | #include "SystemLogManager.h" |
| | | #include "UserManager.h" |
| | | #include "VerticalLine.h" |
| | | #include "HorizontalLine.h" |
| | | #include "EqsGraphWnd.h" |
| | |
| | | return FALSE; |
| | | } |
| | | |
| | | // 初始化运行日志管理库 |
| | | try { |
| | | if (!SystemLogManager::getInstance().initializeLogTable()) { |
| | | AfxMessageBox("初始化运行日志管理库失败!"); |
| | | return FALSE; |
| | | } |
| | | } |
| | | catch (const std::exception& ex) { |
| | | CString errorMsg; |
| | | errorMsg.Format(_T("初始化运行日志管理库失败:%s"), CString(ex.what())); |
| | | AfxMessageBox(errorMsg, MB_ICONERROR); |
| | | return FALSE; |
| | | } |
| | | |
| | | // 初始化用户管理库 |
| | | try { |
| | | UserManager& userManager = UserManager::getInstance(); |
| | | #if !defined(_DEBUG) |
| | | userManager.initializeIdleDetection(AfxGetMainWnd()->m_hWnd); |
| | | SetTimer(1, 60000, nullptr); |
| | | #endif |
| | | userManager.loadSession(); |
| | | } |
| | | catch (const std::exception& ex) { |
| | | CString errorMsg; |
| | | errorMsg.Format(_T("初始化用户管理库失败:%s"), CString(ex.what())); |
| | | AfxMessageBox(errorMsg, MB_ICONERROR); |
| | | return FALSE; |
| | | } |
| | | |
| | | |
| | | |
| | | CServoDlg dlg; |
| | | m_pMainWnd = &dlg; |