From 9198ac12e4e2ff64a2cf65c32d576f02d54c346a Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期六, 10 一月 2026 16:50:32 +0800
Subject: [PATCH] 1.S1F3_CurrentRecipe,S6F11_RecipeChange实现。

---
 SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
index 0b54f77..90c57ae 100644
--- a/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
+++ b/SourceCode/Bond/EAPSimulator/EAPSimulatorDlg.cpp
@@ -106,6 +106,7 @@
 	ON_BN_CLICKED(IDC_BUTTON_QUERY_PROCESS_STATE, &CEAPSimulatorDlg::OnBnClickedButtonQueryProcessState)
 	ON_BN_CLICKED(IDC_BUTTON_QUERY_ALL_SVID, &CEAPSimulatorDlg::OnBnClickedButtonQueryAllSvid)
 	ON_BN_CLICKED(IDC_BUTTON_QUERY_ALL_CEID, &CEAPSimulatorDlg::OnBnClickedButtonQueryAllCeid)
+	ON_BN_CLICKED(IDC_BUTTON_QUERY_CURRENT_RECIPE, &CEAPSimulatorDlg::OnBnClickedButtonQueryCurrentRecipe)
 END_MESSAGE_MAP()
 
 
@@ -272,6 +273,34 @@
 			WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
 			rc.left, rc.top, rc.Width(), rc.Height(),
 			m_hWnd, (HMENU)IDC_BUTTON_QUERY_ALL_CEID, AfxGetInstanceHandle(), nullptr);
+		if (hBtn != nullptr) {
+			::SendMessage(hBtn, WM_SETFONT, (WPARAM)GetFont()->GetSafeHandle(), TRUE);
+		}
+	}
+	// S1F3 CurrentRecipe (EQ specific) combo + button
+	{
+		CRect rcCombo(14, 168, 14 + 120, 168 + 120); // dropdown height arbitrary
+		MapDialogRect(&rcCombo);
+		HWND hCombo = ::CreateWindow(_T("COMBOBOX"), _T(""),
+			WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_VSCROLL,
+			rcCombo.left, rcCombo.top, rcCombo.Width(), rcCombo.Height(),
+			m_hWnd, (HMENU)IDC_COMBO_EQ_FOR_RECIPE, AfxGetInstanceHandle(), nullptr);
+		if (hCombo != nullptr) {
+			::SendMessage(hCombo, WM_SETFONT, (WPARAM)GetFont()->GetSafeHandle(), TRUE);
+			// 绠�鍗曞~鍏呰澶囧垪琛紙鍙寜闇�璋冩暣锛�
+			std::vector<CString> eqs = { _T("Bonder1"), _T("Bonder2"), _T("EFEM"), _T("VacuumBake"), _T("BakeCooling"), _T("Measurement") };
+			for (const auto& eq : eqs) {
+				::SendMessage(hCombo, CB_ADDSTRING, 0, (LPARAM)(LPCTSTR)eq);
+			}
+			::SendMessage(hCombo, CB_SETCURSEL, 0, 0);
+		}
+
+		CRect rcBtn(140, 168, 14 + 140 + 140, 168 + 14);
+		MapDialogRect(&rcBtn);
+		HWND hBtn = ::CreateWindow(_T("BUTTON"), _T("S1F3_CurrentRecipe"),
+			WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
+			rcBtn.left, rcBtn.top, rcBtn.Width(), rcBtn.Height(),
+			m_hWnd, (HMENU)IDC_BUTTON_QUERY_CURRENT_RECIPE, AfxGetInstanceHandle(), nullptr);
 		if (hBtn != nullptr) {
 			::SendMessage(hBtn, WM_SETFONT, (WPARAM)GetFont()->GetSafeHandle(), TRUE);
 		}
@@ -626,3 +655,26 @@
 {
 	theApp.m_model.m_pHsmsActive->hsmsQueryAllCollectionEvents();
 }
+
+void CEAPSimulatorDlg::OnBnClickedButtonQueryCurrentRecipe()
+{
+	CString sel;
+	CComboBox* pCombo = (CComboBox*)GetDlgItem(IDC_COMBO_EQ_FOR_RECIPE);
+	if (pCombo != nullptr) {
+		int idx = pCombo->GetCurSel();
+		if (idx != CB_ERR) {
+			pCombo->GetLBText(idx, sel);
+		}
+	}
+	unsigned int svid = SVID_EQPPExecName; // 榛樿鍏ㄥ眬
+	CString upper = sel;
+	upper.MakeUpper();
+	if (upper.Find(_T("BONDER1")) != -1) svid = SVID_Bonder1CurrentRecipe;
+	else if (upper.Find(_T("BONDER2")) != -1) svid = SVID_Bonder2CurrentRecipe;
+	else if (upper.Find(_T("VACUUMBAKE")) != -1) svid = SVID_VacuumBakeCurrentRecipe;
+	else if (upper.Find(_T("BAKECOOLING")) != -1) svid = SVID_BakeCoolingCurrentRecipe;
+	else if (upper.Find(_T("MEASUREMENT")) != -1) svid = SVID_MeasurementCurrentRecipe;
+	else if (upper.Find(_T("EFEM")) != -1) svid = SVID_EFEMCurrentRecipe;
+
+	theApp.m_model.m_pHsmsActive->hsmsSelectedEquipmentStatusRequest(svid);
+}

--
Gitblit v1.9.3