146 lines
3.1 KiB
C++
146 lines
3.1 KiB
C++
#if !defined(AFX_HYDRANTPLANDLG_H__689913B8_E7A7_4009_A366_D97679D6BFCC__INCLUDED_)
|
|
#define AFX_HYDRANTPLANDLG_H__689913B8_E7A7_4009_A366_D97679D6BFCC__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// HydrantPlanDlg.h : header file
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CHydrantPlanDlg dialog
|
|
#include "Resource.h"
|
|
//#include <ModelessDialog.h>
|
|
#include "MySpin.h"
|
|
|
|
class CHydrantPlanDlg : public CDialog
|
|
{
|
|
// Construction
|
|
public:
|
|
CHydrantPlanDlg(int iMode, CWnd* pParent = NULL); // standard constructor
|
|
DECLARE_DYNAMIC(CHydrantPlanDlg)
|
|
~CHydrantPlanDlg()
|
|
{
|
|
if(::IsWindow(m_hWnd))
|
|
DestroyWindow();
|
|
}
|
|
|
|
BOOL IsShowCircle()
|
|
{
|
|
return m_bWndChkRadius;
|
|
}
|
|
|
|
void SetData(std::map<XPoint,double> &mapData)
|
|
{
|
|
std::map<XPoint,double>::iterator it;
|
|
for(it = mapData.begin(); it != mapData.end(); it++)
|
|
{
|
|
m_mapData.insert(std::pair<XPoint, double>((*it).first, (*it).second));
|
|
}
|
|
}
|
|
|
|
void ShowCircle();
|
|
|
|
void ShowCircle(XPoint &pt, double dRadius);
|
|
|
|
// Dialog Data
|
|
//{{AFX_DATA(CHydrantPlanDlg)
|
|
enum { IDD = IDD_HYDRANT_PLAN };
|
|
CEdit m_edtByDist;
|
|
CButton m_wndBtnRadius;
|
|
CListBox m_listDim;
|
|
CMySpin m_spinDist;
|
|
int m_iDist;
|
|
BOOL m_bMirrorByX;
|
|
BOOL m_bMirrorByY;
|
|
double m_dEle;
|
|
int m_iDim;
|
|
double m_dByDist;
|
|
//}}AFX_DATA
|
|
static BOOL m_bWndChkRadius;
|
|
static int m_iMode;
|
|
static BOOL m_bAutoScale;
|
|
static CString m_csOldDim, m_csInsBlkName;
|
|
static CString m_csSysBlk;
|
|
static CString m_csRadius; // cet 2010.7.22 add ¼ÇÒä°ë¾¶
|
|
static int m_iPlanType;
|
|
CString m_csSysBlk1, m_csSysBlk2;
|
|
void OpenSlide();
|
|
void ResetDim();
|
|
void GetScale(double &dX, double &dY);
|
|
void SetScale(double dX, double dY);
|
|
double m_dScaleX, m_dScaleY;
|
|
void InitEditStatus();
|
|
|
|
int m_iOpenMode;
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CHydrantPlanDlg)
|
|
public:
|
|
virtual BOOL DestroyWindow();
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CHydrantPlanDlg)
|
|
afx_msg LONG_PTR onAcadKeepFocus(UINT_PTR, LONG_PTR);
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg void OnPaint();
|
|
afx_msg void OnClose();
|
|
afx_msg void OnButtonCalc();
|
|
afx_msg void OnRadioMode1();
|
|
afx_msg void OnRadioMode2();
|
|
afx_msg void OnPreview();
|
|
afx_msg void OnButtonDim();
|
|
afx_msg void OnSelchangeListDn();
|
|
virtual void OnOK();
|
|
afx_msg void OnDestroy();
|
|
afx_msg void OnCheckRadius();
|
|
afx_msg void OnRadioBydist();
|
|
afx_msg void OnRadioByline();
|
|
afx_msg void OnRadioByuser();
|
|
afx_msg void OnKillfocusEditBydist();
|
|
afx_msg void OnCheckAutoscale();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
private:
|
|
|
|
void DelCircle();
|
|
|
|
private:
|
|
|
|
std::map<XPoint,double> m_mapData; // cet 2010.6.22 add
|
|
std::vector<AcDbObjectId> m_vecId; // cet 2010.6.22 add
|
|
};
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_HYDRANTPLANDLG_H__689913B8_E7A7_4009_A366_D97679D6BFCC__INCLUDED_)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|