80 lines
2.1 KiB
C++
80 lines
2.1 KiB
C++
// BathTubPropDlg.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "resource.h"
|
|
#include "BathAttrDlg.h"
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CBathAttrDlg dialog
|
|
CBathAttrDlg::CBathAttrDlg(CWnd* pParent /*=NULL*/)
|
|
: CSaniFittingAttrBaseDlg(CBathAttrDlg::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(CBathAttrDlg)
|
|
m_csKindName = _T("");
|
|
m_nOrigenalSizeY = 0;
|
|
m_csDescName = _T("");
|
|
m_nOrigenalSizeX = 0;
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
|
|
void CBathAttrDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CSaniFittingAttrBaseDlg::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CBathAttrDlg)
|
|
DDX_Text(pDX, IDC_EDIT_KIND, m_csKindName);
|
|
DDX_Text(pDX, IDC_EDIT_LENGTH, m_nOrigenalSizeY);
|
|
DDX_Text(pDX, IDC_EDIT_NAME2, m_csDescName);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH, m_nOrigenalSizeX);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CBathAttrDlg, CSaniFittingAttrBaseDlg)
|
|
//{{AFX_MSG_MAP(CBathAttrDlg)
|
|
// NOTE: the ClassWizard will add message map macros here
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CBathAttrDlg message handlers
|
|
|
|
BOOL CBathAttrDlg::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 CBathAttrDlg::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 = 2;
|
|
return TRUE;
|
|
} |