Files
envi-code/SourceCode/Code2026/HvacCmd/HFitingStyleDlg.h
T

134 lines
3.0 KiB
C++
Raw Normal View History

2026-10-04 00:04:20 +08:00
#pragma once
2026-09-28 15:28:50 +08:00
#include "resource.h"
#include "PropItem.h"
#include "PropList.h"
#include "PropCtrl.h"
#include "MfcGridCtrl.h"
class CHFitingStyleDlg : public CDialog
{
DECLARE_DYNAMIC(CHFitingStyleDlg)
public:
CHFitingStyleDlg(UINT nFitType,int nSectType, AcDbObjectId idToEdit = NULL, CWnd* pParent = NULL);
virtual ~CHFitingStyleDlg();
enum { IDD = IDD_HFITING_STYLE_DLG };
UINT GetFitCode();
int GetFitSect();
void GetFitParamMap(CMapFitaram& mapFitParam);
protected:
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
afx_msg void OnBnClickedOk();
afx_msg void OnGridPreviewClick(NMHDR *pNotifyStruct, LRESULT* pResult);
afx_msg void OnRadRect();
afx_msg void OnRadRoun();
afx_msg LRESULT OnGridSelectChanged(WPARAM iParam1, LPARAM iParam2);
afx_msg LRESULT OnGridButtonClick(WPARAM iParam1, LPARAM iParam2);
private:
BOOL ShowFittingStyle();
void DialogVarsFromID();
void ShowFitingInfo(LPCTSTR pszName, UINT nFalg);
void GetFitParamMap(CUIIValueTable& cFitParam, LPCTSTR pszFitParam);
void FillDropDownComb(LPCTSTR pszParamCode, CPropItem* pRoot, UINT nShowStatus);
void FillDropListComb(LPCTSTR pszParamCode, CPropItem* pRoot, UINT nShowStatus);
void FillEditItem(LPCTSTR pszParamCode, UINT nOption, CPropItem* pRoot,UINT nShowStatus);
CString GetDefTblName(UINT nType);
void ModifyGridValueByEnt();
void ShowTreeItem();
void SubShowTreeItem(const CString &csItemLable, BOOL bShow);
void ChangCtrlByMode();
void SetItemValueByLable( CString csLable, double dValue, int nPreci = 0 );
void SetItemValueByLable(CString csLable, CString csValue);
void SetTreeItemWrite( const CString &csItemLable, BOOL bWrite );
CString GetPath(int nStyle);
void UpdateDbDefault();
void SettingInterface(LPCTSTR pszName, UINT nFalg);
void BeginEditorCommand();
void EndEditorCommand();
void OnReplace();
protected:
int m_iCode;
CString m_sSysType;
2026-10-04 00:04:20 +08:00
// 连接件代号
2026-09-28 15:28:50 +08:00
UINT m_nFitCode;
2026-10-04 00:04:20 +08:00
// 连接件 0:弯头、1:变径、2:三通、3:四通、4:天圆地方、5:乙字弯
2026-09-28 15:28:50 +08:00
UINT m_nFitType;
2026-10-04 00:04:20 +08:00
// Ado对象,用于访问数据库
2026-09-28 15:28:50 +08:00
CUIISQLiteServer* m_pAdoUi;
2026-10-04 00:04:20 +08:00
// 指定类型设备信息(矩形)
2026-09-28 15:28:50 +08:00
CUIIValueTable m_cTblFitInfoRect;
2026-10-04 00:04:20 +08:00
// 指定设备信息(圆形)
2026-09-28 15:28:50 +08:00
CUIIValueTable m_cTblFitInfoRoun;
2026-10-04 00:04:20 +08:00
// 默认构件索引
2026-09-28 15:28:50 +08:00
int m_iCurDefaIndexRow;
int m_iCurDefaIndexCol;
2026-10-04 00:04:20 +08:00
// 数据库中默认连接件名称
2026-09-28 15:28:50 +08:00
CString m_sDefaFitRect;
CString m_sDefaFitRoun;
2026-10-04 00:04:20 +08:00
// 当前连接件名称
2026-09-28 15:28:50 +08:00
CString m_sCurFitRoun;
CString m_sCurFitRect;
2026-10-04 00:04:20 +08:00
// 当前设备对应的参数表名
2026-09-28 15:28:50 +08:00
CString m_sCurParamTable;
2026-10-04 00:04:20 +08:00
// 属性树当前"根"
2026-09-28 15:28:50 +08:00
CPropItem* m_pCurRoot;
2026-10-04 00:04:20 +08:00
// 当前构件的参数信息
2026-09-28 15:28:50 +08:00
CMapFitaram m_mapCurFitParam;
2026-10-04 00:04:20 +08:00
// 示意图表格
2026-09-28 15:28:50 +08:00
CMfcGridCtrl m_wndGridPreview;
2026-10-04 00:04:20 +08:00
// 构件属性树
2026-09-28 15:28:50 +08:00
CPropCtrl m_wndPorpInfo;
2026-10-04 00:04:20 +08:00
// 双击编辑模式时,要编辑的id
2026-09-28 15:28:50 +08:00
AcDbObjectId m_idToEdit;
2026-10-04 00:04:20 +08:00
// 当前选择的管件名称
2026-09-28 15:28:50 +08:00
CString m_sCurrName;
int m_iRadSectType;
CString m_csSysType;
BOOL m_bChkSingleLine;
public:
CButton m_wndFllowDirBt;
BOOL m_bFloorDir;
};