| SourceCode/Bond/BondEq/BondEq.vcxproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/BondEqDlg.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/FileManager/RecipeManager.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/FileManager/RecipeManager.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/Resource.h | 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/ToolUnits.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/ToolUnits.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/View/AxisSettingsDlg.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/View/RecipeLiseDlg.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/View/RecipeLiseDlg.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/View/RecipeListDlg.cpp | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/View/RecipeListDlg.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| SourceCode/Bond/BondEq/stdafx.h | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
SourceCode/Bond/BondEq/BondEq.vcxproj
@@ -263,7 +263,7 @@ <ClInclude Include="View\ChangePasswordDlg.h" /> <ClInclude Include="View\IOMonitoringDlg.h" /> <ClInclude Include="View\LoginDlg.h" /> <ClInclude Include="View\RecipeLiseDlg.h" /> <ClInclude Include="View\RecipeListDlg.h" /> <ClInclude Include="View\SystemLogManagerDlg.h" /> <ClInclude Include="View\UserManagerDlg.h" /> </ItemGroup> @@ -344,7 +344,7 @@ <ClCompile Include="View\ChangePasswordDlg.cpp" /> <ClCompile Include="View\IOMonitoringDlg.cpp" /> <ClCompile Include="View\LoginDlg.cpp" /> <ClCompile Include="View\RecipeLiseDlg.cpp" /> <ClCompile Include="View\RecipeListDlg.cpp" /> <ClCompile Include="View\SystemLogManagerDlg.cpp" /> <ClCompile Include="View\UserManagerDlg.cpp" /> </ItemGroup> SourceCode/Bond/BondEq/BondEqDlg.cpp
@@ -17,7 +17,7 @@ #include "SystemLogManagerDlg.h" // æµè¯ #include "RecipeLiseDlg.h" #include "RecipeListDlg.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -253,7 +253,7 @@ // è®¾ç½®é æ¹æä»¶å¤¹è·¯å¾ RecipeManager& recipeManager = RecipeManager::getInstance(); std::string strRecipePath = CToolUnits::getCurrentExePath() + _T("\\Recipe"); std::string strRecipePath = CToolUnits::getRecipePath(); CToolUnits::createDir(strRecipePath.c_str()); recipeManager.setRecipeFolder(strRecipePath); @@ -540,8 +540,7 @@ void CBondEqDlg::OnMenuFileSettings() { CRecipeLiseDlg dlg; CRecipeListDlg dlg; dlg.DoModal(); //CSettingsDlg dlg; SourceCode/Bond/BondEq/FileManager/RecipeManager.cpp
@@ -12,33 +12,15 @@ // æé 彿° RecipeManager::RecipeManager() : m_recipeFolder("Recipe") {} // è®¾ç½®é æ¹æä»¶å¤¹ void RecipeManager::setRecipeFolder(const std::string& folderPath) { m_recipeFolder = folderPath; } // å è½½é æ¹ï¼å¦ææä»¶ä¸åå¨ï¼å è½½é»è®¤æ°æ®ï¼ bool RecipeManager::loadRecipe(const std::string& recipeName) { std::string filePath = m_recipeFolder + "/" + recipeName + ".xml"; pugi::xml_document doc; if (!doc.load_file(filePath.c_str())) { std::cerr << "Recipe file not found: " << filePath << ". Loading default recipe." << std::endl; generateDefaultRecipe(); return false; // æä»¶ä¸åå¨ï¼ä½å è½½äºé»è®¤æ°æ® } // å è½½è½´ä¿¡æ¯ bool RecipeManager::loadAxes(pugi::xml_node axesNode) { m_axes.clear(); auto recipe = doc.child("Recipe"); for (auto axisNode : recipe.child("Axes").children("Axis")) { for (auto axisNode : axesNode.children("Axis")) { AxisInfo axisInfo; axisInfo.id = axisNode.attribute("id").as_int(); axisInfo.number = axisNode.attribute("number").value(); axisInfo.description = axisNode.attribute("description").value(); axisInfo.startAddress = axisNode.attribute("start_address").value(); //axisInfo.maxPositioningSpeed = axisNode.attribute("maxPositioningSpeed").as_double(); //axisInfo.maxManualSpeed = axisNode.attribute("maxManualSpeed").as_double(); // å è½½ ValueRange å¼ axisInfo.jogDistance = ValueRange( @@ -68,9 +50,9 @@ ); // å è½½ PositionRange å¼ axisInfo.positioningPointCount = axisNode.child("Positions").attribute("positioningPointCount").as_int(); axisInfo.positioningPointCount = axisNode.child("Positions").attribute("positioningPointCount").as_int(); for (auto positionNode : axisNode.child("Positions").children("Position")) { bool isEnable = positionNode.attribute("isEnable").as_bool(); bool isEnable = positionNode.attribute("isEnable").as_bool(); std::string description = positionNode.attribute("description").value(); ValueRange positionRange( positionNode.attribute("min").as_double(), @@ -87,26 +69,8 @@ return true; } // ä¿åé æ¹ bool RecipeManager::saveRecipe(const std::string& recipeName) { // çææä»¶è·¯å¾ std::string filePath = m_recipeFolder + "/" + recipeName + ".xml"; // å建 XML ææ¡£å¯¹è±¡ pugi::xml_document doc; // å¦æè½´æ°æ®ä¸ºç©ºï¼çæé»è®¤é æ¹ if (m_axes.empty()) { generateDefaultRecipe(); } // æ·»å é æ¹æ ¹èç¹ auto recipe = doc.append_child("Recipe"); // æ·»å è½´å表èç¹ auto axesNode = recipe.append_child("Axes"); // éåææè½´æ°æ®å¹¶åå ¥ XML // ä¿åè½´ä¿¡æ¯ void RecipeManager::saveAxes(pugi::xml_node& axesNode) { for (const auto& axisEntry : m_axes) { const AxisInfo& axisInfo = axisEntry.second; @@ -115,8 +79,6 @@ axisNode.append_attribute("number") = axisInfo.number.c_str(); axisNode.append_attribute("description") = axisInfo.description.c_str(); axisNode.append_attribute("start_address") = axisInfo.startAddress.c_str(); //axisNode.append_attribute("maxPositioningSpeed") = axisInfo.maxPositioningSpeed; //axisNode.append_attribute("maxManualSpeed") = axisInfo.maxManualSpeed; // ä¿å ValueRange å¼ auto jog_distance = axisNode.append_child("jog_distance"); @@ -156,6 +118,50 @@ positionNode.append_attribute("current") = position.range.currentValue; } } } // è®¾ç½®é æ¹æä»¶å¤¹ void RecipeManager::setRecipeFolder(const std::string& folderPath) { m_recipeFolder = folderPath; } // å è½½é æ¹ï¼å¦ææä»¶ä¸åå¨ï¼å è½½é»è®¤æ°æ®ï¼ bool RecipeManager::loadRecipe(const std::string& recipeName) { std::string filePath = m_recipeFolder + "/" + recipeName + ".xml"; pugi::xml_document doc; if (!doc.load_file(filePath.c_str())) { std::cerr << "Recipe file not found: " << filePath << ". Loading default recipe." << std::endl; generateDefaultRecipe(); return false; // æä»¶ä¸åå¨ï¼ä½å è½½äºé»è®¤æ°æ® } auto recipeNode = doc.child("Recipe"); auto axesNode = recipeNode.child("Axes"); loadAxes(axesNode); // å è½½è½´ä¿¡æ¯ return true; } // ä¿åé æ¹ bool RecipeManager::saveRecipe(const std::string& recipeName) { // çææä»¶è·¯å¾ std::string filePath = m_recipeFolder + "/" + recipeName + ".xml"; // å建 XML ææ¡£å¯¹è±¡ pugi::xml_document doc; // å¦æè½´æ°æ®ä¸ºç©ºï¼çæé»è®¤é æ¹ if (m_axes.empty()) { generateDefaultRecipe(); } // æ·»å é æ¹æ ¹èç¹ auto recipeNode = doc.append_child("Recipe"); // æ·»å è½´ä¿¡æ¯ auto axesNode = recipeNode.append_child("Axes"); saveAxes(axesNode); // ä¿å XML æä»¶ return doc.save_file(filePath.c_str()); SourceCode/Bond/BondEq/FileManager/RecipeManager.h
@@ -88,6 +88,10 @@ private: RecipeManager(); // è½´å è½½åä¿å彿° bool loadAxes(pugi::xml_node axesNode); void saveAxes(pugi::xml_node& axesNode); private: std::string m_recipeFolder; // é æ¹æä»¶å¤¹è·¯å¾ std::map<int, AxisInfo> m_axes; // è½´ä¿¡æ¯ç¼å SourceCode/Bond/BondEq/Resource.hBinary files differ
SourceCode/Bond/BondEq/ToolUnits.cpp
@@ -247,3 +247,43 @@ strText.Format(_T("%.03f"), value); pWnd->SetDlgItemText(nCtrlId, strText); } std::vector<CString> CToolUnits::GetFileNamesInDirectory(const CString& strFolderPath, const CString& strExtension) { std::vector<CString> fileNames; // ç¡®ä¿ç®å½è·¯å¾æåæåææ CString strSearchPath = strFolderPath; if (strSearchPath[strSearchPath.GetLength() - 1] != '\\') { strSearchPath += '\\'; } CString finalExtension = strExtension; if (finalExtension.Find('.') == -1) { finalExtension = '.' + finalExtension; } strSearchPath += "*" + finalExtension; std::unique_ptr<CFileFind> finder = std::make_unique<CFileFind>(); BOOL bWorking = finder->FindFile(strSearchPath); // éåæä»¶å¤¹ while (bWorking) { bWorking = finder->FindNextFile(); if (!finder->IsDirectory()) { CString fileName = finder->GetFileName(); int dotPos = fileName.ReverseFind('.'); if (dotPos != -1) { fileName = fileName.Left(dotPos); } fileNames.push_back(fileName); } } return fileNames; } std::string CToolUnits::getRecipePath() { return getCurrentExePath() + "\\Recipe"; } SourceCode/Bond/BondEq/ToolUnits.h
@@ -25,5 +25,7 @@ static BOOL getBit(const char c, int index); static void setBit(char* p, int index); static void setDlgItemDouble(CWnd* pWnd, int nCtrlId, double value); static std::vector<CString> GetFileNamesInDirectory(const CString& strFolderPath, const CString& strExtension); static std::string getRecipePath(); }; SourceCode/Bond/BondEq/View/AxisSettingsDlg.cpp
@@ -299,7 +299,6 @@ RecipeManager& recipeManager = RecipeManager::getInstance(); if (m_strRecipeName.IsEmpty() || !recipeManager.loadRecipe(std::string(CT2A(m_strRecipeName)))) { AfxMessageBox(_T("å è½½é æ¹å¤±è´¥ï¼")); recipeManager.saveRecipe(std::string(CT2A(m_strRecipeName))); return; } SourceCode/Bond/BondEq/View/RecipeLiseDlg.cpp
ÎļþÒÑɾ³ý SourceCode/Bond/BondEq/View/RecipeLiseDlg.h
ÎļþÒÑɾ³ý SourceCode/Bond/BondEq/View/RecipeListDlg.cpp
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,300 @@ // RecipeLiseDlg.cpp: å®ç°æä»¶ // #include "stdafx.h" #include "BondEq.h" #include "afxdialogex.h" #include "RecipeListDlg.h" #include "InputDialog.h" #include "ToolUnits.h" #include <fstream> #include <sstream> #include <map> // CRecipeListDlg å¯¹è¯æ¡ IMPLEMENT_DYNAMIC(CRecipeListDlg, CDialogEx) CRecipeListDlg::CRecipeListDlg(CWnd* pParent /*=nullptr*/) : CDialogEx(IDD_DIALOG_RECIPE_LIST, pParent) { } CRecipeListDlg::~CRecipeListDlg() { } void CRecipeListDlg::InitRecipeLise() { if (m_grid.GetSafeHwnd() == NULL) return; int nRows = 1; int nCols = 4; int nFixRows = 1; int nFixCols = 0; int nRowIdx = 0; int nColIdx = 0; m_grid.DeleteAllItems(); m_grid.SetVirtualMode(FALSE); m_grid.GetDefaultCell(TRUE, FALSE)->SetBackClr(g_nGridFixCellColor); // 设置åºå®è¡èæ¯è² m_grid.GetDefaultCell(FALSE, TRUE)->SetBackClr(g_nGridFixCellColor); // 设置åºå®åèæ¯è² m_grid.GetDefaultCell(FALSE, FALSE)->SetBackClr(g_nGridCellColor); // 设置åå æ ¼èæ¯è² m_grid.SetFixedTextColor(g_nGridFixFontColor); // 设置åºå®è¡ååä½é¢è² m_grid.SetRowCount(nRows); m_grid.SetColumnCount(nCols); m_grid.SetFixedRowCount(nFixRows); m_grid.SetFixedColumnCount(nFixCols); // Col m_grid.SetColumnWidth(nColIdx, 10); m_grid.SetItemText(nRowIdx, nColIdx++, _T("No.")); m_grid.SetColumnWidth(nColIdx, 10); m_grid.SetItemText(nRowIdx, nColIdx++, _T("åç§°")); m_grid.SetColumnWidth(nColIdx, 50); m_grid.SetItemText(nRowIdx, nColIdx++, _T("æè¿°")); m_grid.SetColumnWidth(nColIdx, 30); m_grid.SetItemText(nRowIdx, nColIdx++, _T("å建æ¶é´")); m_grid.SetFixedRowSelection(FALSE); m_grid.SetFixedColumnSelection(FALSE); m_grid.SetEditable(TRUE); m_grid.SetRowResize(FALSE); m_grid.SetColumnResize(TRUE); m_grid.ExpandColumnsToFit(TRUE); m_grid.SetListMode(TRUE); // å¯ç¨åè¡¨æ¨¡å¼ m_grid.EnableSelection(TRUE); // å¯ç¨éæ© m_grid.SetSingleRowSelection(TRUE); // èªå¨æ´è¡é«äº®ï¼éå¶ä¸ºåè¡éæ©ï¼ m_grid.ExpandLastColumn(); // æåä¸åå¡«å ç½æ ¼ FillRecipeLise(); } void CRecipeListDlg::FillRecipeLise() { // æ¸ é¤æ°æ®è¡ï¼ä¿ç表头 for (int i = 1; i < m_grid.GetRowCount(); i++) { m_grid.DeleteRow(i); } // 1. éåæä»¶å¤¹ä¸ææXMLæä»¶ std::string strRecipePath = CToolUnits::getRecipePath(); std::vector<CString> vecFile = CToolUnits::GetFileNamesInDirectory(strRecipePath.c_str(), _T(".xml")); // 2. 读å RecipeList.txt æä»¶ std::map<CString, std::pair<CString, CString>> recipeData; // {é æ¹å, {æè¿°, å建æ¶é´}} std::ifstream inFile(strRecipePath + "\\RecipeList.txt"); if (inFile.is_open()) { std::string line; while (std::getline(inFile, line)) { if (line.empty()) continue; // è·³è¿ç©ºè¡ std::istringstream ss(line); std::string name, description, createTime; // CSVæ ¼å¼è§£æï¼éå·åéï¼ if (std::getline(ss, name, ',') && std::getline(ss, description, ',') && std::getline(ss, createTime)) { recipeData[CString(name.c_str())] = std::make_pair(CString(description.c_str()), CString(createTime.c_str())); } } inFile.close(); } // 3. æ´æ°è¡¨æ ¼æ°æ® int rowIdx = 1; m_grid.SetRowCount(static_cast<int>(vecFile.size()) + 1); for (const auto& fileName : vecFile) { // ä» RecipeList.txt æ°æ®ä¸æ¥æ¾å¯¹åºçæè¿°åå建æ¶é´ CString description = _T(""); CString createTime = _T(""); auto it = recipeData.find(fileName); if (it != recipeData.end()) { description = it->second.first; // é æ¹æè¿° createTime = it->second.second; // å建æ¶é´ } // å¡«å è¡¨æ ¼æ°æ® m_grid.SetItemText(rowIdx, 0, CString(std::to_string(rowIdx).c_str())); // No. m_grid.SetItemText(rowIdx, 1, fileName); // é æ¹åç§° m_grid.SetItemText(rowIdx, 2, description); // é æ¹æè¿° m_grid.SetItemText(rowIdx, 3, createTime); // å建æ¶é´ m_grid.SetItemState(rowIdx, 0, GVIS_READONLY); m_grid.SetItemState(rowIdx, 1, GVIS_READONLY); m_grid.SetItemState(rowIdx, 3, GVIS_READONLY); ++rowIdx; } m_grid.ExpandColumnsToFit(FALSE); m_grid.ExpandLastColumn(); m_grid.Invalidate(); m_grid.UpdateWindow(); } void CRecipeListDlg::DoDataExchange(CDataExchange* pDX) { CDialogEx::DoDataExchange(pDX); DDX_Control(pDX, IDC_CUSTOM_RECIPE_LIST, m_grid); } BEGIN_MESSAGE_MAP(CRecipeListDlg, CDialogEx) ON_BN_CLICKED(IDC_BUTTON_CREATE_RECIPE, &CRecipeListDlg::OnBnClickedButtonCreateRecipe) ON_BN_CLICKED(IDC_BUTTON_DELETE_RECIPE, &CRecipeListDlg::OnBnClickedButtonDeleteRecipe) END_MESSAGE_MAP() // CRecipeListDlg æ¶æ¯å¤çç¨åº BOOL CRecipeListDlg::OnInitDialog() { CDialogEx::OnInitDialog(); // TODO: 卿¤æ·»å é¢å¤çåå§å InitRecipeLise(); return TRUE; // return TRUE unless you set the focus to a control // å¼å¸¸: OCX 屿§é¡µåºè¿å FALSE } void CRecipeListDlg::OnBnClickedButtonCreateRecipe() { // TODO: 卿¤æ·»å æ§ä»¶éç¥å¤çç¨åºä»£ç CInputDialog inputDialog(_T("é æ¹åç§°"), _T("请è¾å ¥é æ¹åç§°ï¼")); if (inputDialog.DoModal() != IDOK) { return; } CString newRecipeName = inputDialog.GetInputText(); // éªè¯åç§°ä¸éå¤ std::string recipePath = CToolUnits::getRecipePath(); std::string recipeListPath = recipePath + "\\RecipeList.txt"; std::vector<CString> existingFiles = CToolUnits::GetFileNamesInDirectory(recipePath.c_str(), ".xml"); for (const auto& fileName : existingFiles) { if (newRecipeName.Compare(fileName) == 0) { AfxMessageBox(_T("é æ¹åç§°å·²åå¨ï¼è¯·è¾å ¥å ¶ä»åç§°ï¼")); return; } } // æ£æ¥æ¯å¦è¦å¤å¶éä¸é æ¹ CString strCopyRecipe = _T(""); for (int i = 1; i < m_grid.GetRowCount(); i++) { if (m_grid.IsCellSelected(i, 1)) { strCopyRecipe = m_grid.GetItemText(i, 1); CString strMessage; strMessage.Format(_T("Copy [%s] -> [%s]?"), strCopyRecipe, newRecipeName); if (AfxMessageBox(strMessage, MB_YESNO | MB_ICONQUESTION) != IDYES) { strCopyRecipe = _T(""); } break; } } // å建æ°çXMLæä»¶ CString newRecipeFile = CString(recipePath.c_str()) + "\\" + newRecipeName + ".xml"; if (!strCopyRecipe.IsEmpty()) { CString sourceFile = CString(recipePath.c_str()) + "\\" + strCopyRecipe + ".xml"; CopyFile(sourceFile, newRecipeFile, FALSE); } else { // çæé»è®¤XMLæä»¶ RecipeManager& recipeManager = RecipeManager::getInstance(); recipeManager.generateDefaultRecipe(); if (!recipeManager.saveRecipe(std::string(CT2A(newRecipeName)))) { AfxMessageBox(_T("åå»ºé æ¹å¤±è´¥ï¼")); return; } } // æ´æ° RecipeList.txt std::ofstream outFile(recipeListPath, std::ios::app); // è¿½å æ¨¡å¼ if (outFile.is_open()) { SYSTEMTIME sysTime; GetLocalTime(&sysTime); char buffer[64]; sprintf_s(buffer, "%04d-%02d-%02d %02d:%02d:%02d", sysTime.wYear, sysTime.wMonth, sysTime.wDay, sysTime.wHour, sysTime.wMinute, sysTime.wSecond); outFile << CT2A(newRecipeName) << ",é»è®¤æè¿°," << buffer << std::endl; outFile.close(); } // å·æ°ç½æ ¼æ§ä»¶ FillRecipeLise(); } void CRecipeListDlg::OnBnClickedButtonDeleteRecipe() { // TODO: 卿¤æ·»å æ§ä»¶éç¥å¤çç¨åºä»£ç int nSelect = -1; for (int i = 1; i < m_grid.GetRowCount(); i++) { if (m_grid.IsCellSelected(i, 1)) { nSelect = i; break; } } if (nSelect < 0) { AfxMessageBox(_T("è¯·éæ©è¦å é¤çé æ¹ï¼")); return; } CString selectedRecipe = m_grid.GetItemText(nSelect, 1); if (selectedRecipe.IsEmpty()) { AfxMessageBox(_T("é æ¹åç§°æ æï¼")); return; } CString message = _T("ç¡®å®è¦å é¤é æ¹ \"") + selectedRecipe + _T("\" åï¼"); if (AfxMessageBox(message, MB_YESNO | MB_ICONQUESTION) != IDYES) { return; } // å é¤XMLæä»¶ std::string recipePath = CToolUnits::getRecipePath(); CString xmlFilePath = CString(recipePath.c_str()) + "\\" + selectedRecipe + ".xml"; if (!DeleteFile(xmlFilePath)) { AfxMessageBox(_T("å é¤XMLæä»¶å¤±è´¥ï¼")); return; } // æ´æ°RecipeList.txtæä»¶ std::string recipeListPath = recipePath + "\\RecipeList.txt"; std::ifstream inFile(recipeListPath); std::ofstream outFile(recipeListPath + ".tmp"); // åå»ºä¸´æ¶æä»¶ if (inFile.is_open() && outFile.is_open()) { std::string line; while (std::getline(inFile, line)) { std::istringstream ss(line); std::string name; if (std::getline(ss, name, ',')) { if (selectedRecipe != CString(name.c_str())) { outFile << line << std::endl; // ä¿çä¸å¹é çè¡ } } } inFile.close(); outFile.close(); // æ¿æ¢æä»¶ DeleteFile(CString(recipeListPath.c_str())); MoveFile(CString((recipeListPath + ".tmp").c_str()), CString(recipeListPath.c_str())); } // å·æ°ç½æ ¼æ§ä»¶ FillRecipeLise(); } SourceCode/Bond/BondEq/View/RecipeListDlg.h
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,34 @@ #pragma once #include "afxdialogex.h" #include "GridCtrl.h" // CRecipeListDlg å¯¹è¯æ¡ class CRecipeListDlg : public CDialogEx { DECLARE_DYNAMIC(CRecipeListDlg) public: CRecipeListDlg(CWnd* pParent = nullptr); // æ åæé 彿° virtual ~CRecipeListDlg(); // å¯¹è¯æ¡æ°æ® #ifdef AFX_DESIGN_TIME enum { IDD = IDD_DIALOG_RECIPE_LIST }; #endif private: void InitRecipeLise(); void FillRecipeLise(); private: CGridCtrl m_grid; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV æ¯æ virtual BOOL OnInitDialog(); afx_msg void OnBnClickedButtonCreateRecipe(); afx_msg void OnBnClickedButtonDeleteRecipe(); DECLARE_MESSAGE_MAP() }; SourceCode/Bond/BondEq/stdafx.h
@@ -56,7 +56,7 @@ // æ§ä»¶æ ·å¼ static UINT g_nGridFixCellColor = RGB(144, 200, 246); static UINT g_nGridFixFontColor = RGB(0, 0, 0); static UINT g_nGridCellColor = RGB(255, 255, 255); static UINT g_nGridCellColor = RGB(255, 255, 224); static UINT g_nGridCellColor_NonSelect = RGB(150, 150, 150); static UINT g_nGridCellReadyColor = RGB(255, 255, 0); static UINT g_nGridCellOnColor = RGB(255, 69, 0);