Files
envi-code/SourceCode/Code2026/tg_shs/shs_TwtKernal/PipeSettingChild1.cpp
T
2026-09-28 15:28:50 +08:00

1067 lines
40 KiB
C++

// PipeSettingChild1.cpp : implementation file
#include "stdafx.h"
#include "PipeSettingChild1.h"
#include <PipeTools.h>
//#include <cbclass.h>
#include <PipeWireMonitor.h>
#include <layerDefine.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CString GetDefineLayerLineType(LPCTSTR pszLayer);
extern void SetDefineLayerLineType(LPCTSTR pszLayer,LPCTSTR pszLinetype);
CPipeSettingChild1Dlg::CPipeSettingChild1Dlg(CWnd* pParent /*=NULL*/)
: CDialog(CPipeSettingChild1Dlg::IDD, pParent), m_spinWidth1(0.05),
m_spinWidth2(0.05), m_spinWidth3(0.05), m_spinWidth4(0.05),
m_spinWidth5(0.05), m_spinWidth6(0.05), m_spinWidth7(0.05),
m_spinWidth8(0.05), m_spinWidth9(0.05),m_spinWidth15(0.05)
{
//{{AFX_DATA_INIT(CPipeSettingChild1Dlg)
m_iMaterial1 = 7;
m_iMaterial2 = 7;
m_iMaterial3 = 7;
m_iMaterial4 = 10;
m_iMaterial5 = 2;
m_iMaterial6 = 2;
m_iMaterial7 = 7;
m_iMaterial8 = 0;
m_iMaterial9 = 0;
m_iLineType1 = 0;
m_iLineType2 = 0;
m_iLineType3 = 0;
m_iLineType4 = 0;
m_iLineType5 = 0;
m_iLineType6 = 0;
m_iLineType7 = 0;
m_iLineType8 = 0;
m_iLineType9 = 0;
m_csDim1 = _T("J");
m_csDim2 = _T("RJ");
m_csDim3 = _T("RH");
m_csDim4 = _T("W");
m_csDim5 = _T("F");
m_csDim6 = _T("Y");
m_csDim7 = _T("Z");
m_csDim8 = _T("X");
m_csDim9 = _T("H");
m_nWidth1 = 0.35;
m_nWidth2 = 0.35;
m_nWidth3 = 0.35;
m_nWidth4 = 0.35;
m_nWidth5 = 0.35;
m_nWidth6 = 0.35;
m_nWidth7 = 0.35;
m_nWidth8 = 0.35;
m_nWidth9 = 0.35;
m_bTwo1 = FALSE;
m_bTwo2 = FALSE;
m_bTwo3 = FALSE;
m_bTwo4 = FALSE;
m_bTwo5 = FALSE;
m_bTwo6 = FALSE;
m_bTwo7 = FALSE;
m_bTwo8 = FALSE;
m_bTwo9 = FALSE;
m_iMaterial15 = 0;
m_csDim15 = _T("T");
m_iLineType15 = 0;
m_nWidth15 = 0.35;
m_nRadius1 = 50;
m_nRadius15 = 50;
m_nRadius2 = 50;
m_nRadius3 = 50;
m_nRadius4 = 50;
m_nRadius5 = 50;
m_nRadius6 = 50;
m_nRadius7 = 50;
m_nRadius8 = 50;
m_nRadius9 = 50;
//}}AFX_DATA_INIT
m_bLineTypeByLayer = FALSE;
m_bModify = FALSE;
m_iMode = 0;
}
void CPipeSettingChild1Dlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPipeSettingChild1Dlg)
DDX_Control(pDX, IDC_COMBO_TYPE9, m_comboLineType9);
DDX_Control(pDX, IDC_COMBO_TYPE8, m_comboLineType8);
DDX_Control(pDX, IDC_COMBO_TYPE7, m_comboLineType7);
DDX_Control(pDX, IDC_COMBO_TYPE6, m_comboLineType6);
DDX_Control(pDX, IDC_COMBO_TYPE5, m_comboLineType5);
DDX_Control(pDX, IDC_COMBO_TYPE4, m_comboLineType4);
DDX_Control(pDX, IDC_COMBO_TYPE3, m_comboLineType3);
DDX_Control(pDX, IDC_COMBO_TYPE2, m_comboLineType2);
DDX_Control(pDX, IDC_COMBO_TYPE15, m_comboLineType15);
DDX_Control(pDX, IDC_COMBO_TYPE1, m_comboLineType1);
DDX_Control(pDX, IDC_COMBO_MATERIAL15, m_comboMat15);
DDX_Control(pDX, IDC_SPIN_WIDTH15, m_spinWidth15);
DDX_Control(pDX, IDC_COMBO_MATERIAL9, m_comboMat9);
DDX_Control(pDX, IDC_COMBO_MATERIAL8, m_comboMat8);
DDX_Control(pDX, IDC_COMBO_MATERIAL7, m_comboMat7);
DDX_Control(pDX, IDC_COMBO_MATERIAL6, m_comboMat6);
DDX_Control(pDX, IDC_COMBO_MATERIAL5, m_comboMat5);
DDX_Control(pDX, IDC_COMBO_MATERIAL4, m_comboMat4);
DDX_Control(pDX, IDC_COMBO_MATERIAL3, m_comboMat3);
DDX_Control(pDX, IDC_COMBO_MATERIAL2, m_comboMat2);
DDX_Control(pDX, IDC_COMBO_MATERIAL1, m_comboMat1);
DDX_Control(pDX, IDC_SPIN_WIDTH9, m_spinWidth9);
DDX_Control(pDX, IDC_SPIN_WIDTH8, m_spinWidth8);
DDX_Control(pDX, IDC_SPIN_WIDTH7, m_spinWidth7);
DDX_Control(pDX, IDC_SPIN_WIDTH6, m_spinWidth6);
DDX_Control(pDX, IDC_SPIN_WIDTH5, m_spinWidth5);
DDX_Control(pDX, IDC_SPIN_WIDTH4, m_spinWidth4);
DDX_Control(pDX, IDC_SPIN_WIDTH3, m_spinWidth3);
DDX_Control(pDX, IDC_SPIN_WIDTH2, m_spinWidth2);
DDX_Control(pDX, IDC_SPIN_WIDTH1, m_spinWidth1);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL1, m_iMaterial1);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL2, m_iMaterial2);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL3, m_iMaterial3);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL4, m_iMaterial4);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL5, m_iMaterial5);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL6, m_iMaterial6);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL7, m_iMaterial7);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL8, m_iMaterial8);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL9, m_iMaterial9);
DDX_CBIndex(pDX, IDC_COMBO_TYPE1, m_iLineType1);
DDX_CBIndex(pDX, IDC_COMBO_TYPE2, m_iLineType2);
DDX_CBIndex(pDX, IDC_COMBO_TYPE3, m_iLineType3);
DDX_CBIndex(pDX, IDC_COMBO_TYPE4, m_iLineType4);
DDX_CBIndex(pDX, IDC_COMBO_TYPE5, m_iLineType5);
DDX_CBIndex(pDX, IDC_COMBO_TYPE6, m_iLineType6);
DDX_CBIndex(pDX, IDC_COMBO_TYPE7, m_iLineType7);
DDX_CBIndex(pDX, IDC_COMBO_TYPE8, m_iLineType8);
DDX_CBIndex(pDX, IDC_COMBO_TYPE9, m_iLineType9);
DDX_Text(pDX, IDC_EDIT_DIM1, m_csDim1);
DDX_Text(pDX, IDC_EDIT_DIM2, m_csDim2);
DDX_Text(pDX, IDC_EDIT_DIM3, m_csDim3);
DDX_Text(pDX, IDC_EDIT_DIM4, m_csDim4);
DDX_Text(pDX, IDC_EDIT_DIM5, m_csDim5);
DDX_Text(pDX, IDC_EDIT_DIM6, m_csDim6);
DDX_Text(pDX, IDC_EDIT_DIM7, m_csDim7);
DDX_Text(pDX, IDC_EDIT_DIM8, m_csDim8);
DDX_Text(pDX, IDC_EDIT_DIM9, m_csDim9);
DDX_Text(pDX, IDC_EDIT_WIDTH1, m_nWidth1);
DDX_Text(pDX, IDC_EDIT_WIDTH2, m_nWidth2);
DDX_Text(pDX, IDC_EDIT_WIDTH3, m_nWidth3);
DDX_Text(pDX, IDC_EDIT_WIDTH4, m_nWidth4);
DDX_Text(pDX, IDC_EDIT_WIDTH5, m_nWidth5);
DDX_Text(pDX, IDC_EDIT_WIDTH6, m_nWidth6);
DDX_Text(pDX, IDC_EDIT_WIDTH7, m_nWidth7);
DDX_Text(pDX, IDC_EDIT_WIDTH8, m_nWidth8);
DDX_Text(pDX, IDC_EDIT_WIDTH9, m_nWidth9);
DDX_Check(pDX, IDC_CHECK_STAND1, m_bTwo1);
DDX_Check(pDX, IDC_CHECK_STAND2, m_bTwo2);
DDX_Check(pDX, IDC_CHECK_STAND3, m_bTwo3);
DDX_Check(pDX, IDC_CHECK_STAND4, m_bTwo4);
DDX_Check(pDX, IDC_CHECK_STAND5, m_bTwo5);
DDX_Check(pDX, IDC_CHECK_STAND6, m_bTwo6);
DDX_Check(pDX, IDC_CHECK_STAND7, m_bTwo7);
DDX_Check(pDX, IDC_CHECK_STAND8, m_bTwo8);
DDX_Check(pDX, IDC_CHECK_STAND9, m_bTwo9);
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL15, m_iMaterial15);
DDX_Text(pDX, IDC_EDIT_DIM15, m_csDim15);
DDX_CBIndex(pDX, IDC_COMBO_TYPE15, m_iLineType15);
DDX_Text(pDX, IDC_EDIT_WIDTH15, m_nWidth15);
DDX_Text(pDX, IDC_EDIT_CIRCLE1, m_nRadius1);
DDX_Text(pDX, IDC_EDIT_CIRCLE15, m_nRadius15);
DDX_Text(pDX, IDC_EDIT_CIRCLE2, m_nRadius2);
DDX_Text(pDX, IDC_EDIT_CIRCLE3, m_nRadius3);
DDX_Text(pDX, IDC_EDIT_CIRCLE4, m_nRadius4);
DDX_Text(pDX, IDC_EDIT_CIRCLE5, m_nRadius5);
DDX_Text(pDX, IDC_EDIT_CIRCLE6, m_nRadius6);
DDX_Text(pDX, IDC_EDIT_CIRCLE7, m_nRadius7);
DDX_Text(pDX, IDC_EDIT_CIRCLE8, m_nRadius8);
DDX_Text(pDX, IDC_EDIT_CIRCLE9, m_nRadius9);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPipeSettingChild1Dlg, CDialog)
//{{AFX_MSG_MAP(CPipeSettingChild1Dlg)
ON_BN_CLICKED(IDC_STATIC_COLOR1, OnStaticColor1)
ON_BN_CLICKED(IDC_STATIC_COLOR2, OnStaticColor2)
ON_BN_CLICKED(IDC_STATIC_COLOR3, OnStaticColor3)
ON_BN_CLICKED(IDC_STATIC_COLOR4, OnStaticColor4)
ON_BN_CLICKED(IDC_STATIC_COLOR5, OnStaticColor5)
ON_BN_CLICKED(IDC_STATIC_COLOR6, OnStaticColor6)
ON_BN_CLICKED(IDC_STATIC_COLOR7, OnStaticColor7)
ON_BN_CLICKED(IDC_STATIC_COLOR8, OnStaticColor8)
ON_BN_CLICKED(IDC_STATIC_COLOR9, OnStaticColor9)
ON_BN_CLICKED(IDC_STATIC_COLOR15, OnStaticColor15)
ON_BN_CLICKED(IDC_STATIC_COLOR31, OnStaticColor31)
ON_BN_CLICKED(IDC_STATIC_COLOR32, OnStaticColor32)
ON_BN_CLICKED(IDC_STATIC_COLOR33, OnStaticColor33)
ON_BN_CLICKED(IDC_STATIC_COLOR34, OnStaticColor34)
ON_BN_CLICKED(IDC_STATIC_COLOR35, OnStaticColor35)
ON_BN_CLICKED(IDC_STATIC_COLOR36, OnStaticColor36)
ON_BN_CLICKED(IDC_STATIC_COLOR37, OnStaticColor37)
ON_BN_CLICKED(IDC_STATIC_COLOR38, OnStaticColor38)
ON_BN_CLICKED(IDC_STATIC_COLOR39, OnStaticColor39)
ON_BN_CLICKED(IDC_STATIC_COLOR45, OnStaticColor45)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BOOL CPipeSettingChild1Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_spinWidth1.SetRange(0, 1);
m_spinWidth2.SetRange(0, 1);
m_spinWidth3.SetRange(0, 1);
m_spinWidth4.SetRange(0, 1);
m_spinWidth5.SetRange(0, 1);
m_spinWidth6.SetRange(0, 1);
m_spinWidth7.SetRange(0, 1);
m_spinWidth8.SetRange(0, 1);
m_spinWidth9.SetRange(0, 1);
m_spinWidth15.SetRange(0, 1);
m_iColor1 = GetLayerColorIdx(LAY_PIPE_FEED);
m_iColor2 = GetLayerColorIdx(LAY_PIPE_HEADFEED);
m_iColor3 = GetLayerColorIdx(LAY_PIPE_HEADBACK);
m_iColor4 = GetLayerColorIdx(LAY_PIPE_DIRT);
m_iColor5 = GetLayerColorIdx(LAY_PIPE_USELESS);
m_iColor6 = GetLayerColorIdx(LAY_PIPE_RAIN);
m_iColor7 = GetLayerColorIdx(LAY_PIPE_USED);
m_iColor8 = GetLayerColorIdx(LAY_PIPE_FIRE);
m_iColor9 = GetLayerColorIdx(LAY_PIPE_SPRINKLE);
m_iColor15 = GetLayerColorIdx(LAY_PIPE_OTHER);
m_iVColor1 = GetLayerColorIdx(LAY_VPIPE_FEED);
m_iVColor2 = GetLayerColorIdx(LAY_VPIPE_HEADFEED);
m_iVColor3 = GetLayerColorIdx(LAY_VPIPE_HEADBACK);
m_iVColor4 = GetLayerColorIdx(LAY_VPIPE_DIRT);
m_iVColor5 = GetLayerColorIdx(LAY_VPIPE_USELESS);
m_iVColor6 = GetLayerColorIdx(LAY_VPIPE_RAIN);
m_iVColor7 = GetLayerColorIdx(LAY_VPIPE_USED);
m_iVColor8 = GetLayerColorIdx(LAY_VPIPE_FIRE);
m_iVColor9 = GetLayerColorIdx(LAY_VPIPE_SPRINKLE);
m_iVColor15 = GetLayerColorIdx(LAY_VPIPE_OTHER);
XStringList lstMat;
GetPipeMaterialList(lstMat);
for(int i=0;i<lstMat.Length();i++)
{
m_comboMat1.AddString(lstMat[i]);
m_comboMat2.AddString(lstMat[i]);
m_comboMat3.AddString(lstMat[i]);
m_comboMat4.AddString(lstMat[i]);
m_comboMat5.AddString(lstMat[i]);
m_comboMat6.AddString(lstMat[i]);
m_comboMat7.AddString(lstMat[i]);
m_comboMat8.AddString(lstMat[i]);
m_comboMat9.AddString(lstMat[i]);
m_comboMat15.AddString(lstMat[i]);
}
UpdateDlgData(TRUE);
ResetLineCombox();
if(m_iMode == 1){
CWnd *pWnd = GetDlgItem(IDC_CHECK_MODIFY);
pWnd->EnableWindow(FALSE);
}
DrawStatic();
return TRUE;
}
void CPipeSettingChild1Dlg::DrawStatic()
{
int Color[20];
//»æÖÆÍ¼Æ¬¿ò
UINT id[] = {IDC_STATIC_COLOR1,
IDC_STATIC_COLOR2,
IDC_STATIC_COLOR3,
IDC_STATIC_COLOR4,
IDC_STATIC_COLOR5,
IDC_STATIC_COLOR6,
IDC_STATIC_COLOR7,
IDC_STATIC_COLOR8,
IDC_STATIC_COLOR9,
IDC_STATIC_COLOR15,
IDC_STATIC_COLOR31,
IDC_STATIC_COLOR32,
IDC_STATIC_COLOR33,
IDC_STATIC_COLOR34,
IDC_STATIC_COLOR35,
IDC_STATIC_COLOR36,
IDC_STATIC_COLOR37,
IDC_STATIC_COLOR38,
IDC_STATIC_COLOR39,
IDC_STATIC_COLOR45,
};
Color[0] = m_iColor1;
Color[1] = m_iColor2;
Color[2] = m_iColor3;
Color[3] = m_iColor4;
Color[4] = m_iColor5;
Color[5] = m_iColor6;
Color[6] = m_iColor7;
Color[7] = m_iColor8;
Color[8] = m_iColor9;
Color[9] = m_iColor15;
Color[10] = m_iVColor1;
Color[11] = m_iVColor2;
Color[12] = m_iVColor3;
Color[13] = m_iVColor4;
Color[14] = m_iVColor5;
Color[15] = m_iVColor6;
Color[16] = m_iVColor7;
Color[17] = m_iVColor8;
Color[18] = m_iVColor9;
Color[19] = m_iVColor15;
for(int i=0;i<20;i++){
CWnd* pWnd = GetDlgItem(id[i]);
CRect rect;
pWnd->GetClientRect(rect);
CDC* pDC = pWnd->GetDC();
CBrush* pNewBrush = new CBrush;
pNewBrush->CreateSolidBrush(acedGetRGB(Color[i]));
CBrush* pOldBrush = pDC->SelectObject(pNewBrush);
pDC->Rectangle(rect);
pDC->SelectObject(pOldBrush);
pWnd->ReleaseDC(pDC);
delete pNewBrush;
}
}
void CPipeSettingChild1Dlg::OnStaticColor1()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor1, Adesk::kFalse, m_iColor1);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor2()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor2, Adesk::kFalse, m_iColor2);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor3()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor3, Adesk::kFalse, m_iColor3);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor4()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor4, Adesk::kFalse, m_iColor4);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor5()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor5, Adesk::kFalse, m_iColor5);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor6()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor6, Adesk::kFalse, m_iColor6);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor7()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor7, Adesk::kFalse, m_iColor7);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor8()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor8, Adesk::kFalse, m_iColor8);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor9()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor9, Adesk::kFalse, m_iColor9);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor15()
{
UpdateData(TRUE);
acedSetColorDialog(m_iColor15, Adesk::kFalse, m_iColor15);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor31()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor1, Adesk::kFalse, m_iVColor1);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor32()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor2, Adesk::kFalse, m_iVColor2);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor33()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor3, Adesk::kFalse, m_iVColor3);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor34()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor4, Adesk::kFalse, m_iVColor4);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor35()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor5, Adesk::kFalse, m_iVColor5);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor36()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor6, Adesk::kFalse, m_iVColor6);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor37()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor7, Adesk::kFalse, m_iVColor7);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor38()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor8, Adesk::kFalse, m_iVColor8);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor39()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor9, Adesk::kFalse, m_iVColor9);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnStaticColor45()
{
UpdateData(TRUE);
acedSetColorDialog(m_iVColor15, Adesk::kFalse, m_iVColor15);
UpdateData(FALSE);
DrawStatic();
}
void CPipeSettingChild1Dlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
DrawStatic();
}
void CPipeSettingChild1Dlg::ResetLineCombox()
{
UpdateData(TRUE);
m_lstLineTypeName.Reset();
m_lstLineTypeComment.Reset();
m_comboLineType1.ResetContent();
m_comboLineType2.ResetContent();
m_comboLineType3.ResetContent();
m_comboLineType4.ResetContent();
m_comboLineType5.ResetContent();
m_comboLineType6.ResetContent();
m_comboLineType7.ResetContent();
m_comboLineType8.ResetContent();
m_comboLineType9.ResetContent();
m_comboLineType15.ResetContent();
GetAllTgLineType(m_lstLineTypeName, m_lstLineTypeComment);
for(int i=0;i<m_lstLineTypeComment.Length();i++){
m_comboLineType1.AddString(CString(m_lstLineTypeName[i]) + _T(" ") +m_lstLineTypeComment[i]);
m_comboLineType2.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
m_comboLineType3.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
m_comboLineType4.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
m_comboLineType5.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
m_comboLineType6.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
m_comboLineType7.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
m_comboLineType8.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
m_comboLineType9.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
m_comboLineType15.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
}
m_iLineType1 = m_lstLineTypeName.Index(m_csLineType1);
m_iLineType2 = m_lstLineTypeName.Index(m_csLineType2);
m_iLineType3 = m_lstLineTypeName.Index(m_csLineType3);
m_iLineType4 = m_lstLineTypeName.Index(m_csLineType4);
m_iLineType5 = m_lstLineTypeName.Index(m_csLineType5);
m_iLineType6 = m_lstLineTypeName.Index(m_csLineType6);
m_iLineType7 = m_lstLineTypeName.Index(m_csLineType7);
m_iLineType8 = m_lstLineTypeName.Index(m_csLineType8);
m_iLineType9 = m_lstLineTypeName.Index(m_csLineType9);
m_iLineType15 = m_lstLineTypeName.Index(m_csLineType15);
if(m_iLineType1 < 0) m_iLineType1 = 0;
if(m_iLineType2 < 0) m_iLineType2 = 0;
if(m_iLineType3 < 0) m_iLineType3 = 0;
if(m_iLineType4 < 0) m_iLineType4 = 0;
if(m_iLineType5 < 0) m_iLineType5 = 0;
if(m_iLineType6 < 0) m_iLineType6 = 0;
if(m_iLineType7 < 0) m_iLineType7 = 0;
if(m_iLineType8 < 0) m_iLineType8 = 0;
if(m_iLineType9 < 0) m_iLineType9 = 0;
if(m_iLineType15 < 0) m_iLineType15 =0;
UpdateData(FALSE);
}
void CPipeSettingChild1Dlg::UpdateDlgData(BOOL bIsRead)
{
UpdateData(TRUE);
CRegProperty regProp(GetRegLocation(), _T("TWTConfig"));
regProp.SetTopRootKey(HKEY_CURRENT_USER);
if(bIsRead){
m_iMaterial1 = 7;
m_iMaterial2 = 7;
m_iMaterial3 = 7;
m_iMaterial4 = 10;
m_iMaterial5 = 2;
m_iMaterial6 = 2;
m_iMaterial7 = 7;
m_iMaterial8 = 0;
m_iMaterial9 = 0;
m_iMaterial15 = 0;
m_nRadius1 = 0.5;
m_nRadius15 = 0.5;
m_nRadius2 = 0.5;
m_nRadius3 = 0.5;
m_nRadius4 = 0.5;
m_nRadius5 = 0.5;
m_nRadius6 = 0.5;
m_nRadius7 = 0.5;
m_nRadius8 = 0.5;
m_nRadius9 = 0.5;
regProp.GetValue(_T("IsLineTypeByLayer"), m_bLineTypeByLayer);
regProp.GetValue(_T("Pipe1Width"), m_nWidth1);
regProp.GetValue(_T("Pipe2Width"), m_nWidth2);
regProp.GetValue(_T("Pipe3Width"), m_nWidth3);
regProp.GetValue(_T("Pipe4Width"), m_nWidth4);
regProp.GetValue(_T("Pipe5Width"), m_nWidth5);
regProp.GetValue(_T("Pipe6Width"), m_nWidth6);
regProp.GetValue(_T("Pipe7Width"), m_nWidth7);
regProp.GetValue(_T("Pipe8Width"), m_nWidth8);
regProp.GetValue(_T("Pipe9Width"), m_nWidth9);
regProp.GetValue(_T("Pipe15Width"), m_nWidth15);
regProp.GetValue(_T("Pipe1Radius"), m_nRadius1);
regProp.GetValue(_T("Pipe2Radius"), m_nRadius2);
regProp.GetValue(_T("Pipe3Radius"), m_nRadius3);
regProp.GetValue(_T("Pipe4Radius"), m_nRadius4);
regProp.GetValue(_T("Pipe5Radius"), m_nRadius5);
regProp.GetValue(_T("Pipe6Radius"), m_nRadius6);
regProp.GetValue(_T("Pipe7Radius"), m_nRadius7);
regProp.GetValue(_T("Pipe8Radius"), m_nRadius8);
regProp.GetValue(_T("Pipe9Radius"), m_nRadius9);
regProp.GetValue(_T("Pipe15Radius"), m_nRadius15);
/* cet 2011.12.1 add
regProp.GetValue(_T("PipeLineType1"), m_csLineType1);
regProp.GetValue(_T("PipeLineType2"), m_csLineType2);
regProp.GetValue(_T("PipeLineType3"), m_csLineType3);
regProp.GetValue(_T("PipeLineType4"), m_csLineType4);
regProp.GetValue(_T("PipeLineType5"), m_csLineType5);
regProp.GetValue(_T("PipeLineType6"), m_csLineType6);
regProp.GetValue(_T("PipeLineType7"), m_csLineType7);
regProp.GetValue(_T("PipeLineType8"), m_csLineType8);
regProp.GetValue(_T("PipeLineType9"), m_csLineType9);
regProp.GetValue(_T("PipeLineType15"), m_csLineType15);
*/
m_csLineType1 = g_csTwtLineType[0];
m_csLineType2 = g_csTwtLineType[1];
m_csLineType3 = g_csTwtLineType[2];
m_csLineType4 = g_csTwtLineType[3];
m_csLineType5 = g_csTwtLineType[4];
m_csLineType6 = g_csTwtLineType[5];
m_csLineType7 = g_csTwtLineType[6];
m_csLineType8 = g_csTwtLineType[7];
m_csLineType9 = g_csTwtLineType[8];
m_csLineType15 = g_csTwtLineType[14];
regProp.GetValue(_T("Pipe1Dim"), m_csDim1);
regProp.GetValue(_T("Pipe2Dim"), m_csDim2);
regProp.GetValue(_T("Pipe3Dim"), m_csDim3);
regProp.GetValue(_T("Pipe4Dim"), m_csDim4);
regProp.GetValue(_T("Pipe5Dim"), m_csDim5);
regProp.GetValue(_T("Pipe6Dim"), m_csDim6);
regProp.GetValue(_T("Pipe7Dim"), m_csDim7);
regProp.GetValue(_T("Pipe8Dim"), m_csDim8);
regProp.GetValue(_T("Pipe9Dim"), m_csDim9);
regProp.GetValue(_T("Pipe15Dim"), m_csDim15);
regProp.GetValue(_T("IsDoublePipe1"), m_bTwo1);
regProp.GetValue(_T("IsDoublePipe2"), m_bTwo2);
regProp.GetValue(_T("IsDoublePipe3"), m_bTwo3);
regProp.GetValue(_T("IsDoublePipe4"), m_bTwo4);
regProp.GetValue(_T("IsDoublePipe5"), m_bTwo5);
regProp.GetValue(_T("IsDoublePipe6"), m_bTwo6);
regProp.GetValue(_T("IsDoublePipe7"), m_bTwo7);
regProp.GetValue(_T("IsDoublePipe8"), m_bTwo8);
regProp.GetValue(_T("IsDoublePipe9"), m_bTwo9);
regProp.GetValue(_T("Pipe1Material"), m_iMaterial1);
regProp.GetValue(_T("Pipe2Material"), m_iMaterial2);
regProp.GetValue(_T("Pipe3Material"), m_iMaterial3);
regProp.GetValue(_T("Pipe4Material"), m_iMaterial4);
regProp.GetValue(_T("Pipe5Material"), m_iMaterial5);
regProp.GetValue(_T("Pipe6Material"), m_iMaterial6);
regProp.GetValue(_T("Pipe7Material"), m_iMaterial7);
regProp.GetValue(_T("Pipe8Material"), m_iMaterial8);
regProp.GetValue(_T("Pipe9Material"), m_iMaterial9);
regProp.GetValue(_T("Pipe15Material"), m_iMaterial15);
}
else {
regProp.SetValue(_T("Pipe1Material"), m_iMaterial1);
regProp.SetValue(_T("Pipe2Material"), m_iMaterial2);
regProp.SetValue(_T("Pipe3Material"), m_iMaterial3);
regProp.SetValue(_T("Pipe4Material"), m_iMaterial4);
regProp.SetValue(_T("Pipe5Material"), m_iMaterial5);
regProp.SetValue(_T("Pipe6Material"), m_iMaterial6);
regProp.SetValue(_T("Pipe7Material"), m_iMaterial7);
regProp.SetValue(_T("Pipe8Material"), m_iMaterial8);
regProp.SetValue(_T("Pipe9Material"), m_iMaterial9);
regProp.SetValue(_T("Pipe15Material"), m_iMaterial15);
regProp.SetValue(_T("Pipe1Radius"), m_nRadius1);
regProp.SetValue(_T("Pipe2Radius"), m_nRadius2);
regProp.SetValue(_T("Pipe3Radius"), m_nRadius3);
regProp.SetValue(_T("Pipe4Radius"), m_nRadius4);
regProp.SetValue(_T("Pipe5Radius"), m_nRadius5);
regProp.SetValue(_T("Pipe6Radius"), m_nRadius6);
regProp.SetValue(_T("Pipe7Radius"), m_nRadius7);
regProp.SetValue(_T("Pipe8Radius"), m_nRadius8);
regProp.SetValue(_T("Pipe9Radius"), m_nRadius9);
regProp.SetValue(_T("Pipe15Radius"), m_nRadius15);
regProp.SetValue(_T("Pipe1Width"), m_nWidth1);
regProp.SetValue(_T("Pipe2Width"), m_nWidth2);
regProp.SetValue(_T("Pipe3Width"), m_nWidth3);
regProp.SetValue(_T("Pipe4Width"), m_nWidth4);
regProp.SetValue(_T("Pipe5Width"), m_nWidth5);
regProp.SetValue(_T("Pipe6Width"), m_nWidth6);
regProp.SetValue(_T("Pipe7Width"), m_nWidth7);
regProp.SetValue(_T("Pipe8Width"), m_nWidth8);
regProp.SetValue(_T("Pipe9Width"), m_nWidth9);
regProp.SetValue(_T("Pipe15Width"), m_nWidth15);
regProp.SetValue(_T("Pipe1Dim"), m_csDim1);
regProp.SetValue(_T("Pipe2Dim"), m_csDim2);
regProp.SetValue(_T("Pipe3Dim"), m_csDim3);
regProp.SetValue(_T("Pipe4Dim"), m_csDim4);
regProp.SetValue(_T("Pipe5Dim"), m_csDim5);
regProp.SetValue(_T("Pipe6Dim"), m_csDim6);
regProp.SetValue(_T("Pipe7Dim"), m_csDim7);
regProp.SetValue(_T("Pipe8Dim"), m_csDim8);
regProp.SetValue(_T("Pipe9Dim"), m_csDim9);
regProp.SetValue(_T("Pipe15Dim"), m_csDim15);
regProp.SetValue(_T("IsDoublePipe1"), m_bTwo1);
regProp.SetValue(_T("IsDoublePipe2"), m_bTwo2);
regProp.SetValue(_T("IsDoublePipe3"), m_bTwo3);
regProp.SetValue(_T("IsDoublePipe4"), m_bTwo4);
regProp.SetValue(_T("IsDoublePipe5"), m_bTwo5);
regProp.SetValue(_T("IsDoublePipe6"), m_bTwo6);
regProp.SetValue(_T("IsDoublePipe7"), m_bTwo7);
regProp.SetValue(_T("IsDoublePipe8"), m_bTwo8);
regProp.SetValue(_T("IsDoublePipe9"), m_bTwo9);
regProp.SetValue(_T("IsLineTypeByLayer"), m_bLineTypeByLayer);
g_bLineTypeByLayer = m_bLineTypeByLayer;
g_nPipeWidth[0] = m_nWidth1;
g_nPipeWidth[1] = m_nWidth2;
g_nPipeWidth[2] = m_nWidth3;
g_nPipeWidth[3] = m_nWidth4;
g_nPipeWidth[4] = m_nWidth5;
g_nPipeWidth[5] = m_nWidth6;
g_nPipeWidth[6] = m_nWidth7;
g_nPipeWidth[7] = m_nWidth8;
g_nPipeWidth[8] = m_nWidth9;
g_nPipeWidth[14] = m_nWidth15;
g_nPipeRadius[0] = m_nRadius1;
g_nPipeRadius[1] = m_nRadius2;
g_nPipeRadius[2] = m_nRadius3;
g_nPipeRadius[3] = m_nRadius4;
g_nPipeRadius[4] = m_nRadius5;
g_nPipeRadius[5] = m_nRadius6;
g_nPipeRadius[6] = m_nRadius7;
g_nPipeRadius[7] = m_nRadius8;
g_nPipeRadius[8] = m_nRadius9;
g_nPipeRadius[14] = m_nRadius15;
g_iPipeMaterial[0] = m_iMaterial1;
g_iPipeMaterial[1] = m_iMaterial2;
g_iPipeMaterial[2] = m_iMaterial3;
g_iPipeMaterial[3] = m_iMaterial4;
g_iPipeMaterial[4] = m_iMaterial5;
g_iPipeMaterial[5] = m_iMaterial6;
g_iPipeMaterial[6] = m_iMaterial7;
g_iPipeMaterial[7] = m_iMaterial8;
g_iPipeMaterial[8] = m_iMaterial9;
g_iPipeMaterial[14] = m_iMaterial15;
g_csPipeDim[0] = m_csDim1;
g_csPipeDim[1] = m_csDim2;
g_csPipeDim[2] = m_csDim3;
g_csPipeDim[3] = m_csDim4;
g_csPipeDim[4] = m_csDim5;
g_csPipeDim[5] = m_csDim6;
g_csPipeDim[6] = m_csDim7;
g_csPipeDim[7] = m_csDim8;
g_csPipeDim[8] = m_csDim9;
g_csPipeDim[14] = m_csDim15;
g_bPipeDouble[0] = m_bTwo1;
g_bPipeDouble[1] = m_bTwo2;
g_bPipeDouble[2] = m_bTwo3;
g_bPipeDouble[3] = m_bTwo4;
g_bPipeDouble[4] = m_bTwo5;
g_bPipeDouble[5] = m_bTwo6;
g_bPipeDouble[6] = m_bTwo7;
g_bPipeDouble[7] = m_bTwo8;
g_bPipeDouble[8] = m_bTwo9;
AcDbDatabase *dwg=acdbCurDwg();
AcAxDocLock docLock(dwg);
VERIFY(docLock.lockStatus() == Acad::eOk);
if(m_iColor1 != GetLayerColorIdx(LAY_PIPE_FEED))
SetLayerColorIdx(LAY_PIPE_FEED, m_iColor1);
if(m_iColor2 != GetLayerColorIdx(LAY_PIPE_HEADFEED))
SetLayerColorIdx(LAY_PIPE_HEADFEED, m_iColor2);
if(m_iColor3 != GetLayerColorIdx(LAY_PIPE_HEADBACK))
SetLayerColorIdx(LAY_PIPE_HEADBACK, m_iColor3);
if(m_iColor4 != GetLayerColorIdx(LAY_PIPE_DIRT))
SetLayerColorIdx(LAY_PIPE_DIRT, m_iColor4);
if(m_iColor5 != GetLayerColorIdx(LAY_PIPE_USELESS))
SetLayerColorIdx(LAY_PIPE_USELESS, m_iColor5);
if(m_iColor6 != GetLayerColorIdx(LAY_PIPE_RAIN))
SetLayerColorIdx(LAY_PIPE_RAIN, m_iColor6);
if(m_iColor7 != GetLayerColorIdx(LAY_PIPE_USED))
SetLayerColorIdx(LAY_PIPE_USED, m_iColor7);
if(m_iColor8 != GetLayerColorIdx(LAY_PIPE_FIRE))
SetLayerColorIdx(LAY_PIPE_FIRE, m_iColor8);
if(m_iColor9 != GetLayerColorIdx(LAY_PIPE_SPRINKLE))
SetLayerColorIdx(LAY_PIPE_SPRINKLE, m_iColor9);
if(m_iColor15 != GetLayerColorIdx(LAY_PIPE_OTHER))
SetLayerColorIdx(LAY_PIPE_OTHER, m_iColor15);
if(m_iVColor1 != GetLayerColorIdx(LAY_VPIPE_FEED))
SetLayerColorIdx(LAY_VPIPE_FEED, m_iVColor1);
if(m_iVColor2 != GetLayerColorIdx(LAY_VPIPE_HEADFEED))
SetLayerColorIdx(LAY_VPIPE_HEADFEED, m_iVColor2);
if(m_iVColor3 != GetLayerColorIdx(LAY_VPIPE_HEADBACK))
SetLayerColorIdx(LAY_VPIPE_HEADBACK, m_iVColor3);
if(m_iVColor4 != GetLayerColorIdx(LAY_VPIPE_DIRT))
SetLayerColorIdx(LAY_VPIPE_DIRT, m_iVColor4);
if(m_iVColor5 != GetLayerColorIdx(LAY_VPIPE_USELESS))
SetLayerColorIdx(LAY_VPIPE_USELESS, m_iVColor5);
if(m_iVColor6 != GetLayerColorIdx(LAY_VPIPE_RAIN))
SetLayerColorIdx(LAY_VPIPE_RAIN, m_iVColor6);
if(m_iVColor7 != GetLayerColorIdx(LAY_VPIPE_USED))
SetLayerColorIdx(LAY_VPIPE_USED, m_iVColor7);
if(m_iVColor8 != GetLayerColorIdx(LAY_VPIPE_FIRE))
SetLayerColorIdx(LAY_VPIPE_FIRE, m_iVColor8);
if(m_iVColor9 != GetLayerColorIdx(LAY_VPIPE_SPRINKLE))
SetLayerColorIdx(LAY_VPIPE_SPRINKLE, m_iVColor9);
if(m_iVColor15 != GetLayerColorIdx(LAY_VPIPE_OTHER))
SetLayerColorIdx(LAY_VPIPE_OTHER, m_iVColor15);
m_csLineType1 = m_lstLineTypeName[m_iLineType1];
m_csLineType2 = m_lstLineTypeName[m_iLineType2];
m_csLineType3 = m_lstLineTypeName[m_iLineType3];
m_csLineType4 = m_lstLineTypeName[m_iLineType4];
m_csLineType5 = m_lstLineTypeName[m_iLineType5];
m_csLineType6 = m_lstLineTypeName[m_iLineType6];
m_csLineType7 = m_lstLineTypeName[m_iLineType7];
m_csLineType8 = m_lstLineTypeName[m_iLineType8];
m_csLineType9 = m_lstLineTypeName[m_iLineType9];
m_csLineType15 = m_lstLineTypeName[m_iLineType15];
g_csTwtLineType[0] = m_csLineType1;
g_csTwtLineType[1] = m_csLineType2;
g_csTwtLineType[2] = m_csLineType3;
g_csTwtLineType[3] = m_csLineType4;
g_csTwtLineType[4] = m_csLineType5;
g_csTwtLineType[5] = m_csLineType6;
g_csTwtLineType[6] = m_csLineType7;
g_csTwtLineType[7] = m_csLineType8;
g_csTwtLineType[8] = m_csLineType9;
g_csTwtLineType[14] = m_csLineType15;
/* cet 2011.12.1 modify ½«Í¼²ãÏßÐÍдÈëÎļþ
regProp.SetValue(_T("PipeLineType1"), g_csTwtLineType[0]);
regProp.SetValue(_T("PipeLineType2"), g_csTwtLineType[1]);
regProp.SetValue(_T("PipeLineType3"), g_csTwtLineType[2]);
regProp.SetValue(_T("PipeLineType4"), g_csTwtLineType[3]);
regProp.SetValue(_T("PipeLineType5"), g_csTwtLineType[4]);
regProp.SetValue(_T("PipeLineType6"), g_csTwtLineType[5]);
regProp.SetValue(_T("PipeLineType7"), g_csTwtLineType[6]);
regProp.SetValue(_T("PipeLineType8"), g_csTwtLineType[7]);
regProp.SetValue(_T("PipeLineType9"), g_csTwtLineType[8]);
regProp.SetValue(_T("PipeLineType15"), g_csTwtLineType[14]);
*/
if (m_csLineType1 != GetDefineLayerLineType(LAY_PIPE_FEED) && GetDefineLayerLineType(LAY_PIPE_FEED) != _T(""))
SetDefineLayerLineType(LAY_PIPE_FEED, m_csLineType1);
if (m_csLineType2 != GetDefineLayerLineType(LAY_PIPE_HEADFEED) && GetDefineLayerLineType(LAY_PIPE_HEADFEED) != _T(""))
SetDefineLayerLineType(LAY_PIPE_HEADFEED, m_csLineType2);
if (m_csLineType3 != GetDefineLayerLineType(LAY_PIPE_HEADBACK) && GetDefineLayerLineType(LAY_PIPE_HEADBACK) != _T(""))
SetDefineLayerLineType(LAY_PIPE_HEADBACK, m_csLineType3);
if (m_csLineType4 != GetDefineLayerLineType(LAY_PIPE_DIRT) && GetDefineLayerLineType(LAY_PIPE_DIRT) != _T(""))
SetDefineLayerLineType(LAY_PIPE_DIRT, m_csLineType4);
if (m_csLineType5 != GetDefineLayerLineType(LAY_PIPE_USELESS) && GetDefineLayerLineType(LAY_PIPE_USELESS) != _T(""))
SetDefineLayerLineType(LAY_PIPE_USELESS, m_csLineType5);
if (m_csLineType6 != GetDefineLayerLineType(LAY_PIPE_RAIN) && GetDefineLayerLineType(LAY_PIPE_RAIN) != _T(""))
SetDefineLayerLineType(LAY_PIPE_RAIN, m_csLineType6);
if (m_csLineType7 != GetDefineLayerLineType(LAY_PIPE_USED) && GetDefineLayerLineType(LAY_PIPE_USED) != _T(""))
SetDefineLayerLineType(LAY_PIPE_USED, m_csLineType7);
if (m_csLineType8 != GetDefineLayerLineType(LAY_PIPE_FIRE) && GetDefineLayerLineType(LAY_PIPE_FIRE) != _T(""))
SetDefineLayerLineType(LAY_PIPE_FIRE, m_csLineType8);
if (m_csLineType9 != GetDefineLayerLineType(LAY_PIPE_SPRINKLE) && GetDefineLayerLineType(LAY_PIPE_SPRINKLE) != _T(""))
SetDefineLayerLineType(LAY_PIPE_SPRINKLE, m_csLineType9);
if (m_csLineType15 != GetDefineLayerLineType(LAY_PIPE_OTHER) && GetDefineLayerLineType(LAY_PIPE_OTHER) != _T(""))
SetDefineLayerLineType(LAY_PIPE_OTHER, m_csLineType15);
if(m_csLineType1 != GetLayerLineType(LAY_PIPE_FEED) && GetLayerLineType(LAY_PIPE_FEED) != _T(""))
SetLayerLineType(LAY_PIPE_FEED, m_csLineType1);
if(m_csLineType2 != GetLayerLineType(LAY_PIPE_HEADFEED) && GetLayerLineType(LAY_PIPE_HEADFEED) != _T(""))
SetLayerLineType(LAY_PIPE_HEADFEED, m_csLineType2);
if(m_csLineType3 != GetLayerLineType(LAY_PIPE_HEADBACK) && GetLayerLineType(LAY_PIPE_HEADBACK) != _T(""))
SetLayerLineType(LAY_PIPE_HEADBACK, m_csLineType3);
if(m_csLineType4 != GetLayerLineType(LAY_PIPE_DIRT) && GetLayerLineType(LAY_PIPE_DIRT) != _T(""))
SetLayerLineType(LAY_PIPE_DIRT, m_csLineType4);
if(m_csLineType5 != GetLayerLineType(LAY_PIPE_USELESS) && GetLayerLineType(LAY_PIPE_USELESS) != _T(""))
SetLayerLineType(LAY_PIPE_USELESS, m_csLineType5);
if(m_csLineType6 != GetLayerLineType(LAY_PIPE_RAIN) && GetLayerLineType(LAY_PIPE_RAIN) != _T(""))
SetLayerLineType(LAY_PIPE_RAIN, m_csLineType6);
if(m_csLineType7 != GetLayerLineType(LAY_PIPE_USED) && GetLayerLineType(LAY_PIPE_USED) != _T(""))
SetLayerLineType(LAY_PIPE_USED, m_csLineType7);
if(m_csLineType8 != GetLayerLineType(LAY_PIPE_FIRE) && GetLayerLineType(LAY_PIPE_FIRE) != _T(""))
SetLayerLineType(LAY_PIPE_FIRE, m_csLineType8);
if(m_csLineType9 != GetLayerLineType(LAY_PIPE_SPRINKLE) && GetLayerLineType(LAY_PIPE_SPRINKLE) != _T(""))
SetLayerLineType(LAY_PIPE_SPRINKLE, m_csLineType9);
if(m_csLineType15 != GetLayerLineType(LAY_PIPE_OTHER) && GetLayerLineType(LAY_PIPE_OTHER) != _T(""))
SetLayerLineType(LAY_PIPE_OTHER, m_csLineType15);
if(m_bModify){//¶Ô±¾Í¼Ç¿ÖƽøÐÐÐÞ¸ÄÒÔÏÂÊôÐÔ: ÑÕÉ«, Ïß¿í, ÏßÐÎ, ¹Ü²Ä, Á¢¹Ü°ë¾¶
PickSet ssAll(SS_FREE);
RBList rbMask(RTDXF0, _T("ATS_PIPE"), NULL);
ssAll.Get(_T("X"), NULL, NULL, rbMask);
BOOL bChangleRadius = FALSE;
long len = ssAll.Length();
for(long i=0;i<len;i++){
Entity ent = ssAll[i];
OPENOBJ_BEGIN(ent, AcDb::kForWrite, TDbPipe, pPipe);
if(pPipe){
if(pPipe->GetSysType() == TPipeSys::kFeedWater
|| pPipe->GetSysType() == TPipeSys::kFeedWater2 // cet 2011.12.6 add ¸øË®ÖÐÇø
|| pPipe->GetSysType() == TPipeSys::kFeedWater3 // cet 2011.12.6 add ¸øË®¸ßÇø
){
TCHAR* szLay = pPipe->layer();
if(_tcsicmp(szLay, LAY_PIPE_FEED) == 0 || _tcsicmp(szLay, LAY_VPIPE_FEED) == 0){
if(pPipe->IsVertical()){
pPipe->SetRadius(m_nRadius1);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType1);//Á¢¹ÜÏßÐβ»ÄÜËæºá¹Ü×ß
pPipe->SetPipeWeight(m_nWidth1);
pPipe->SetMaterial(m_iMaterial1);
}
delete [] szLay;
}
else if(pPipe->GetSysType() == TPipeSys::kHeatFeedWater
|| pPipe->GetSysType() == TPipeSys::kHeatFeedWater2 // cet 2011.12.6 add ÈȸøË®ÖÐÇø
|| pPipe->GetSysType() == TPipeSys::kHeatFeedWater3 // cet 2011.12.6 add ÈȸøË®¸ßÇø
){
CString csLay = pPipe->GetLayer();
if(_tcsicmp(csLay, LAY_PIPE_HEADFEED) == 0 || _tcsicmp(csLay, LAY_VPIPE_HEADFEED) == 0)
{
if(pPipe->IsVertical())
{
pPipe->SetRadius(m_nRadius2);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType2);//Á¢¹ÜÏßÐβ»ÄÜËæºá¹Ü×ß
pPipe->SetPipeWeight(m_nWidth2);
pPipe->SetMaterial(m_iMaterial2);
}
}
else if(pPipe->GetSysType() == TPipeSys::kHeatBackWater
|| pPipe->GetSysType() == TPipeSys::kHeatBackWater2 // cet 2011.12.6 add ÈÈ»ØË®ÖÐÇø
|| pPipe->GetSysType() == TPipeSys::kHeatBackWater3 // cet 2011.12.6 add ÈÈ»ØË®¸ßÇø
){
CString csLay = pPipe->GetLayer();
if(_tcsicmp(csLay, LAY_PIPE_HEADBACK) == 0 || _tcsicmp(csLay, LAY_VPIPE_HEADBACK) == 0){
if(pPipe->IsVertical()){
pPipe->SetRadius(m_nRadius3);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType3);//Á¢¹ÜÏßÐβ»ÄÜËæºá¹Ü×ß
pPipe->SetPipeWeight(m_nWidth3);
pPipe->SetMaterial(m_iMaterial3);
}
}
else if(pPipe->GetSysType() == TPipeSys::kDirtWater){
if(pPipe->IsVertical()){
pPipe->SetRadius(m_nRadius4);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType4);
pPipe->SetPipeWeight(m_nWidth4);
pPipe->SetMaterial(m_iMaterial4);
}
else if(pPipe->GetSysType() == TPipeSys::kUselessWater){
if(pPipe->IsVertical()){
pPipe->SetRadius(m_nRadius5);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType5);
pPipe->SetPipeWeight(m_nWidth5);
pPipe->SetMaterial(m_iMaterial5);
}
else if(pPipe->GetSysType() == TPipeSys::kRainWater){
if(pPipe->IsVertical()){
pPipe->SetRadius(m_nRadius6);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType6);
pPipe->SetPipeWeight(m_nWidth6);
pPipe->SetMaterial(m_iMaterial6);
}
else if(pPipe->GetSysType() == TPipeSys::kUsedWater
|| pPipe->GetSysType() == TPipeSys::kUsedWater2 // cet 2011.12.6 add ÖÐË®ÖÐÇø
|| pPipe->GetSysType() == TPipeSys::kUsedWater3 // cet 2011.12.6 add ÖÐË®¸ßÇø
){
if(pPipe->IsVertical()){
pPipe->SetRadius(m_nRadius7);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType7);
pPipe->SetPipeWeight(m_nWidth7);
pPipe->SetMaterial(m_iMaterial7);
}
else if(pPipe->GetSysType() == TPipeSys::kFireFighting
|| pPipe->GetSysType() == TPipeSys::kFireFighting2 // cet 2011.12.6 add Ïû·ÀÖÐÇø
|| pPipe->GetSysType() == TPipeSys::kFireFighting3 // cet 2011.12.6 add Ïû·À¸ßÇø
){
CString csLay = pPipe->GetLayer();
if(_tcsicmp(csLay, LAY_PIPE_FIRE) == 0 || _tcsicmp(csLay, LAY_VPIPE_FIRE) == 0)
{
if(pPipe->IsVertical())
{
pPipe->SetRadius(m_nRadius8);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType8);//Á¢¹ÜÏßÐβ»ÄÜËæºá¹Ü×ß
pPipe->SetPipeWeight(m_nWidth8);
pPipe->SetMaterial(m_iMaterial8);
}
}
else if(pPipe->GetSysType() == TPipeSys::kSprinkle
|| pPipe->GetSysType() == TPipeSys::kSprinkle2 // cet 2011.12.6 add Ïû·ÀÖÐÇø
|| pPipe->GetSysType() == TPipeSys::kSprinkle3 // cet 2011.12.6 add Ïû·À¸ßÇø
){
if(pPipe->IsVertical()){
pPipe->SetRadius(m_nRadius9);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType9);
pPipe->SetPipeWeight(m_nWidth9);
pPipe->SetMaterial(m_iMaterial9);
}
else if(pPipe->GetSysType() == TPipeSys::kOther){
if(pPipe->IsVertical()){
pPipe->SetRadius(m_nRadius15);
bChangleRadius = TRUE;
}
else
pPipe->setLinetype(m_csLineType15);
pPipe->SetPipeWeight(m_nWidth15);
pPipe->SetMaterial(m_iMaterial15);
}
}
OPENOBJ_END();
}
if(bChangleRadius){
TPipePerDocData *pData = GetCurPipeDocData();
pData->ApplyUpdates();
}
}
}
UpdateData(FALSE);
}