Skip to content

Commit

Permalink
去除冗余代码。
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoweihan committed Sep 21, 2017
1 parent c6c60b4 commit 9259e10
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
5 changes: 3 additions & 2 deletions Src/Edislab/Edislab Pro/ChartFigureDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "DlgChartSet.h"
#include "DlgTabPanel.h"
#include "Msg.h"
#include "Macro.h"
// ChartFigureDlg 对话框
#define TIMER_CHART_EVENT (1000011)
#define TIMER_CHART (300)
Expand Down Expand Up @@ -159,7 +160,7 @@ void ChartFigureDlg::OnPaint()
if (TRUE == m_bActiveFlag)
{
CPen BoradrPen;
BoradrPen.CreatePen(PS_SOLID,5,ActiveColor);
BoradrPen.CreatePen(PS_SOLID,5,ACTIVE_COLOR);
CPen* pOldPen = dc.SelectObject(&BoradrPen);

dc.MoveTo(rc.left,rc.top);
Expand All @@ -179,7 +180,7 @@ void ChartFigureDlg::OnPaint()
}else
{
CPen BoradrPen;
BoradrPen.CreatePen(PS_SOLID,5,UnActiveColor);
BoradrPen.CreatePen(PS_SOLID,5,INACTIVE_COLOR);
CPen* pOldPen = dc.SelectObject(&BoradrPen);
dc.MoveTo(rc.left,rc.top);
dc.LineTo(rc.right,rc.top);
Expand Down
2 changes: 0 additions & 2 deletions Src/Edislab/Edislab Pro/ChartXY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
#define _USE_CTRL_MATH_DEFINES
#include <math.h>
#include <boost/foreach.hpp>
#include "Global.h"
#include "ChartManager.h"
#include "GridColumnGroupManager.h"
//#include "SensorIDGenerator.h"
#include "SensorManager.h"
#include "SensorData.h"
#include "SensorDataManager.h"
Expand Down
2 changes: 1 addition & 1 deletion Src/Edislab/Edislab Pro/ChartXY.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class ChartXY
SENSOR_TYPE_KEY m_nXID;
CString m_strX;
CString m_strY;
std::vector<GROUPDATA> m_allData;
//std::vector<GROUPDATA> m_allData;
//数据值 更改时要重新计算
std::vector<ChartXYData> m_vecLineData;
};
Expand Down
7 changes: 3 additions & 4 deletions Src/Edislab/Edislab Pro/DlgGridContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@
#include <boost/bind.hpp>
#include "Log.h"
#include "GridColumnGroupManager.h"
//#include "SensorIDGenerator.h"
#include "SensorManager.h"
#include "SensorData.h"
#include "SensorDataManager.h"
#include "SensorConfig.h"
#include "DlgTabPanel.h"
#include "Msg.h"
#include "Global.h"
#include "Macro.h"
#include "Utility.h"
#include "DlgGridOpt.h"
#include "DlgAddColumn.h"
Expand Down Expand Up @@ -425,7 +424,7 @@ void CDlgGridContainer::OnPaint()
if (TRUE == m_bActiveFlag)
{
CPen BoradrPen;
BoradrPen.CreatePen(PS_SOLID,5,ActiveColor);
BoradrPen.CreatePen(PS_SOLID,5,ACTIVE_COLOR);
CPen* pOldPen = dc.SelectObject(&BoradrPen);

dc.MoveTo(rc.left,rc.top);
Expand All @@ -446,7 +445,7 @@ void CDlgGridContainer::OnPaint()
else
{
CPen BoradrPen;
BoradrPen.CreatePen(PS_SOLID,5,UnActiveColor);
BoradrPen.CreatePen(PS_SOLID,5,INACTIVE_COLOR);
CPen* pOldPen = dc.SelectObject(&BoradrPen);
dc.MoveTo(rc.left,rc.top);
dc.LineTo(rc.right,rc.top);
Expand Down
10 changes: 4 additions & 6 deletions Src/Edislab/Edislab Pro/GaugeDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
#include "stdafx.h"
#include "Edislab Pro.h"
#include "GaugeDlg.h"
#include <math.h>
#include "DlgDeviceSet.h"
#include "math.h"
//#include "GlobalDataManager.h"
#include "Global.h"
#include "Macro.h"
#include "DlgTabPanel.h"
#include "Msg.h"
#include "GridColumnGroupManager.h"
//#include "SensorIDGenerator.h"
#include "SensorData.h"
#include "SensorDataManager.h"
#include "SensorManager.h"
Expand Down Expand Up @@ -361,7 +359,7 @@ void GaugeDlg::OnPaint()
if (TRUE == m_bActiveFlag)
{
CPen BoradrPen;
BoradrPen.CreatePen(PS_SOLID,5,ActiveColor);
BoradrPen.CreatePen(PS_SOLID,5,ACTIVE_COLOR);
CPen* pOldPen = dc.SelectObject(&BoradrPen);

dc.MoveTo(rc.left,rc.top);
Expand All @@ -382,7 +380,7 @@ void GaugeDlg::OnPaint()
else
{
CPen BoradrPen;
BoradrPen.CreatePen(PS_SOLID,5,UnActiveColor);
BoradrPen.CreatePen(PS_SOLID,5,INACTIVE_COLOR);
CPen* pOldPen = dc.SelectObject(&BoradrPen);
dc.MoveTo(rc.left,rc.top);
dc.LineTo(rc.right,rc.top);
Expand Down
5 changes: 2 additions & 3 deletions Src/Edislab/Edislab Pro/Global.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#ifndef GLOBAL_H
#define GLOBAL_H

#if 1
#if 0
#include <set>
#include <vector>

Expand All @@ -18,8 +18,6 @@
///************************************************************************/
//Grid常量定义
///************************************************************************/
const COLORREF UnActiveColor = RGB(200,200,200);
const COLORREF ActiveColor = RGB(0,0,25);
#define DEFUALT_COLUMN_NAME_X _T("X")
#define DEFUALT_COLUMN_NAME_Y _T("Y")
#define CURRENT_GROUP _T("当前组")
Expand All @@ -40,6 +38,7 @@ const COLORREF ActiveColor = RGB(0,0,25);
#define MAX_COLUMN_NUM 20 //每组最多支持20组
#define LAB_MAX_COUNT 6
#define MAX_WIDGET_NUM 9

/******************************************************************************/
/////////////////////////////////实验数据定义区//////////////////////////////////
/******************************************************************************/
Expand Down
5 changes: 5 additions & 0 deletions Src/Edislab/Edislab Pro/Macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,9 @@

//默认的页名称
#define DEFAULT_PAGE_NAME (_T("实验页"))

//未激活时对话框的边框颜色
#define INACTIVE_COLOR (RGB(200,200,200))
//激活时对话框的边框颜色
#define ACTIVE_COLOR (RGB(0,0,25))
#endif

0 comments on commit 9259e10

Please sign in to comment.