85 lines
2.7 KiB
C++
85 lines
2.7 KiB
C++
#ifndef _AUTOSTAIR_H_
|
|
#define _AUTOSTAIR_H_
|
|
|
|
#if _MSC_VER >1000
|
|
#pragma once
|
|
#endif
|
|
|
|
//------------------------------------------------------------------自动扶梯--------------------------------------------------------
|
|
#include "resource.h"
|
|
#include "basestairdlg.h"
|
|
|
|
#define g_dWidth 548
|
|
class CAutoStairDlg:public CBaseStairDlg
|
|
{
|
|
|
|
public:
|
|
//数据成员
|
|
enum {IDD=IDD_AUTOSTAIRDLG,};
|
|
|
|
static BOOL m_bSelectStair;//选择楼梯是单梯还是双梯
|
|
static BOOL m_bPutMode;//摆放方式平行,交叉
|
|
static int m_iSelectFloor;//选择楼层
|
|
static CString m_strFloorHeight;//楼梯高度
|
|
static CString m_strAscentLen;//坡道长度
|
|
static BOOL m_bUpDir;//标注上楼方向
|
|
static BOOL m_bTongDir;//是否同向
|
|
static CString m_strSpaceWidth;//两个楼梯间的距离
|
|
static CString m_strSlopeAngle;//倾斜角度
|
|
static CString m_strSlabLength;//平台长度
|
|
static CString m_strStepLength;//平步长度
|
|
BOOL m_bOpenHole;//是否开洞
|
|
|
|
CString m_strLength;//总长
|
|
CString m_strWidth;//总宽
|
|
|
|
static CString m_strStairWidth;//楼梯宽度
|
|
|
|
//2D或3D的显示模式
|
|
int m_iViewCtrl;
|
|
|
|
CComboBox m_ctrlSlopeAngle;//倾斜角度
|
|
//保留结果
|
|
static int m_isaveStepNum;//保留踏步总数
|
|
static CString m_strsaveStepHeight;//保留踏步高度
|
|
static CString m_strsaveStairHeight;//保留楼梯高度
|
|
//以下用于备份和判断是否编辑状态的参数
|
|
BOOL m_bEdit;//是否处于编辑状态
|
|
TDbAutoStair *m_pBakObj;//备份状态
|
|
|
|
public:
|
|
//函数成员
|
|
DECLARE_DYNAMIC(CAutoStairDlg)
|
|
CAutoStairDlg(CWnd* pParent = NULL);
|
|
CAutoStairDlg(UINT id,CWnd*pParent=NULL);
|
|
~CAutoStairDlg();
|
|
virtual void UpdateSel();
|
|
//增加了新增项对用户改变选定的响应。
|
|
virtual bool UpdateEdit(UINT ctrlID,bool bReportError=false);
|
|
//增加了可能引起梯段长度与梯段宽度变化的处理。
|
|
virtual AcDbEntity * NewObject();
|
|
virtual void Dlg2Obj(AcDbEntity *pStep);
|
|
virtual void Obj2Dlg(const AcDbEntity *pStep);
|
|
public:
|
|
virtual void DoDataExchange(CDataExchange* pDX);
|
|
protected:
|
|
//事件处理
|
|
virtual BOOL OnInitDialog();
|
|
void OnChangeFloorWidth();
|
|
void OnChangeStepWidth();
|
|
void OnChangeSlabWidth();
|
|
void OnChangeSpaceWidth();//两跑之间的距离
|
|
void OnChangeStairWidth();//楼梯宽度
|
|
void OnSelChangeSlopeAngle();
|
|
void OnChangeSlopeAngle();//改变倾斜角度
|
|
void OnClickSelectAscentLen();//选择坡道长度
|
|
void OnChangeAscentLen();//坡道长度
|
|
double CountStairTotalLen(short nFlag,const CString SlabLength,const CString FloorHeight,const CString SlopeAngle);//计算梯总长
|
|
double CountStairTotalLen(short nFlag,const CString AscentLen,const CString SlabLength);//计算总长
|
|
double CountStairTotalWidth(short nFlag,const double StairWidth,const double SpaceWidth);
|
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
#endif |