Files
envi-code/SourceCode/Code2026/tg_shs/shs_TwtKernal/NewSanitaryDefineDlg.h
T

150 lines
3.8 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#if !defined(AFX_NEWSANITARYDEFINEDLG_H__AEE32686_6FEC_49E8_85F3_C937122B59D8__INCLUDED_)
2026-09-28 15:28:50 +08:00
#define AFX_NEWSANITARYDEFINEDLG_H__AEE32686_6FEC_49E8_85F3_C937122B59D8__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#include "SanitaryPicDlg.h"
#endif // _MSC_VER > 1000
#pragma once
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
2026-10-04 00:04:20 +08:00
//存储洁具本身相关数据
2026-09-28 15:28:50 +08:00
class CSanitaryInfo
{
public:
CString sDwbName;
CString sSysBlk1;
CString sSysBlk2;
CString sFeedSys;
double dDang;
double dBigQ;
double dPtFeedElev;
double dNg;
double dRateQ;
CString sFeedElev;
CString sHotElev;
2026-10-04 00:04:20 +08:00
int CheckEntInfo();//判断洁具本身携带的数据量
2026-09-28 15:28:50 +08:00
void Clear();
CSanitaryInfo();
};
class CNewSanitaryDefineDlg : public CDialog
{
public:
CNewSanitaryDefineDlg(CWnd* pParent = NULL);
2026-10-04 00:04:20 +08:00
void SetSanitaryType(int iType); //设定洁具类型
void SetPreviewPic(); //初始化幻灯片
void SetBtnText(); //初始化按钮
2026-09-28 15:28:50 +08:00
void OpenSlide();
2026-10-04 00:04:20 +08:00
void OnPreviewPic(const int iIndex); //放大当前选中图片
2026-09-28 15:28:50 +08:00
void TranslateData(const int iIndex);
2026-10-04 00:04:20 +08:00
void GetDataFromDB(const int iIndex); //从数据库读取幻灯片数据
void SetPicSelBColor(); //设定选中图片背景色和按钮状态
void UpdateDBdata(); //更新数据库
2026-09-28 15:28:50 +08:00
void GetPicFromDB();
void SetSelPic();
void SetPic(CString &sPic);
void SetSanitaryPos();
void SetEntInfo();
2026-10-04 00:04:20 +08:00
bool IsChanged(); //检查数据库是否需要更新
2026-09-28 15:28:50 +08:00
double SetSanitaryDriection(Entity ent);
2026-10-04 00:04:20 +08:00
void SetDataSourceType(int nDataSource);//获取数据源类型
2026-09-28 15:28:50 +08:00
//{{AFX_DATA(CNewSanitaryDefineDlg)
enum { IDD = IDD_NEW_SANITARY_DEFINE };
CEdit m_wndHeatPipe;
CScrollBar m_wndScroll;
int m_iType;
int m_iFeedElev;
//}}AFX_DATA
Entity m_ent;
CString m_csBlkName, m_csDrainBlk;
XPoint m_ptFeed, m_ptDrain, m_ptHeatFeed, m_ptDriection;
AcDbObjectId m_id;
2026-10-04 00:04:20 +08:00
CSanitaryInfo m_entInfo, m_DbInfo, m_CurInfo, m_CurInfo2;// 存储实体信息,数据库信息和当前信息的结构
2026-09-28 15:28:50 +08:00
CSanitaryPicDlg *m_pDlgPic;
bool m_bIsInitDlg;
CString m_sPic[6];
2026-10-04 00:04:20 +08:00
CDataExchange *pDXSave, *pDXLoad;//对话框单个控件数据更新
2026-09-28 15:28:50 +08:00
private:
2026-10-04 00:04:20 +08:00
int m_iCurPos; //当前滚动条位置
int m_iSanitaryType;//当前大类类型
int m_iCurPic; //当前选中幻灯片
int m_iSelPos; //记录滚动条位置
2026-09-28 15:28:50 +08:00
std::vector<CString> m_vecPic;
CString m_sPicName[6];
2026-10-04 00:04:20 +08:00
//记录选中幻灯片位置
2026-09-28 15:28:50 +08:00
int m_iCurPic2;
int m_iSelPos2;
int m_nDataSourceType;
//{{AFX_VIRTUAL(CNewSanitaryDefineDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX);
//}}AFX_VIRTUAL
protected:
//{{AFX_MSG(CNewSanitaryDefineDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg void OnPreview2();
afx_msg void OnPreview3();
afx_msg void OnRadioType1();
afx_msg void OnButtonPick1();
afx_msg void OnButtonPick2();
afx_msg void OnButtonPick3();
afx_msg void OnButtonDang();
afx_msg void OnRadioType3();
afx_msg void OnButtonPick4();
afx_msg void OnButtonNg();
afx_msg void OnRadioType4();
afx_msg void OnRadioFeedele1();
afx_msg void OnRadioFeedele2();
afx_msg void OnPreviewPic1();
afx_msg void OnPreviewPic2();
afx_msg void OnPreviewPic3();
afx_msg void OnPreviewPic4();
afx_msg void OnPreviewPic5();
afx_msg void OnPreviewPic6();
afx_msg void OnButton1();
afx_msg void OnButton2();
afx_msg void OnButton3();
afx_msg void OnButton4();
afx_msg void OnButton5();
afx_msg void OnButton6();
afx_msg void OnBtnSelType();
virtual void OnCancel();
virtual void OnOK();
afx_msg void OnMove(int x, int y);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
};
//{{AFX_INSERT_LOCATION}}
#endif // !defined(AFX_NEWSANITARYDEFINEDLG_H__AEE32686_6FEC_49E8_85F3_C937122B59D8__INCLUDED_)