#if !defined(AFX_LAYFIREEXTINGUISHERDLG_H__8E521EC9_FAD9_4813_AD5C_1CBE50EB41AE__INCLUDED_) #define AFX_LAYFIREEXTINGUISHERDLG_H__8E521EC9_FAD9_4813_AD5C_1CBE50EB41AE__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "resource.h" #include "afxwin.h" #include #include "PickEntSet.h" class CLayFireExtinguisherDlg : public CDialog { public: CLayFireExtinguisherDlg(int iType, CWnd* pParent = NULL); DECLARE_DYNAMIC(CLayFireExtinguisherDlg) // 图块名 CString GetSelBlkName(); // 选型 int GetSpecType(); // 布置方式 int GetLayType(); void SetLayType(int nLayType); // 是否标注 BOOL IsDim(); // 布置与标注方式 int GetLayDimType(); // 文字类型 CString GetTextStyle(); // 字高 double GetTextHeight(); void SetTextHeight(double dTextHeight); // 灭火器布置个数 int GetCount(); void SetCount(int nCount); // 规格 CString GetSpecification(); // 级别 CString GetGrade(); // 是否为切换布置方式而重启命令 BOOL IsReStartForLay(); void ReStartForLay(bool bReStart); // 布置位置 cet 2013.4.9 add int GetLayPos() const; void SetLayPos(int nPos); // 灭火器比例 cet 2013.4.9 double GetScale(); void SetScale(double dScale); // 是否显示保护 cet 2013.4.22 add BOOL IsShowRadius(); // 保护半径 cet 2013.4.22 add double GetProtectRadius(); // 需要控制保护半径的灭火器 cet 2013.4.22 add void SetFireExtinguisher(PickSet &ss); // 删除保护半径 cet 2013.4.22 add void DeleteProtectRadius(); // 显示保护半径 cet 2013.4.22 add void ShowProtectRadius(PickSet &ss); // 根据图块名,获取选型类型 int GetSpecTypeByBlkName(const CString &sBlkName); void SetNewFireExtinguisher(PickSet &ss); PickSet GetNewFireExtinguisher(); //{{AFX_DATA(CLayFireExtinguisherDlg) enum { IDD = IDD_LAY_FIRE_EXTINGUISHER }; CSpinButtonCtrl m_wndSpinCount; CComboBox m_wndCmbTextStyle; CComboBox m_wndCmbGrade; CComboBox m_wndCmbSpec; CComboBox m_wndCmbTextHeight; int m_nSpecificationType; // 选型 int m_nLayType; // 布置方式 int m_nDimType; // 标注 int m_nLayDimType; // 布置与标注方式 CString m_sSpecification; // 规格 CString m_sGrade; // 级别 CString m_sTextStyle; // 文字样式 int m_nScale; // 比例缩放形式 int m_nPos; CString m_sCount; CString m_sScale; CString m_sTextHeight; CString m_sProtectRadius; BOOL m_bShowProtectRadius; bool m_bInit; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CLayFireExtinguisherDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); //}}AFX_VIRTUAL protected: //{{AFX_MSG(CLayFireExtinguisherDlg) afx_msg void OnStaticPreview(); afx_msg void OnPaint(); virtual BOOL OnInitDialog(); afx_msg void OnDestroy(); afx_msg void OnRadioSpecType(); afx_msg void OnRadioDim(); afx_msg void OnSelchangeCmbSpecification(); afx_msg void OnClose(); afx_msg void OnRadioRangLay(); afx_msg void OnRadioRandomLay(); afx_msg void OnCheckPortectRadius(); afx_msg void OnRadioScaleOld(); afx_msg void OnRadioScaleNew(); afx_msg void OnKillfocusTextHeight(); afx_msg void OnKillfocusNum(); afx_msg void OnKillfocusScale(); afx_msg void OnKillfocusProtectRadius(); afx_msg void OnKillfocusSpecification(); afx_msg void OnKillfocusGrade(); afx_msg void OnRadioByLineLay(); afx_msg LONG_PTR onAcadKeepFocus(UINT_PTR, LONG_PTR); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: struct DataNode; void OpenSlide(); // 读取数据 void ReadDataFromReg(); // 保存数据 void WriteToReg(); // 获取灭火器数据 void GetFireExtinguisherDataFromDbf(); // 获得特定类型规格的灭火器等级 void GetGradeData(int nTypeId, const CString &sSpec, std::vector &vecGrade); // 获得灭火器类型id int GetTypeId(); // 初始化规格数据 void InitSpecification(); // 初始化级别 void InitGrade(); // 加载文字样式 void LoadTextStyle(); // 设置是否位置关系可用 void SetEnableWndPos(); // 显示保护半径 void ShowProtectRadius(Entity &entRef); void SetPickset(PickSet ss); void InitDlgData(); public: struct DataNode // 灭火器数据 { CString sTypeName; // 型号规格 CString sTypeA; // 级别 CString sTypeB; // 级别 CString sRemark; // 备注 int nTypeId; // 类型 }; CString m_sBlkName; // 选择的图块名 std::vector m_vecData; // 灭火器数据 std::set m_setTextStyle; // 文字样式 BOOL m_bRestartForLay; // 是否是切换布置方式导致的重新启动对话框 PickSet m_ssShowCir; // 保护半径显示的圆 cet 2013.4.22 add PickSet m_ssNewCir; PickSet m_ssFireExtinguisher; // 当前图纸上的灭火器 cet 2013.4.22 add int m_iType; // 对话框模式,1:编辑模式2:修改模式 PickSet m_ss; std::vector m_vecCount; std::vector m_vecScale; std::vector m_vecProRadius; std::vector m_vecGrade; std::set m_setSpecification; afx_msg void OnBnClickedOk(); CComboBox m_wndProRadius; CComboBox m_wndScale; CComboBox m_wndNum; bool m_bIsDiffPre; afx_msg void OnCbnKillfocusCmbProradius(); afx_msg void OnCbnKillfocusCmbScale(); afx_msg void OnCbnKillfocusCmbNum(); }; //{{AFX_INSERT_LOCATION}} #endif // !defined(AFX_LAYFIREEXTINGUISHERDLG_H__8E521EC9_FAD9_4813_AD5C_1CBE50EB41AE__INCLUDED_)