From a56b1aade6f788f68a2474f524f004706f0d14a7 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期三, 14 五月 2025 14:15:19 +0800
Subject: [PATCH] 1. 添加配方和PPID管理界面
---
SourceCode/Bond/Servo/ServoDlg.cpp | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index eeba9a2..af02e73 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -75,6 +75,7 @@
m_pPageGraph2 = nullptr;
m_pPageAlarm = nullptr;
m_pPageLog = nullptr;
+ m_pPageRecipe = nullptr;
}
void CServoDlg::DoDataExchange(CDataExchange* pDX)
@@ -214,6 +215,8 @@
m_pPageGraph1->Create(IDD_PAGE_GRAPH1, this);
m_pPageGraph2 = new CPageGraph2();
m_pPageGraph2->Create(IDD_PAGE_GRAPH2, this);
+ m_pPageRecipe = new CPageRecipe();
+ m_pPageRecipe->Create(IDD_PAGE_RECIPE, this);
m_pPageAlarm = new CPageAlarm();
m_pPageAlarm->Create(IDD_DIALOG_ALARM, this);
m_pPageLog = new CPageLog();
@@ -224,6 +227,7 @@
m_pTab->SetItemMarginLeft(18);
m_pTab->AddItem("状态图", FALSE);
m_pTab->AddItem("连接图", TRUE);
+ m_pTab->AddItem("配方", TRUE);
m_pTab->AddItem("报警", TRUE);
m_pTab->AddItem("日志", TRUE);
m_pTab->SetCurSel(0);
@@ -523,6 +527,12 @@
m_pPageGraph2 = nullptr;
}
+ if (m_pPageRecipe != nullptr) {
+ m_pPageRecipe->DestroyWindow();
+ delete m_pPageRecipe;
+ m_pPageRecipe = nullptr;
+ }
+
if (m_pPageAlarm != nullptr) {
m_pPageAlarm->DestroyWindow();
delete m_pPageAlarm;
@@ -552,6 +562,7 @@
if (GetDlgItem(IDC_TAB1) == nullptr) return;
if (m_pPageGraph1 == nullptr) return;
if (m_pPageGraph2 == nullptr) return;
+ if (m_pPageRecipe == nullptr) return;
if (m_pPageAlarm == nullptr) return;
if (m_pPageLog == nullptr) return;
@@ -596,6 +607,7 @@
m_pPageGraph1->MoveWindow(x, y, rcClient.Width() - x, rcClient.Height() - y);
m_pPageGraph2->MoveWindow(x, y, rcClient.Width() - x, rcClient.Height() - y);
+ m_pPageRecipe->MoveWindow(x, y, rcClient.Width() - x, rcClient.Height() - y);
m_pPageAlarm->MoveWindow(x, y, rcClient.Width() - x, rcClient.Height() - y);
m_pPageLog->MoveWindow(x, y, rcClient.Width() - x, rcClient.Height() - y);
}
@@ -658,9 +670,9 @@
void CServoDlg::ShowChildPage(int index)
{
- ASSERT(0 <= index && index < 4);
- static CWnd* pPages[] = { m_pPageGraph1, m_pPageGraph2, m_pPageAlarm, m_pPageLog };
- for (int i = 0; i < 4; i++) {
+ ASSERT(0 <= index && index < 5);
+ static CWnd* pPages[] = { m_pPageGraph1, m_pPageGraph2, m_pPageRecipe, m_pPageAlarm, m_pPageLog };
+ for (int i = 0; i < 5; i++) {
pPages[i]->ShowWindow(i == index ? SW_SHOW : SW_HIDE);
}
}
\ No newline at end of file
--
Gitblit v1.9.3