From a549ad408c941bfebd863c8537bc30520659c293 Mon Sep 17 00:00:00 2001
From: LAPTOP-T815PCOQ\25526 <mr.liuyang@126.com>
Date: 星期二, 24 十二月 2024 17:47:41 +0800
Subject: [PATCH] 1.添加主页面 2.修复配方列表切换配方出现标签闪烁问题(主题颜色是白色,标签控件不是,所以刷新的时候先刷新成主题颜色)
---
SourceCode/Bond/BondEq/Resource.h | 0
SourceCode/Bond/BondEq/CPanelProject.cpp | 30 +++++++++++++++++++++---------
SourceCode/Bond/BondEq/BondEq.rc | 0
SourceCode/Bond/BondEq/CPanelProject.h | 6 ++++--
SourceCode/Bond/BondEq/View/RecipeListDlg.cpp | 1 +
SourceCode/Bond/BondEq/BondEq.vcxproj | 2 ++
6 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/SourceCode/Bond/BondEq/BondEq.rc b/SourceCode/Bond/BondEq/BondEq.rc
index ba14782..6c020f7 100644
--- a/SourceCode/Bond/BondEq/BondEq.rc
+++ b/SourceCode/Bond/BondEq/BondEq.rc
Binary files differ
diff --git a/SourceCode/Bond/BondEq/BondEq.vcxproj b/SourceCode/Bond/BondEq/BondEq.vcxproj
index 11f7d20..06553f1 100644
--- a/SourceCode/Bond/BondEq/BondEq.vcxproj
+++ b/SourceCode/Bond/BondEq/BondEq.vcxproj
@@ -212,6 +212,7 @@
<ClInclude Include="CPanel.h" />
<ClInclude Include="CParam.h" />
<ClInclude Include="CProjectPageComponents.h" />
+ <ClInclude Include="CProjectPageMain.h" />
<ClInclude Include="CRemoteEqUnitView.h" />
<ClInclude Include="CRemoteEqView.h" />
<ClInclude Include="CHomeDialog.h" />
@@ -290,6 +291,7 @@
<ClCompile Include="CPanel.cpp" />
<ClCompile Include="CParam.cpp" />
<ClCompile Include="CProjectPageComponents.cpp" />
+ <ClCompile Include="CProjectPageMain.cpp" />
<ClCompile Include="CRemoteEqUnitView.cpp" />
<ClCompile Include="CRemoteEqView.cpp" />
<ClCompile Include="CHomeDialog.cpp" />
diff --git a/SourceCode/Bond/BondEq/CPanelProject.cpp b/SourceCode/Bond/BondEq/CPanelProject.cpp
index 0aa4518..f82ef3b 100644
--- a/SourceCode/Bond/BondEq/CPanelProject.cpp
+++ b/SourceCode/Bond/BondEq/CPanelProject.cpp
@@ -18,7 +18,8 @@
m_hbrBkgnd = nullptr;
m_nPanelWidth = int((double)GetSystemMetrics(SM_CXSCREEN) * 0.25);
m_pAccordionWnd = nullptr;
- m_pPageRemoteEqs = nullptr;
+ //m_pPageRemoteEqs = nullptr;
+ m_pPageMain = nullptr;
m_pPageComponents = nullptr;
}
@@ -71,10 +72,15 @@
m_pAccordionWnd->Setpadding(PADDING_BOTTOM, 2);
m_pAccordionWnd->LoadExpandIcon(strExpandIcon, strCloseIcon);
- m_pPageRemoteEqs = new CProjectPageRemoteEqs();
- m_pPageRemoteEqs->Create(IDD_PROJECT_PAGE_REMOTEEQS, GetDlgItem(IDC_ACCORDION_WND1));
- m_pPageRemoteEqs->ShowWindow(SW_SHOW);
- m_pAccordionWnd->AddItem("杩滅▼璁惧", m_pPageRemoteEqs, 0, TRUE, TRUE);
+ //m_pPageRemoteEqs = new CProjectPageRemoteEqs();
+ //m_pPageRemoteEqs->Create(IDD_PROJECT_PAGE_REMOTEEQS, GetDlgItem(IDC_ACCORDION_WND1));
+ //m_pPageRemoteEqs->ShowWindow(SW_SHOW);
+ //m_pAccordionWnd->AddItem("杩滅▼璁惧", m_pPageRemoteEqs, 0, TRUE, TRUE);
+
+ m_pPageMain = new CProjectPageMain();
+ m_pPageMain->Create(IDD_PROJECT_PAGE_MAIN, GetDlgItem(IDC_ACCORDION_WND1));
+ m_pPageMain->ShowWindow(SW_SHOW);
+ m_pAccordionWnd->AddItem("涓婚〉闈�", m_pPageMain, 0, TRUE, TRUE);
m_pPageComponents = new CProjectPageComponents();
m_pPageComponents->Create(IDD_PROJECT_PAGE_COMPONENTS, GetDlgItem(IDC_ACCORDION_WND1));
@@ -121,10 +127,16 @@
m_pPageComponents = nullptr;
}
- if (m_pPageRemoteEqs != nullptr) {
- m_pPageRemoteEqs->DestroyWindow();
- delete m_pPageRemoteEqs;
- m_pPageRemoteEqs = nullptr;
+ //if (m_pPageRemoteEqs != nullptr) {
+ // m_pPageRemoteEqs->DestroyWindow();
+ // delete m_pPageRemoteEqs;
+ // m_pPageRemoteEqs = nullptr;
+ //}
+
+ if (m_pPageMain != nullptr) {
+ m_pPageMain->DestroyWindow();
+ delete m_pPageMain;
+ m_pPageMain = nullptr;
}
}
diff --git a/SourceCode/Bond/BondEq/CPanelProject.h b/SourceCode/Bond/BondEq/CPanelProject.h
index 3b3f7f6..947c345 100644
--- a/SourceCode/Bond/BondEq/CPanelProject.h
+++ b/SourceCode/Bond/BondEq/CPanelProject.h
@@ -1,6 +1,7 @@
锘�#pragma once
#include "VerticalLine.h"
-#include "CProjectPageRemoteEqs.h"
+//#include "CProjectPageRemoteEqs.h"
+#include "CProjectPageMain.h"
#include "CProjectPageComponents.h"
#include "AccordionWnd.h"
@@ -29,7 +30,8 @@
HBRUSH m_hbrBkgnd;
int m_nPanelWidth;
CAccordionWnd* m_pAccordionWnd;
- CProjectPageRemoteEqs* m_pPageRemoteEqs;
+ //CProjectPageRemoteEqs* m_pPageRemoteEqs;
+ CProjectPageMain* m_pPageMain;
CProjectPageComponents* m_pPageComponents;
diff --git a/SourceCode/Bond/BondEq/Resource.h b/SourceCode/Bond/BondEq/Resource.h
index 91f22e1..4e3cdb4 100644
--- a/SourceCode/Bond/BondEq/Resource.h
+++ b/SourceCode/Bond/BondEq/Resource.h
Binary files differ
diff --git a/SourceCode/Bond/BondEq/View/RecipeListDlg.cpp b/SourceCode/Bond/BondEq/View/RecipeListDlg.cpp
index 9546dca..942dc0b 100644
--- a/SourceCode/Bond/BondEq/View/RecipeListDlg.cpp
+++ b/SourceCode/Bond/BondEq/View/RecipeListDlg.cpp
@@ -426,6 +426,7 @@
CString strSelectedRecipe = m_grid.GetItemText(nSelect, 1);
if (RecipeManager::getInstance().loadRecipe(std::string(CT2A(strSelectedRecipe)))) {
m_staticCurrRecipe->SetWindowText(strSelectedRecipe);
+ m_staticCurrRecipe->SetBkColor(RGB(0, 110, 110));
}
else {
AfxMessageBox(_T("鍔犺浇閰嶆柟澶辫触锛�"));
--
Gitblit v1.9.3