From 44360bc2cdeee16be72f9cc4bfb42e0ac26b5b44 Mon Sep 17 00:00:00 2001
From: chenluhua1980 <Chenluhua@qq.com>
Date: 星期一, 19 一月 2026 14:47:19 +0800
Subject: [PATCH] 1.修改优化
---
SourceCode/Bond/Servo/PageRecipe.cpp | 37 ++++++++++++++++++++++++++++++-------
1 files changed, 30 insertions(+), 7 deletions(-)
diff --git a/SourceCode/Bond/Servo/PageRecipe.cpp b/SourceCode/Bond/Servo/PageRecipe.cpp
index cf387ce..841a96f 100644
--- a/SourceCode/Bond/Servo/PageRecipe.cpp
+++ b/SourceCode/Bond/Servo/PageRecipe.cpp
@@ -138,9 +138,12 @@
// 閬嶅巻鏁版嵁骞舵彃鍏ュ埌CListCtrl涓�
for (int i = 0; i < static_cast<int>(vecRecipe.size()); ++i) {
const RecipeInfo& recipe = vecRecipe[i];
+ // 鍘熺▼搴忚姹侾PID鏈夊瓙閰嶆柟锛屽厛娉ㄩ噴
+ /*
if (recipe.vecDeviceList.empty() || recipe.vecDeviceList.size() > 6){
continue;
}
+ */
m_listPPID.InsertItem(i, _T("")); // 绗�0鍒楃┖鐧�
@@ -386,13 +389,12 @@
void CPageRecipe::OnBnClickedButtonNew()
{
- // TODO: 鍦ㄦ娣诲姞鎺т欢閫氱煡澶勭悊绋嬪簭浠g爜
- //CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_EQUIPMENT);
- //int nSel = pComboBox->GetCurSel();
- //SERVO::CEquipment* pEq = (SERVO::CEquipment*)pComboBox->GetItemDataPtr(nSel);
- //if (pEq == nullptr) {
- // return;
- //}
+ int rc = UX_CanExecute(L"recipe");
+ if (rc != 1) {
+ AfxMessageBox("鎿嶄綔鏉冮檺涓嶈冻锛岃鑱旂郴绠$悊浜哄憳锛�");
+ return;
+ }
+ UX_RecordAction(L"recipe");
CRecipeDeviceBindDlg dlg(this);
if (dlg.DoModal() == IDOK) {
@@ -452,6 +454,13 @@
void CPageRecipe::OnBnClickedButtonModify()
{
+ int rc = UX_CanExecute(L"recipe");
+ if (rc != 1) {
+ AfxMessageBox("鎿嶄綔鏉冮檺涓嶈冻锛岃鑱旂郴绠$悊浜哄憳锛�");
+ return;
+ }
+ UX_RecordAction(L"recipe");
+
// TODO: 鍦ㄦ娣诲姞鎺т欢閫氱煡澶勭悊绋嬪簭浠g爜
CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_EQUIPMENT);
if (pComboBox == nullptr || !::IsWindow(pComboBox->m_hWnd)) {
@@ -492,6 +501,13 @@
void CPageRecipe::OnBnClickedButtonDelete()
{
+ int rc = UX_CanExecute(L"recipe");
+ if (rc != 1) {
+ AfxMessageBox("鎿嶄綔鏉冮檺涓嶈冻锛岃鑱旂郴绠$悊浜哄憳锛�");
+ return;
+ }
+ UX_RecordAction(L"recipe");
+
// TODO: 鍦ㄦ娣诲姞鎺т欢閫氱煡澶勭悊绋嬪簭浠g爜
POSITION pos = m_listPPID.GetFirstSelectedItemPosition();
if (!pos) {
@@ -518,6 +534,13 @@
void CPageRecipe::OnBnClickedButtonDeleteAll()
{
+ int rc = UX_CanExecute(L"recipe");
+ if (rc != 1) {
+ AfxMessageBox("鎿嶄綔鏉冮檺涓嶈冻锛岃鑱旂郴绠$悊浜哄憳锛�");
+ return;
+ }
+ UX_RecordAction(L"recipe");
+
// TODO: 鍦ㄦ娣诲姞鎺т欢閫氱煡澶勭悊绋嬪簭浠g爜
if (IDYES != AfxMessageBox(_T("纭畾瑕佸垹闄ゅ叏閮ㄩ厤鏂硅褰曞悧锛�"), MB_YESNO | MB_ICONWARNING)) {
return;
--
Gitblit v1.9.3