From b2aa706dfea78ad2e327fb5e414207af69d23d64 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期六, 13 九月 2025 11:33:04 +0800
Subject: [PATCH] 1.对话框显示工艺参数,可复制到剪贴板; 2.修复几处因按回车或ESC键导致页面被关闭的问题; 3.修复解释警告数据文本失败的问题; 4.更新警告文本,显示警告详细信息; 5.完善警告描述内容 ;

---
 SourceCode/Bond/Servo/PageRecipe.cpp |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/SourceCode/Bond/Servo/PageRecipe.cpp b/SourceCode/Bond/Servo/PageRecipe.cpp
index 864ea5a..cf387ce 100644
--- a/SourceCode/Bond/Servo/PageRecipe.cpp
+++ b/SourceCode/Bond/Servo/PageRecipe.cpp
@@ -8,6 +8,7 @@
 #include "MsgDlg.h"
 #include "InputDialog.h"
 #include "RecipeDeviceBindDlg.h"
+#include "DeviceRecipeParamDlg.h"
 
 
 // CPageRecipe 瀵硅瘽妗�
@@ -38,7 +39,7 @@
 	}
 
 	m_listPPID.InsertColumn(0, _T(""), LVCFMT_RIGHT, 0); // 闅愯棌鍒�
-	m_listPPID.InsertColumn(1, _T("No."), LVCFMT_LEFT, width[1]);
+	m_listPPID.InsertColumn(1, _T("No."), LVCFMT_CENTER, width[1]);
 	m_listPPID.InsertColumn(2, _T("PPID"), LVCFMT_LEFT, width[2]);
 	m_listPPID.InsertColumn(3, _T("鐪熺┖鐑樼儰"), LVCFMT_LEFT, width[6]);
 	m_listPPID.InsertColumn(4, _T("Bonder1"), LVCFMT_LEFT, width[4]);
@@ -66,9 +67,9 @@
 
 	m_listPPID.InsertColumn(0, _T(""), LVCFMT_RIGHT, width[0]);
 	m_listPPID.InsertColumn(1, _T("No."), LVCFMT_CENTER, width[1]);
-	m_listPPID.InsertColumn(2, _T("Recipe ID"), LVCFMT_CENTER, width[2]);
-	m_listPPID.InsertColumn(3, _T("Recipe 鍚嶇О"), LVCFMT_CENTER, width[3]);
-	m_listPPID.InsertColumn(4, _T("Recipe 鍙傛暟"), LVCFMT_CENTER, width[4]);
+	m_listPPID.InsertColumn(2, _T("Recipe ID"), LVCFMT_LEFT, width[2]);
+	m_listPPID.InsertColumn(3, _T("Recipe 鍚嶇О"), LVCFMT_LEFT, width[3]);
+	m_listPPID.InsertColumn(4, _T("Recipe 鍙傛暟"), LVCFMT_LEFT, width[4]);
 }
 
 void CPageRecipe::UpdateRecipeByPPID(const CString& strPPID)
@@ -158,7 +159,7 @@
 				str.Format(_T("%d"), recipe.vecDeviceList.at(j).nRecipeID);
 			}
 			else {
-				str.Format(_T("%s"), CA2T(strRecipeName.c_str()));
+				str.Format(_T("%s"), strRecipeName.c_str());
 			}
 	
 			m_listPPID.SetItemText(i, j + 3, str);
@@ -588,17 +589,25 @@
 		return;
 	}
 
-	CString strText = m_listPPID.GetItemText(nItem, 2);
+	CString strRecipeID = m_listPPID.GetItemText(nItem, 2);
+	CString strRecipeName = m_listPPID.GetItemText(nItem, 3);
 	CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_EQUIPMENT);
 	int nEqSel = pComboBox->GetCurSel();
 	if (nEqSel == CB_ERR) {
 		return;
 	}
 
+	int nRecipeID = _ttoi(strRecipeID);
 	SERVO::CEquipment* pEq = (SERVO::CEquipment*)pComboBox->GetItemDataPtr(nEqSel);
 	if (pEq == nullptr) {
 		return;
 	}
+
+	CDeviceRecipeParamDlg dlg(this);
+	dlg.setDeviceRecipeID(nRecipeID);
+	dlg.setDeviceRecipeName(strRecipeName);
+	dlg.setEquipment(pEq);
+	dlg.DoModal();
 }
 
 void CPageRecipe::OnCbnSelchangeComboEquipment()
@@ -769,4 +778,13 @@
 		}
 	}
 	return result;
+}
+
+BOOL CPageRecipe::PreTranslateMessage(MSG* pMsg)
+{
+	if (pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE) {
+		return TRUE;
+	}
+
+	return CDialogEx::PreTranslateMessage(pMsg);
 }
\ No newline at end of file

--
Gitblit v1.9.3