Files
envi-code/SourceCode/Code2026/Dimension/EditPipeDnGradientDlg.h
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

115 lines
3.2 KiB
C++

#pragma once
#include "resource.h"
#include "symbdialog.h"
#include "ElevationCalc.h"
#include "CColorButton.h"
class CEditPipeDnGradientDlg : public CModelessDialog
{
public:
CEditPipeDnGradientDlg(int iType, CWnd* pParent = NULL);
void ModifyPipe();
void SetPipeList(SSearchPipeList *pList);
void SetSysEntity(PickSet &ss); // 管道系统中所有实体
DECLARE_DYNAMIC(CEditPipeDnGradientDlg)
//{{AFX_DATA(CEditPipeDnGradientDlg)
enum { IDD = IDD_PIPE_RADIUSGRADIENT };
int m_nPipeDnIndex;
//}}AFX_DATA
//{{AFX_VIRTUAL(CEditPipeDnGradientDlg)
public:
virtual BOOL DestroyWindow();
protected:
virtual void DoDataExchange(CDataExchange* pDX);
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(CEditPipeDnGradientDlg)
afx_msg LONG_PTR onAcadKeepFocus(UINT_PTR, LONG_PTR);
afx_msg void OnRadioPipedn1();
virtual BOOL OnInitDialog();
afx_msg void OnRadioPipedn2();
afx_msg void OnRadioPipedn3();
afx_msg void OnRadioPipedn4();
afx_msg void OnRadioPipedn5();
afx_msg void OnRadioPipedn6();
afx_msg void OnRadioPipedn7();
afx_msg void OnRadioPipedn8();
afx_msg void OnRadioPipedn9();
afx_msg void OnRadioPipedn10();
afx_msg void OnRadioPipedn11();
afx_msg void OnRadioPipedn12();
afx_msg void OnRadioPipedn13();
afx_msg void OnRadioPipedn14();
afx_msg void OnRadioPipedn15();
afx_msg void OnRadioPipedn16();
afx_msg void OnRadioPipedn17();
afx_msg void OnRadioPipedn18();
afx_msg void OnButtonGradient1();
afx_msg void OnButtonGradient2();
afx_msg void OnButtonGradient3();
afx_msg void OnButtonGradient4();
afx_msg void OnButtonGradient5();
afx_msg void OnButtonGradient6();
afx_msg void OnButtonGradient7();
afx_msg void OnButtonGradient8();
afx_msg void OnButtonGradient9();
afx_msg void OnButtonGradient10();
afx_msg void OnButtonGradient11();
afx_msg void OnButtonGradient12();
afx_msg void OnButtonGradient13();
afx_msg void OnButtonGradient14();
afx_msg void OnChangeEditGradient();
afx_msg void OnClose();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
void SetEditGradient();
void SetGradientFocus(); // 根据当前坡度值,将焦点设置在与其值相同的按键上
void UpdateDnGradient(); // 更新管径坡度对应关系
void InitDnGradient(); // 初始化管径坡度关系
void UpdateGradient(); // 管径变化时,更新与之对应的坡度
void InitPipeColor();
BOOL GetPipeColor(int &nColor, double dDn); // 获得当前管径对应的颜色
void GetPipeOriginColor(PickSet &ss); // 管段原始颜色
void RecoverPipeOriginColor(); // 恢复管段原始颜色
void ChangePipeColorDnGradient(PickSet &ss);
void ChangePipeColor(PickSet &ss);
void SetBtnText();
private:
double m_dPipeDn; // 当前管径
double m_dPipeGradient; // 当前坡度
std::map<double, double> m_mapData; // 不同管径对应的坡度值
std::map<double, int> m_mapColor; // 不同管径对应的颜色值
std::map<AcDbObjectId, int> m_mapOriginColor; // 管道对应的原始颜色
CColorButton m_wndBtn1, m_wndBtn2, m_wndBtn3, m_wndBtn4, m_wndBtn5, m_wndBtn6, m_wndBtn7, m_wndBtn8, m_wndBtn9;
CColorButton m_wndBtn10, m_wndBtn11, m_wndBtn12, m_wndBtn13, m_wndBtn14, m_wndBtn15, m_wndBtn16, m_wndBtn17, m_wndBtn18;
SSearchPipeList *m_pLstAll;
};