#pragma once #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; // 连接件代号 UINT m_nFitCode; // 连接件 0:弯头、1:变径、2:三通、3:四通、4:天圆地方、5:乙字弯 UINT m_nFitType; // Ado对象,用于访问数据库 CUIISQLiteServer* m_pAdoUi; // 指定类型设备信息(矩形) CUIIValueTable m_cTblFitInfoRect; // 指定设备信息(圆形) CUIIValueTable m_cTblFitInfoRoun; // 默认构件索引 int m_iCurDefaIndexRow; int m_iCurDefaIndexCol; // 数据库中默认连接件名称 CString m_sDefaFitRect; CString m_sDefaFitRoun; // 当前连接件名称 CString m_sCurFitRoun; CString m_sCurFitRect; // 当前设备对应的参数表名 CString m_sCurParamTable; // 属性树当前"根" CPropItem* m_pCurRoot; // 当前构件的参数信息 CMapFitaram m_mapCurFitParam; // 示意图表格 CMfcGridCtrl m_wndGridPreview; // 构件属性树 CPropCtrl m_wndPorpInfo; // 双击编辑模式时,要编辑的id AcDbObjectId m_idToEdit; // 当前选择的管件名称 CString m_sCurrName; int m_iRadSectType; CString m_csSysType; BOOL m_bChkSingleLine; public: CButton m_wndFllowDirBt; BOOL m_bFloorDir; };