From 7ec50101cc28996eee747962eb06b8fa52e016ed Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期三, 27 八月 2025 12:03:14 +0800
Subject: [PATCH] 1. 设备配方列表添加显示配方名称
---
SourceCode/Bond/Servo/RecipeManager.cpp | 3 +--
SourceCode/Bond/Servo/RecipeManager.h | 1 +
SourceCode/Bond/Servo/PageRecipe.h | 3 ++-
SourceCode/Bond/Servo/PageRecipe.cpp | 5 +++--
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/SourceCode/Bond/Servo/PageRecipe.cpp b/SourceCode/Bond/Servo/PageRecipe.cpp
index 2ead2d9..9d9d83c 100644
--- a/SourceCode/Bond/Servo/PageRecipe.cpp
+++ b/SourceCode/Bond/Servo/PageRecipe.cpp
@@ -55,9 +55,9 @@
CString strIniFile, strItem;
strIniFile.Format(_T("%s\\configuration.ini"), (LPCTSTR)theApp.m_strAppDir);
- int width[3] = { 0, 60, 150 };
+ int width[] = { 0, 60, 150, 150 };
- for (int i = 0; i < 3; i++) {
+ for (int i = 0; i < 4; i++) {
strItem.Format(_T("Col_Device_%d_Width"), i);
width[i] = GetPrivateProfileInt(_T("PageRecipeListCtrl"), strItem, width[i], strIniFile);
}
@@ -65,6 +65,7 @@
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]);
}
void CPageRecipe::UpdateRecipeByPPID(const CString& strPPID)
diff --git a/SourceCode/Bond/Servo/PageRecipe.h b/SourceCode/Bond/Servo/PageRecipe.h
index 9f24ba2..6833e3b 100644
--- a/SourceCode/Bond/Servo/PageRecipe.h
+++ b/SourceCode/Bond/Servo/PageRecipe.h
@@ -1,6 +1,7 @@
锘�#pragma once
#include "afxdialogex.h"
#include "RecipeManager.h"
+#include "ListCtrlEx.h"
// CPageRecipe 瀵硅瘽妗�
@@ -41,5 +42,5 @@
DECLARE_MESSAGE_MAP()
private:
- CListCtrl m_listPPID;
+ CListCtrlEx m_listPPID;
};
diff --git a/SourceCode/Bond/Servo/RecipeManager.cpp b/SourceCode/Bond/Servo/RecipeManager.cpp
index e0a186b..5928d57 100644
--- a/SourceCode/Bond/Servo/RecipeManager.cpp
+++ b/SourceCode/Bond/Servo/RecipeManager.cpp
@@ -62,8 +62,7 @@
);
)";
- return m_pDB->executeQuery(createRecipeTable)
- && m_pDB->executeQuery(createDeviceTable);
+ return m_pDB->executeQuery(createRecipeTable) && m_pDB->executeQuery(createDeviceTable);
}
void RecipeManager::termRecipeTable() {
diff --git a/SourceCode/Bond/Servo/RecipeManager.h b/SourceCode/Bond/Servo/RecipeManager.h
index 444a529..b27b026 100644
--- a/SourceCode/Bond/Servo/RecipeManager.h
+++ b/SourceCode/Bond/Servo/RecipeManager.h
@@ -11,6 +11,7 @@
struct DeviceRecipe {
int nDeviceID; // 设备ID
int nRecipeID; // 子配方ID
+ std::string strRecipeName; // 子配方名称
std::string strDeviceName; // 设备名称
};
--
Gitblit v1.9.3