82 lines
2.2 KiB
C++
82 lines
2.2 KiB
C++
// FloorDrainPropDlg.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "resource.h"
|
|
#include "FloorDrainAttrDlg.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CFloorDrainAttrDlg dialog
|
|
|
|
|
|
CFloorDrainAttrDlg::CFloorDrainAttrDlg(CWnd* pParent /*=NULL*/)
|
|
: CSaniFittingAttrBaseDlg(CFloorDrainAttrDlg::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(CFloorDrainAttrDlg)
|
|
m_csKindName = _T("");
|
|
m_nOrigenalSizeX = 0;
|
|
m_csDescName = _T("");
|
|
m_nOrigenalSizeY = 0;
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
|
|
void CFloorDrainAttrDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CSaniFittingAttrBaseDlg::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CFloorDrainAttrDlg)
|
|
DDX_Text(pDX, IDC_EDIT_KIND, m_csKindName);
|
|
DDX_Text(pDX, IDC_EDIT_SIZEX, m_nOrigenalSizeX);
|
|
DDX_Text(pDX, IDC_EDIT_NAME2, m_csDescName);
|
|
DDX_Text(pDX, IDC_EDIT_SIZEY, m_nOrigenalSizeY);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CFloorDrainAttrDlg, CSaniFittingAttrBaseDlg)
|
|
//{{AFX_MSG_MAP(CFloorDrainAttrDlg)
|
|
// NOTE: the ClassWizard will add message map macros here
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CFloorDrainAttrDlg message handlers
|
|
|
|
BOOL CFloorDrainAttrDlg::SetFromSaniWare(const CSaniFittingAttr &data, BOOL bGetNextName)
|
|
{
|
|
if(bGetNextName) {
|
|
XString sLvtryDwb;
|
|
sLvtryDwb << g_sDwbPath << "lvtry.dwb";
|
|
XString sNextName;
|
|
sNextName << data.m_csBlockName;
|
|
if(GetNextItem(sLvtryDwb,sNextName)!=RTNORM)
|
|
return FALSE;
|
|
m_csBlockName = sNextName;
|
|
} else {
|
|
m_csBlockName = data.m_csBlockName;
|
|
}
|
|
m_csDescName = data.m_csDescName;
|
|
m_csKindName = data.m_csKindName;
|
|
m_nOrigenalSizeX = AS_INT(data.m_dOrigenalSizeX);
|
|
m_nOrigenalSizeY = AS_INT(data.m_dOrigenalSizeY);
|
|
return TRUE;
|
|
}
|
|
|
|
// °ÑÊý¾Ýдµ½É豸ÖÐ
|
|
BOOL CFloorDrainAttrDlg::WriteToSaniWare(CSaniFittingAttr &data) const
|
|
{
|
|
data.m_csBlockName = m_csBlockName;
|
|
data.m_csDescName = m_csDescName;
|
|
data.m_csKindName = m_csKindName;
|
|
data.m_dOrigenalSizeX = m_nOrigenalSizeX;
|
|
data.m_dOrigenalSizeY = m_nOrigenalSizeY;
|
|
data.m_nPlaceFlag = 3;
|
|
return TRUE;
|
|
} |