From 61b2bfa09588f08accb13e98ee4cd73015cb2352 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期二, 03 六月 2025 09:06:17 +0800
Subject: [PATCH] 1.增加任务详情弹出对话框,但具体填充数据;

---
 SourceCode/Bond/Servo/Servo.cpp |   70 ++++++++++++++++++----------------
 1 files changed, 37 insertions(+), 33 deletions(-)

diff --git a/SourceCode/Bond/Servo/Servo.cpp b/SourceCode/Bond/Servo/Servo.cpp
index c3d5bce..657947a 100644
--- a/SourceCode/Bond/Servo/Servo.cpp
+++ b/SourceCode/Bond/Servo/Servo.cpp
@@ -8,8 +8,9 @@
 #include "ServoGraph.h"
 #include "AlarmManager.h"
 #include "SECSRuntimeManager.h"
-#include "ProductionLogManager.h"
+#include "TransferManager.h"
 #include "VerticalLine.h"
+#include "HorizontalLine.h"
 #include "EqsGraphWnd.h"
 #include "MapPosWnd.h"
 #include "HmTab.h"
@@ -52,7 +53,7 @@
 
 BOOL CServoApp::InitInstance()
 {
-	// 如果一个运行在 Windows XP 上的应用程序清单指定要
+	// TODO: 调用 AfxInitRichEdit2() 以初始化 richedit2 库。\n"	// 如果一个运行在 Windows XP 上的应用程序清单指定要
 	// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
 	//则需要 InitCommonControlsEx()。  否则,将无法创建窗口。
 	INITCOMMONCONTROLSEX InitCtrls;
@@ -99,6 +100,7 @@
 	// 注册控件
 	CServoGraph::RegisterWndClass();
 	CVerticalLine::RegisterWndClass();
+	CHorizontalLine::RegisterWndClass();
 	CEqsGraphWnd::RegisterWndClass();
 	CMapPosWnd::RegisterWndClass();
 	CHmTab::RegisterWndClass();
@@ -111,6 +113,10 @@
 
 	// 初始化 GDI+
 	InitGDIPlus();
+
+
+	// 初始化 MFC RichEdit 控件
+	AfxInitRichEdit2();
 
 
 	// 初始化报警管理器
@@ -128,35 +134,33 @@
 	}
 	AlarmManager::getInstance().insertMockData();
 
-
-	// 初始化生产履历管理器
-	//try {
-	//	if (!ProductionLogManager::getInstance().initProductionTable()) {
-	//		AfxMessageBox("初始化生产履历管理器失败!");
-	//		return FALSE;
-	//	}
-	//}
-	//catch (const std::exception& ex) {
-	//	CString errorMsg;
-	//	errorMsg.Format(_T("初始化生产履历管理器失败:%s"), CString(ex.what()));
-	//	AfxMessageBox(errorMsg, MB_ICONERROR);
-	//	return FALSE;
-	//}
-
-
 	// 初始化SECS运行设置管理库
-	//try {
-	//	if (!SECSRuntimeManager::getInstance().initRuntimeSetting()) {
-	//		AfxMessageBox("初始化SECS运行设置失败!");
-	//		return FALSE;
-	//	}
-	//}
-	//catch (const std::exception& ex) {
-	//	CString errorMsg;
-	//	errorMsg.Format(_T("初始化SECS运行设置失败:%s"), CString(ex.what()));
-	//	AfxMessageBox(errorMsg, MB_ICONERROR);
-	//	return FALSE;
-	//}
+	try {
+		if (!SECSRuntimeManager::getInstance().initRuntimeSetting()) {
+			AfxMessageBox("初始化SECS运行设置失败!");
+			return FALSE;
+		}
+	}
+	catch (const std::exception& ex) {
+		CString errorMsg;
+		errorMsg.Format(_T("初始化SECS运行设置失败:%s"), CString(ex.what()));
+		AfxMessageBox(errorMsg, MB_ICONERROR);
+		return FALSE;
+	}
+
+	// 初始化搬运记录管理库
+	try {
+		if (!TransferManager::getInstance().initTransferTable()) {
+			AfxMessageBox("初始化搬运记录管理库设置失败!");
+			return FALSE;
+		}
+	}
+	catch (const std::exception& ex) {
+		CString errorMsg;
+		errorMsg.Format(_T("初始化搬运记录管理库设置失败:%s"), CString(ex.what()));
+		AfxMessageBox(errorMsg, MB_ICONERROR);
+		return FALSE;
+	}
 
 
 	CServoDlg dlg;
@@ -201,12 +205,12 @@
 	// 销毁报警表
 	AlarmManager::getInstance().termAlarmTable();
 
-	// 销毁生产表
-	ProductionLogManager::getInstance().termProductionTable();
-
 	// 销毁SECS运行设置管理库
 	SECSRuntimeManager::getInstance().termRuntimeSetting();
 
+	// 销毁搬运记录管理库
+	TransferManager::getInstance().termTransferTable();
+
 	return CWinApp::ExitInstance();
 }
 

--
Gitblit v1.9.3