246 lines
8.2 KiB
C++
246 lines
8.2 KiB
C++
#if !defined(AFX_DRAWSTANDPIPEDLG_H__89239000_2716_4880_959E_4E4F51B5FDCA__INCLUDED_)
|
|
#define AFX_DRAWSTANDPIPEDLG_H__89239000_2716_4880_959E_4E4F51B5FDCA__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// DrawStandPipeDlg.h : header file
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CDrawStandPipeDlg dialog
|
|
#include "Resource.h"
|
|
//#include <ModelessDialog.h>
|
|
#include "EdJigEx.h"
|
|
#include "TDbVirtualPipe.h"
|
|
|
|
class CDrawStandPipeDlg;
|
|
class TPipeEdJig : public TSymbEdJig {
|
|
protected:
|
|
XPoint m_pt1, m_pt2;
|
|
AcGeVector3d m_vectBase;
|
|
double m_nRadius;
|
|
int m_iType; // 0: 普通管线 1:立管 2:扣弯
|
|
public:
|
|
TPipeEdJig(XPoint pt, double nRadius, AcGeVector3d vectBase);//沿线布置
|
|
TPipeEdJig(XPoint pt, double nRadius);
|
|
TPipeEdJig(XPoint pt1, XPoint pt2);
|
|
TPipeEdJig(XPoint pt1, XPoint pt2, double nRadius);
|
|
~TPipeEdJig();
|
|
void SetStartPoint(XPoint pt);
|
|
virtual int DoIt(int *pKeyIndex=NULL);
|
|
DragStatus GetPoint(XPoint &pt);
|
|
XPoint GetCorrectPt();
|
|
|
|
// cet 2010.6.23 add
|
|
void IsChangeColor(bool bVal)
|
|
{
|
|
m_bGreen = bVal;
|
|
}
|
|
|
|
void SetDlg(CDrawStandPipeDlg *pDlg);
|
|
// cet 2011.8.1 add 角度盘0度方向
|
|
void SetPipeDir(const AcGeVector3d &vt);
|
|
// cet 2012.3.16 add 设置角度盘角度
|
|
void SetWatchAngle(double dAngle);
|
|
// cet 2012.3.16 add 重绘角度盘
|
|
void RedrawWatch();
|
|
|
|
TDbPipe *m_pPipe;
|
|
TdbVirtualPipe *m_pVirtualPipe; // cet 2011.7.27 add
|
|
XPoint m_ptRef, m_ptPick;
|
|
static int m_iUnit; // 轴锁角度
|
|
double m_nLockAng; // 锁定角度 【管线延长】专用
|
|
BOOL m_bLock, m_bInit;
|
|
protected:
|
|
virtual Adesk::Boolean update();
|
|
virtual AcDbEntity* entity() const;
|
|
|
|
private:
|
|
|
|
void DrawDuctWatch(const AcGePoint3d& ptCenter); // cet 2011.7.27 add 绘制角度盘
|
|
void GetWatchPt(const TADSGePoint3d pt1, TADSGePoint3d &pt, double &dAngle); // cet 2011.7.27 add 根据光标当前点,确定角度盘对应的点
|
|
double GetViewSize(); // cet 2011.8.1 add 视图大小
|
|
AcGePoint3d GetViewCenter(); // cet 2011.8.1 add 视图中心点
|
|
bool Is3DView(); // cet 2011.8.1 add 是否是三维视图
|
|
|
|
private:
|
|
|
|
bool m_bGreen; // cet 2010.6.23 add 是否将动态预览时延长线的颜色设置为绿色,以防止管线与延长线同色
|
|
double m_dWatchScale; // cet 2011.7.27 add 角度盘角度
|
|
TADSGePoint3d m_ptWatch; // cet 2011.7.27 add 角度盘位置
|
|
CDrawStandPipeDlg *m_pDlg; // cet 2011.7.27 add
|
|
AcGeVector3d m_vtWatch; // cet 2011.7.28 add 角度盘0度向量
|
|
double m_dViewSize; // cet 2011.8.1 add 视图大小
|
|
AcGePoint3d m_ptViewCenter; // cet 2011.8.1 add 视图中心点
|
|
|
|
};
|
|
|
|
|
|
class CDrawStandPipeDlg : public CModelessDialog
|
|
{
|
|
// Construction
|
|
public:
|
|
CDrawStandPipeDlg(int iType, CWnd* pParent = NULL); // standard constructor
|
|
|
|
DECLARE_DYNAMIC(CDrawStandPipeDlg)
|
|
~CDrawStandPipeDlg();
|
|
// cet 2010.6.23 add
|
|
bool IsGetEle()
|
|
{
|
|
return m_bEle;
|
|
}
|
|
// 更新标注文字 cet 2011.12.14 add
|
|
void UpdateDimText();
|
|
// 选择角度菜单角度值cet 2012.3.16 add
|
|
BOOL SelectAngleMenuItem(double dAngle);
|
|
// 角度菜单当前选择的角度值 cet 2012.3.16 add
|
|
double GetAngleFromMenu();
|
|
// 是否使用角度盘 cet 2012.3.16 add
|
|
BOOL IsLockAngle();
|
|
// 是否可向cad发送关键字
|
|
void EnableSendKeyToCAD(BOOL bSend);
|
|
// 是否使用角度盘 cet 2012.3.16 add
|
|
void EnableLockAngle(BOOL bEanble);
|
|
// 更新管径 cet 2012.8.30 add bRead控制读写 bCmbSel控制读取数据来自cmb固有数据还是用户输入数据
|
|
void UpdatePipeDn(BOOL bRead = TRUE, BOOL bCmbSel = FALSE);
|
|
// 获得当前编号 cet 2013.3.18 add
|
|
CString GetCurSerialFormat();
|
|
// 更新编号 cet 2013.3.18 add
|
|
void UpdateSerial();
|
|
// 选择集,用于辅助编号设置 cet 2013.3.18 add
|
|
void SetPickset(PickSet &ssPipe);
|
|
|
|
// Dialog Data
|
|
//{{AFX_DATA(CDrawStandPipeDlg)
|
|
enum { IDD = IDD_STAND_PIPE };
|
|
CComboBox m_comboDn;
|
|
CSpinButtonCtrl m_spinName;
|
|
CString m_csDim1;
|
|
CString m_csDim2;
|
|
CString m_csDim3;
|
|
CString m_csDim4;
|
|
CString m_csDim5;
|
|
CString m_csDim6;
|
|
CString m_csDim7;
|
|
CString m_csDim8;
|
|
CString m_csDim9;
|
|
double m_nEleDown;
|
|
double m_nEleUp;
|
|
CString m_csDim10;
|
|
BOOL m_bLockAngle;
|
|
//}}AFX_DATA
|
|
static CString m_csName;
|
|
static CString m_csEle;
|
|
static CString m_csDn;
|
|
static int m_iPipeType; // 关联管道类型
|
|
static int m_iPipeType2; // cet 2011.12.1 add 关联控件
|
|
static int m_iPipeType3; // cet 2011.12.6 add 记录下拉菜单中选择的绘制管线类型
|
|
static int m_iPlace;
|
|
static int m_iPos;
|
|
const TCHAR* GetLayer();
|
|
int GetPipeIdx();
|
|
static CString m_csFloorName;
|
|
// double GetPipeWeight();
|
|
|
|
TPipeSys::SysType GetPipeSysType();
|
|
|
|
int m_iPipeMode; // 0: 普通管线 1:立管
|
|
CMenu *m_pMenu;
|
|
CMenu *m_pMenuEle; // cet 2010.6.23 add
|
|
|
|
void PullMenu();
|
|
void ResetShowRadio();
|
|
void ResetRegion();
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CDrawStandPipeDlg)
|
|
public:
|
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CDrawStandPipeDlg)
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg void OnClose();
|
|
afx_msg void OnRadioPlace1();
|
|
afx_msg void OnRadioPlace2();
|
|
afx_msg void OnRadioPlace3();
|
|
afx_msg void OnButtonSetting();
|
|
afx_msg void OnRadioPipetype1();
|
|
afx_msg void OnRadioPipetype2();
|
|
afx_msg void OnRadioPipetype3();
|
|
afx_msg void OnRadioPipetype4();
|
|
afx_msg void OnRadioPipetype5();
|
|
afx_msg void OnRadioPipetype6();
|
|
afx_msg void OnRadioPipetype7();
|
|
afx_msg void OnRadioPipetype8();
|
|
afx_msg void OnRadioPipetype9();
|
|
afx_msg void OnRadioPipetype10();
|
|
/* cet 2011.12.1 del
|
|
afx_msg void OnRadioPipetype11();
|
|
afx_msg void OnRadioPipetype12();
|
|
afx_msg void OnRadioPipetype13();
|
|
afx_msg void OnRadioPipetype14();
|
|
afx_msg void OnRadioPipetype15();
|
|
afx_msg void OnRadioPipetype16();
|
|
afx_msg void OnRadioPipetype17();
|
|
*/
|
|
afx_msg void OnButtonMenu();
|
|
afx_msg void OnButtonSerial();
|
|
afx_msg void OnButtonAngleMenu();
|
|
afx_msg void OnDestroy();
|
|
afx_msg void OnCheckLockangle();
|
|
// cet 2011.12.14 add 随低中高区变化改变标注
|
|
afx_msg void OnRadioPos1();
|
|
afx_msg void OnRadioPos2();
|
|
afx_msg void OnRadioPos3();
|
|
// cet 2012.8.30 add
|
|
afx_msg void OnEditChangeComboDn();
|
|
afx_msg void OnSelchangeComboDn();
|
|
afx_msg void OnEditChangeFloorName();
|
|
// cet 2013.5.22 add 对话框获得焦点后不主动失去焦点,防止鼠标移出对话框直接失去焦点
|
|
afx_msg LONG_PTR onAcadKeepFocus(UINT_PTR, LONG_PTR);
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
private:
|
|
|
|
void ReadWriteData(bool bRead = true);
|
|
// 获得管线名 cet 2011.12.1 add
|
|
void GetPipeName(std::vector<CString> &vecPipeName);
|
|
// 初始化角度菜单数据 cet 2012.3.16 add
|
|
void InitAngleData();
|
|
// 角度菜单的可用性 cet 2012.3.16 add
|
|
void EnableAngleMenu(BOOL bEnable);
|
|
// 初始化编号菜单 cet 2013.3.13 add
|
|
void InitMenuSerial();
|
|
// 设置微调按钮可见性 cet 2013.3.13 add
|
|
void UpdateSpinVisible();
|
|
|
|
private:
|
|
|
|
bool m_bEle; // cet 2010.6.23 add 是否自动读取前一管线标高
|
|
CMenu *m_pMenuAngle; // cet 2012.3.15 add 刻度盘角度菜单
|
|
static std::map<double, bool> m_mapAngle; // cet 2012.3.15 add 角度菜单中角度及选择的角度
|
|
BOOL m_bSendCmdKeyToCAD;// cet 2012.316 add 是否向cad发送命令关键字
|
|
CMenu *m_pMenuSerial; // cet 2013.3.13 add 编号样式选择
|
|
std::map<DWORD, std::pair<CString, bool> > m_mapSerial; // cet 2013.3.13 add 编号菜单中id,名称,是否选中
|
|
static DWORD m_nSelSerialID; // cet 2013.3.13 add 当前选择的编号菜单选项id
|
|
bool m_bOpeningMenuSerial; // cet 2013.3.18 add 是否正在打开编号菜单
|
|
PickSet m_ssEnt; // cet 2013.3.18 add 管线选择集
|
|
static std::map<int, std::map<CString, CString> > m_mapPipeSerial; // cet 2013.3.18 add 管线对应的楼号、英文编号
|
|
bool m_bInitDlg;// zxl 2013.10.17 add 窗口是否初始化
|
|
};
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_DRAWSTANDPIPEDLG_H__89239000_2716_4880_959E_4E4F51B5FDCA__INCLUDED_)
|