From b67e16869a5bfbbde3896a4e5a13f1301f1b978d Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 13 十二月 2024 14:55:55 +0800
Subject: [PATCH] 1.调整保存警告到数据库的位置; 2.CAlarmMonitor组件不再保存已完成的警告的数据;
---
SourceCode/Bond/BondEq/View/UserManagerDlg.cpp | 21 ++++-----------------
1 files changed, 4 insertions(+), 17 deletions(-)
diff --git a/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp b/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
index 9daa3d1..849c4a9 100644
--- a/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
+++ b/SourceCode/Bond/BondEq/View/UserManagerDlg.cpp
@@ -119,7 +119,7 @@
int nCurrNameRow = -1;
std::vector<std::vector<std::string>> usersData = userManager.getUsers();
if (!usersData.empty()) {
- m_gridUserManager.SetRowCount(usersData.size() + 1);
+ m_gridUserManager.SetRowCount((int)usersData.size() + 1);
for (int i = 0; i < usersData.size(); i++) {
int nRowIdx = i + 1;
@@ -440,23 +440,10 @@
int fontSize = nHeight / 2;
if (fontSize < 8) fontSize = 8;
- // 妫�鏌ュ瓧浣撴槸鍚﹀凡缁忓瓨鍦�
- auto it = m_mapFonts.find(fontSize);
- if (it == m_mapFonts.end()) {
- // 鍔ㄦ�佸垱寤烘柊瀛椾綋
- CFont* newFont = new CFont();
- LOGFONT logFont = { 0 };
- _tcscpy_s(logFont.lfFaceName, _T("Segoe UI"));
- logFont.lfHeight = -fontSize;
- logFont.lfQuality = CLEARTYPE_QUALITY; // 鍚敤 ClearType 鎶楅敮榻�
- newFont->CreateFontIndirect(&logFont);
+ // 鑾峰彇鎴栧垱寤哄瓧浣�
+ CFont* pFont = GetOrCreateFont(fontSize);
- // 瀛樺偍鍒板瓧浣撶鐞嗗鍣ㄤ腑
- m_mapFonts[fontSize] = newFont;
- it = m_mapFonts.find(fontSize);
- }
-
- pWnd->SetFont(it->second);
+ pWnd->SetFont(pFont);
pWnd->Invalidate(); // 鍒锋柊鎺т欢鏄剧ず
}
--
Gitblit v1.9.3