1664 lines
62 KiB
C++
1664 lines
62 KiB
C++
#include "stdafx.h"
|
|
#include "PipeSettingChild2Dlg.h"
|
|
|
|
#include <PipeTools.h>
|
|
//#include <cbclass.h>
|
|
#include <PipeWireMonitor.h>
|
|
#include <layerDefine.h>
|
|
#include "TAPI.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
// 获得备注 cet 2011.11.30 add
|
|
BOOL GetLayerReMark(const TCHAR *szLayer, CString &sRemark)
|
|
{
|
|
sRemark.Empty();
|
|
XString fullFile;
|
|
if(FindFile(_T("LAYERDEF.DAT"), fullFile))
|
|
{
|
|
FILE *fp=fopen(_AS(fullFile), "r");
|
|
if(!fp)
|
|
return FALSE;
|
|
while(!feof(fp))
|
|
{
|
|
char sBuf[256]="";
|
|
TCHAR eName[256]=_T(""),sTemp[256]=_T("");
|
|
fgets(sBuf, 255, fp);
|
|
if(sBuf[0])
|
|
{
|
|
CT_strnth(TString(sBuf), 2, eName);
|
|
}
|
|
|
|
if (_tcscmp(eName, szLayer) == 0)
|
|
{
|
|
CT_strnth(TString(sBuf), 5, sTemp);
|
|
sRemark = sTemp;
|
|
break;
|
|
}
|
|
}
|
|
fclose(fp);
|
|
}
|
|
else
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
// 设置备注 cet 2011.11.30 add
|
|
void SetLayerRemark(const TCHAR *szChnLayer, const TCHAR *szRemark)
|
|
{
|
|
DList<CLayerData> lstLayer;
|
|
XString fullFile;
|
|
if(FindFile(_T("layerdef.dat"), fullFile)) {
|
|
FILE *fp=fopen(_AS(fullFile), "r");
|
|
if(!fp)
|
|
return;
|
|
while(!feof(fp)) {
|
|
char sBuf[256]="";
|
|
TCHAR cName[256]=_T(""), eName[256]=_T(""), sColor[256]=_T(""), sLineType[256]=_T(""), sDes[256]=_T("");
|
|
|
|
fgets(sBuf, 255, fp);
|
|
if(sBuf[0]) {
|
|
CT_strnth(TString(sBuf), 1, cName);
|
|
CT_strnth(TString(sBuf), 2, eName);
|
|
CT_strnth(TString(sBuf), 3, sColor);
|
|
CT_strnth(TString(sBuf), 4, sLineType);
|
|
CT_strnth(TString(sBuf), 5, sDes);
|
|
}
|
|
if(cName[0] && eName[0]) {
|
|
int nColor=_ttoi(sColor);
|
|
lstLayer.Append(new CLayerData(eName, cName, sLineType, sDes, nColor));
|
|
}
|
|
}
|
|
fclose(fp);
|
|
}
|
|
int len = lstLayer.Length();
|
|
CString csLayerOld;
|
|
for(int i=0;i<len;i++){
|
|
if(_tcscmp(lstLayer[i]->m_csEName, szChnLayer) == 0){
|
|
lstLayer[i]->m_csDes = szRemark;
|
|
break;
|
|
}
|
|
}
|
|
|
|
FILE *fp = fopen(_AS(fullFile), "w");
|
|
if(!fp)
|
|
return;
|
|
len = lstLayer.Length();
|
|
for(i=0; i < len; i++){
|
|
CString csColor;
|
|
csColor.Format(_T("%d"), lstLayer[i]->m_iColor);
|
|
CString csTmp = lstLayer[i]->m_csCName + _T(" ") + lstLayer[i]->m_csEName + _T(" ") + csColor + _T(" ")
|
|
+ lstLayer[i]->m_csLinetype + _T(" ") + lstLayer[i]->m_csDes + _T("\n");
|
|
fputs(_AS(csTmp), fp);
|
|
}
|
|
fclose(fp);
|
|
}
|
|
|
|
|
|
//获取图层设置中的线型 cet 2011.12.1 add
|
|
CString GetDefineLayerLineType(LPCTSTR pszLayer)
|
|
{
|
|
XString fullFile;
|
|
CString sLType = _T("");
|
|
if(FindFile(_T("layerdef.dat"), fullFile))
|
|
{
|
|
FILE *fp=fopen(_AS(fullFile), "r");
|
|
if(!fp)
|
|
return sLType;
|
|
while(!feof(fp))
|
|
{
|
|
char sBuf[256]="";
|
|
TCHAR eName[256]=_T(""),sLineType[256];
|
|
fgets(sBuf, 255, fp);
|
|
if(sBuf[0])
|
|
{
|
|
CT_strnth(TString(sBuf), 2, eName);
|
|
CT_strnth(TString(sBuf), 4, sLineType);
|
|
}
|
|
if(_tcscmp(pszLayer, eName) == 0)
|
|
{
|
|
fclose(fp);
|
|
sLType = sLineType;
|
|
break;
|
|
}
|
|
}
|
|
fclose(fp);
|
|
}
|
|
|
|
return sLType;
|
|
}
|
|
|
|
// cet 2011.12.1 add 设置图层线型
|
|
void SetDefineLayerLineType(LPCTSTR pszLayer,LPCTSTR pszLinetype)
|
|
{
|
|
if (pszLayer == NULL || pszLinetype == NULL)
|
|
{
|
|
return;
|
|
}
|
|
|
|
XString fullFile;
|
|
CString sLType = _T(""),sOut = _T("");
|
|
CStringArray arFileContents;
|
|
if(FindFile(_T("layerdef.dat"), fullFile))
|
|
{
|
|
FILE *fp=fopen(_AS(fullFile), "r");
|
|
if(!fp)
|
|
return;
|
|
while(!feof(fp))
|
|
{
|
|
char sBuf[256]="";
|
|
TCHAR cName[256]=_T(""),eName[256]=_T(""), sColor[256]=_T(""),sLineType[256]=_T(""),sDes[256]=_T("");
|
|
fgets(sBuf, 255, fp);
|
|
if(sBuf[0])
|
|
{
|
|
CT_strnth(TString(sBuf), 1, cName);
|
|
CT_strnth(TString(sBuf), 2, eName);
|
|
CT_strnth(TString(sBuf), 3, sColor);
|
|
CT_strnth(TString(sBuf), 4, sLineType);
|
|
CT_strnth(TString(sBuf), 5, sDes);
|
|
sOut = TString(sBuf);
|
|
}
|
|
if(_tcscmp(pszLayer, eName) == 0)
|
|
{
|
|
sOut.Format(_T("%s %s %s %s %s"),cName,eName,sColor,pszLinetype,sDes);
|
|
}
|
|
if (!sOut.IsEmpty())
|
|
{
|
|
sOut.TrimLeft();
|
|
sOut.TrimRight();
|
|
sOut += _T("\n");
|
|
arFileContents.Add(sOut);
|
|
}
|
|
}
|
|
fclose(fp);
|
|
|
|
fp=fopen(_AS(fullFile), "w");
|
|
if(!fp)
|
|
return;
|
|
for (int i = 0;i < arFileContents.GetSize();++i)
|
|
{
|
|
fputs(_AS(arFileContents[i]),fp);
|
|
}
|
|
fclose(fp);
|
|
}
|
|
}
|
|
|
|
CPipeSettingChild2Dlg::CPipeSettingChild2Dlg(CWnd* pParent /*=NULL*/)
|
|
: CDialog(CPipeSettingChild2Dlg::IDD, pParent), m_spinWidth10(0.05),
|
|
m_spinWidth11(0.05), m_spinWidth12(0.05), m_spinWidth13(0.05),
|
|
m_spinWidth14(0.05), m_spinWidth16(0.05), m_spinWidth17(0.05),
|
|
m_spinWidth18(0.05), m_spinWidth19(0.05), m_spinWidth20(0.05),
|
|
m_spinWidth21(0.05), m_spinWidth22(0.05), m_spinWidth23(0.05)
|
|
{
|
|
//{{AFX_DATA_INIT(CPipeSettingChild2Dlg)
|
|
m_iMaterial10 = 0;
|
|
m_iMaterial11 = 0;
|
|
m_iMaterial12 = 0;
|
|
m_iMaterial13 = 0;
|
|
m_iMaterial14 = 0;
|
|
m_iMaterial16 = 0;
|
|
m_iMaterial17 = 0;
|
|
m_iMaterial18 = 0;
|
|
m_iMaterial19 = 0;
|
|
m_iMaterial20 = 7;
|
|
m_iMaterial21 = 0;
|
|
m_iMaterial22 = 2;
|
|
m_iMaterial23 = 7;
|
|
m_csDim10 = _T("N");
|
|
m_csDim11 = _T("ZY");
|
|
m_csDim12 = _T("YW");
|
|
m_csDim13 = _T("YF");
|
|
m_csDim14 = _T("YY");
|
|
m_csDim16 = _T("SJ");
|
|
m_csDim17 = _T("XJ");
|
|
m_csDim18 = _T("XH");
|
|
m_csDim19 = _T("MH");
|
|
m_csDim20 = _T("Z");
|
|
m_csDim21 = _T("YL");
|
|
m_csDim22 = _T("T");
|
|
m_csDim23 = _T("SJ");
|
|
m_iLineType10 = 0;
|
|
m_iLineType11 = 0;
|
|
m_iLineType12 = 0;
|
|
m_iLineType13 = 0;
|
|
m_iLineType14 = 0;
|
|
m_iLineType16 = 0;
|
|
m_iLineType17 = 0;
|
|
m_iLineType18 = 0;
|
|
m_iLineType19 = 0;
|
|
m_iLineType20 = 0;
|
|
m_iLineType21 = 0;
|
|
m_iLineType22 = 0;
|
|
m_iLineType23 = 0;
|
|
m_nWidth10 = 0.35;
|
|
m_nWidth11 = 0.35;
|
|
m_nWidth12 = 0.35;
|
|
m_nWidth13 = 0.35;
|
|
m_nWidth14 = 0.35;
|
|
m_nWidth16 = 0.35;
|
|
m_nWidth17 = 0.35;
|
|
m_nWidth18 = 0.35;
|
|
m_nWidth19 = 0.35;
|
|
m_nWidth20 = 0.35;
|
|
m_nWidth22 = 0.35;
|
|
m_nWidth21 = 0.35;
|
|
m_nWidth23 = 0.35;
|
|
m_nRadius10 = 50;
|
|
m_nRadius11 = 50;
|
|
m_nRadius12 = 50;
|
|
m_nRadius13 = 50;
|
|
m_nRadius14 = 50;
|
|
m_nRadius16 = 50;
|
|
m_nRadius17 = 50;
|
|
m_nRadius18 = 50;
|
|
m_nRadius19 = 50;
|
|
m_nRadius20 = 50;
|
|
m_nRadius21 = 50;
|
|
m_nRadius22 = 50;
|
|
m_nRadius23 = 50;
|
|
m_csPipeName1 = _T("凝结");
|
|
m_csPipeName2 = _T("直饮");
|
|
m_csPipeName3 = _T("压力污");
|
|
m_csPipeName4 = _T("压力废");
|
|
m_csPipeName5 = _T("压力雨");
|
|
m_csPipeName6 = _T("市政给");
|
|
m_csPipeName7 = _T("循环给");
|
|
m_csPipeName8 = _T("冷却");
|
|
m_csPipeName9 = _T("气体灭火");
|
|
m_csPipeName10 = _T("蒸汽");
|
|
m_csPipeName11 = _T("雨淋");
|
|
m_csPipeName12 = _T("通气");
|
|
m_csPipeName13 = _T("水景");
|
|
//}}AFX_DATA_INIT
|
|
|
|
m_bLineTypeByLayer = FALSE;
|
|
m_bModify = FALSE;
|
|
m_iMode = 0;
|
|
}
|
|
|
|
|
|
void CPipeSettingChild2Dlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CPipeSettingChild2Dlg)
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH23, m_spinWidth23);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH22, m_spinWidth22);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH21, m_spinWidth21);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH20, m_spinWidth20);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH19, m_spinWidth19);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH18, m_spinWidth18);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE23, m_comboLineType23);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE22, m_comboLineType22);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE21, m_comboLineType21);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE20, m_comboLineType20);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE19, m_comboLineType19);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE18, m_comboLineType18);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL23, m_comboMat23);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL22, m_comboMat22);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL21, m_comboMat21);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL20, m_comboMat20);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL19, m_comboMat19);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL18, m_comboMat18);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE17, m_comboLineType17);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE16, m_comboLineType16);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH17, m_spinWidth17);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH16, m_spinWidth16);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL17, m_comboMat17);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL16, m_comboMat16);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE14, m_comboLineType14);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE13, m_comboLineType13);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE12, m_comboLineType12);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE11, m_comboLineType11);
|
|
DDX_Control(pDX, IDC_COMBO_TYPE10, m_comboLineType10);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL14, m_comboMat14);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL13, m_comboMat13);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL12, m_comboMat12);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL11, m_comboMat11);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH14, m_spinWidth14);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH13, m_spinWidth13);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH12, m_spinWidth12);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH11, m_spinWidth11);
|
|
DDX_Control(pDX, IDC_COMBO_MATERIAL10, m_comboMat10);
|
|
DDX_Control(pDX, IDC_SPIN_WIDTH10, m_spinWidth10);
|
|
DDX_Text(pDX, IDC_EDIT_DIM10, m_csDim10);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE10, m_iLineType10);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL10, m_iMaterial10);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH10, m_nWidth10);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL11, m_iMaterial11);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL12, m_iMaterial12);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL13, m_iMaterial13);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL14, m_iMaterial14);
|
|
DDX_Text(pDX, IDC_EDIT_DIM11, m_csDim11);
|
|
DDX_Text(pDX, IDC_EDIT_DIM12, m_csDim12);
|
|
DDX_Text(pDX, IDC_EDIT_DIM13, m_csDim13);
|
|
DDX_Text(pDX, IDC_EDIT_DIM14, m_csDim14);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE11, m_iLineType11);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE12, m_iLineType12);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE13, m_iLineType13);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE14, m_iLineType14);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH11, m_nWidth11);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH12, m_nWidth12);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH13, m_nWidth13);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH14, m_nWidth14);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE10, m_nRadius10);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE11, m_nRadius11);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE12, m_nRadius12);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE13, m_nRadius13);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE14, m_nRadius14);
|
|
DDX_Text(pDX, IDC_EDIT_NAME1, m_csPipeName1);
|
|
DDX_Text(pDX, IDC_EDIT_NAME2, m_csPipeName2);
|
|
DDX_Text(pDX, IDC_EDIT_NAME3, m_csPipeName3);
|
|
DDX_Text(pDX, IDC_EDIT_NAME4, m_csPipeName4);
|
|
DDX_Text(pDX, IDC_EDIT_NAME5, m_csPipeName5);
|
|
DDX_Text(pDX, IDC_EDIT_NAME6, m_csPipeName6);
|
|
DDX_Text(pDX, IDC_EDIT_NAME7, m_csPipeName7);
|
|
DDX_Text(pDX, IDC_EDIT_DIM16, m_csDim16);
|
|
DDX_Text(pDX, IDC_EDIT_DIM17, m_csDim17);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE16, m_nRadius16);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE17, m_nRadius17);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL16, m_iMaterial16);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL17, m_iMaterial17);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH16, m_nWidth16);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH17, m_nWidth17);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE16, m_iLineType16);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE17, m_iLineType17);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL18, m_iMaterial18);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL19, m_iMaterial19);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL20, m_iMaterial20);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL21, m_iMaterial21);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL22, m_iMaterial22);
|
|
DDX_CBIndex(pDX, IDC_COMBO_MATERIAL23, m_iMaterial23);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE18, m_iLineType18);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE19, m_iLineType19);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE20, m_iLineType20);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE21, m_iLineType21);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE22, m_iLineType22);
|
|
DDX_CBIndex(pDX, IDC_COMBO_TYPE23, m_iLineType23);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE18, m_nRadius18);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE19, m_nRadius19);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE20, m_nRadius20);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE21, m_nRadius21);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE22, m_nRadius22);
|
|
DDX_Text(pDX, IDC_EDIT_CIRCLE23, m_nRadius23);
|
|
DDX_Text(pDX, IDC_EDIT_DIM18, m_csDim18);
|
|
DDX_Text(pDX, IDC_EDIT_DIM19, m_csDim19);
|
|
DDX_Text(pDX, IDC_EDIT_DIM20, m_csDim20);
|
|
DDX_Text(pDX, IDC_EDIT_DIM21, m_csDim21);
|
|
DDX_Text(pDX, IDC_EDIT_DIM22, m_csDim22);
|
|
DDX_Text(pDX, IDC_EDIT_DIM23, m_csDim23);
|
|
DDX_Text(pDX, IDC_EDIT_NAME10, m_csPipeName10);
|
|
DDX_Text(pDX, IDC_EDIT_NAME11, m_csPipeName11);
|
|
DDX_Text(pDX, IDC_EDIT_NAME13, m_csPipeName13);
|
|
DDX_Text(pDX, IDC_EDIT_NAME12, m_csPipeName12);
|
|
DDX_Text(pDX, IDC_EDIT_NAME8, m_csPipeName8);
|
|
DDX_Text(pDX, IDC_EDIT_NAME9, m_csPipeName9);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH18, m_nWidth18);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH19, m_nWidth19);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH20, m_nWidth20);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH22, m_nWidth22);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH21, m_nWidth21);
|
|
DDX_Text(pDX, IDC_EDIT_WIDTH23, m_nWidth23);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CPipeSettingChild2Dlg, CDialog)
|
|
//{{AFX_MSG_MAP(CPipeSettingChild2Dlg)
|
|
ON_WM_PAINT()
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR10, OnStaticColor10)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR11, OnStaticColor11)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR12, OnStaticColor12)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR13, OnStaticColor13)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR14, OnStaticColor14)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR16, OnStaticColor16)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR17, OnStaticColor17)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR18, OnStaticColor18)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR19, OnStaticColor19)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR20, OnStaticColor20)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR21, OnStaticColor21)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR22, OnStaticColor22)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR23, OnStaticColor23)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR40, OnStaticColor40)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR41, OnStaticColor41)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR42, OnStaticColor42)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR43, OnStaticColor43)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR44, OnStaticColor44)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR46, OnStaticColor46)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR47, OnStaticColor47)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR48, OnStaticColor48)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR49, OnStaticColor49)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR50, OnStaticColor50)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR51, OnStaticColor51)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR52, OnStaticColor52)
|
|
ON_BN_CLICKED(IDC_STATIC_COLOR53, OnStaticColor53)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
|
|
BOOL CPipeSettingChild2Dlg::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
m_spinWidth10.SetRange(0, 1);
|
|
m_spinWidth11.SetRange(0, 1);
|
|
m_spinWidth12.SetRange(0, 1);
|
|
m_spinWidth13.SetRange(0, 1);
|
|
m_spinWidth14.SetRange(0, 1);
|
|
m_spinWidth16.SetRange(0, 1);
|
|
m_spinWidth17.SetRange(0, 1);
|
|
// cet 2011.11.29 add
|
|
m_spinWidth18.SetRange(0, 1);
|
|
m_spinWidth19.SetRange(0, 1);
|
|
m_spinWidth20.SetRange(0, 1);
|
|
m_spinWidth21.SetRange(0, 1);
|
|
m_spinWidth22.SetRange(0, 1);
|
|
m_spinWidth23.SetRange(0, 1);
|
|
|
|
m_iColor10 = GetLayerColorIdx(LAY_PIPE_COAGULATE);
|
|
m_iColor11 = GetLayerColorIdx(LAY_PIPE_DRINK);
|
|
m_iColor12 = GetLayerColorIdx(LAY_PIPE_PRESSDIRT);
|
|
m_iColor13 = GetLayerColorIdx(LAY_PIPE_PRESSUSELESS);
|
|
m_iColor14 = GetLayerColorIdx(LAY_PIPE_PRESSRAIN);
|
|
m_iColor16 = GetLayerColorIdx(LAY_PIPE_USER1);
|
|
m_iColor17 = GetLayerColorIdx(LAY_PIPE_USER2);
|
|
// cet 2011.11.29 add
|
|
m_iColor18 = GetLayerColorIdx(LAY_PIPE_USER3);
|
|
m_iColor19 = GetLayerColorIdx(LAY_PIPE_USER4);
|
|
m_iColor20 = GetLayerColorIdx(LAY_PIPE_USER5);
|
|
m_iColor21 = GetLayerColorIdx(LAY_PIPE_USER6);
|
|
m_iColor22 = GetLayerColorIdx(LAY_PIPE_USER7);
|
|
m_iColor23 = GetLayerColorIdx(LAY_PIPE_USER8);
|
|
|
|
m_iVColor10 = GetLayerColorIdx(LAY_VPIPE_COAGULATE);
|
|
m_iVColor11 = GetLayerColorIdx(LAY_VPIPE_DRINK);
|
|
m_iVColor12 = GetLayerColorIdx(LAY_VPIPE_PRESSDIRT);
|
|
m_iVColor13 = GetLayerColorIdx(LAY_VPIPE_PRESSUSELESS);
|
|
m_iVColor14 = GetLayerColorIdx(LAY_VPIPE_PRESSRAIN);
|
|
m_iVColor16 = GetLayerColorIdx(LAY_VPIPE_USER1);
|
|
m_iVColor17 = GetLayerColorIdx(LAY_VPIPE_USER2);
|
|
// cet 2011.11.29 add
|
|
m_iVColor18 = GetLayerColorIdx(LAY_VPIPE_USER3);
|
|
m_iVColor19 = GetLayerColorIdx(LAY_VPIPE_USER4);
|
|
m_iVColor20 = GetLayerColorIdx(LAY_VPIPE_USER5);
|
|
m_iVColor21 = GetLayerColorIdx(LAY_VPIPE_USER6);
|
|
m_iVColor22 = GetLayerColorIdx(LAY_VPIPE_USER7);
|
|
m_iVColor23 = GetLayerColorIdx(LAY_VPIPE_USER8);
|
|
|
|
XStringList lstMat;
|
|
GetPipeMaterialList(lstMat);
|
|
for(int i=0;i<lstMat.Length();i++){
|
|
m_comboMat10.AddString(lstMat[i]);
|
|
m_comboMat11.AddString(lstMat[i]);
|
|
m_comboMat12.AddString(lstMat[i]);
|
|
m_comboMat13.AddString(lstMat[i]);
|
|
m_comboMat14.AddString(lstMat[i]);
|
|
m_comboMat16.AddString(lstMat[i]);
|
|
m_comboMat17.AddString(lstMat[i]);
|
|
// cet 2011.11.29 add
|
|
m_comboMat18.AddString(lstMat[i]);
|
|
m_comboMat19.AddString(lstMat[i]);
|
|
m_comboMat20.AddString(lstMat[i]);
|
|
m_comboMat21.AddString(lstMat[i]);
|
|
m_comboMat22.AddString(lstMat[i]);
|
|
m_comboMat23.AddString(lstMat[i]);
|
|
}
|
|
UpdateDlgData(TRUE);
|
|
ResetLineCombox();
|
|
|
|
|
|
if(m_iMode == 1){
|
|
CWnd *pWnd = GetDlgItem(IDC_CHECK_MODIFY);
|
|
pWnd->EnableWindow(FALSE);
|
|
}
|
|
|
|
DrawStatic();
|
|
return TRUE;
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnPaint()
|
|
{
|
|
CPaintDC dc(this);
|
|
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::DrawStatic()
|
|
{
|
|
int Color[26];
|
|
//绘制图片框
|
|
UINT id[] = {
|
|
IDC_STATIC_COLOR10,
|
|
IDC_STATIC_COLOR11,
|
|
IDC_STATIC_COLOR12,
|
|
IDC_STATIC_COLOR13,
|
|
IDC_STATIC_COLOR14,
|
|
|
|
IDC_STATIC_COLOR40,
|
|
IDC_STATIC_COLOR41,
|
|
IDC_STATIC_COLOR42,
|
|
IDC_STATIC_COLOR43,
|
|
IDC_STATIC_COLOR44,
|
|
|
|
IDC_STATIC_COLOR16,
|
|
IDC_STATIC_COLOR17,
|
|
IDC_STATIC_COLOR46,
|
|
IDC_STATIC_COLOR47,
|
|
|
|
// cet 2011.11.29 add
|
|
IDC_STATIC_COLOR18,
|
|
IDC_STATIC_COLOR19,
|
|
IDC_STATIC_COLOR20,
|
|
IDC_STATIC_COLOR21,
|
|
IDC_STATIC_COLOR22,
|
|
IDC_STATIC_COLOR23,
|
|
|
|
IDC_STATIC_COLOR48,
|
|
IDC_STATIC_COLOR49,
|
|
IDC_STATIC_COLOR50,
|
|
IDC_STATIC_COLOR51,
|
|
IDC_STATIC_COLOR52,
|
|
IDC_STATIC_COLOR53,
|
|
};
|
|
|
|
|
|
Color[0] = m_iColor10;
|
|
Color[1] = m_iColor11;
|
|
Color[2] = m_iColor12;
|
|
Color[3] = m_iColor13;
|
|
Color[4] = m_iColor14;
|
|
|
|
Color[5] = m_iVColor10;
|
|
Color[6] = m_iVColor11;
|
|
Color[7] = m_iVColor12;
|
|
Color[8] = m_iVColor13;
|
|
Color[9] = m_iVColor14;
|
|
|
|
Color[10] = m_iColor16;
|
|
Color[11] = m_iColor17;
|
|
Color[12] = m_iVColor16;
|
|
Color[13] = m_iVColor17;
|
|
|
|
// cet 2011.11.29 add
|
|
Color[14] = m_iColor18;
|
|
Color[15] = m_iColor19;
|
|
Color[16] = m_iColor20;
|
|
Color[17] = m_iColor21;
|
|
Color[18] = m_iColor22;
|
|
Color[19] = m_iColor23;
|
|
|
|
Color[20] = m_iVColor18;
|
|
Color[21] = m_iVColor19;
|
|
Color[22] = m_iVColor20;
|
|
Color[23] = m_iVColor21;
|
|
Color[24] = m_iVColor22;
|
|
Color[25] = m_iVColor23;
|
|
|
|
for(int i=0;i<26;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 CPipeSettingChild2Dlg::OnStaticColor10()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor10, Adesk::kFalse, m_iColor10);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor11()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor11, Adesk::kFalse, m_iColor11);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor12()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor12, Adesk::kFalse, m_iColor12);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor13()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor13, Adesk::kFalse, m_iColor13);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor14()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor14, Adesk::kFalse, m_iColor14);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor16()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor16, Adesk::kFalse, m_iColor16);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor17()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor17, Adesk::kFalse, m_iColor17);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor18()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor18, Adesk::kFalse, m_iColor18);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor19()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor19, Adesk::kFalse, m_iColor19);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor20()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor20, Adesk::kFalse, m_iColor20);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor21()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor21, Adesk::kFalse, m_iColor21);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor22()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor22, Adesk::kFalse, m_iColor22);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor23()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iColor23, Adesk::kFalse, m_iColor23);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor40()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor10, Adesk::kFalse, m_iVColor10);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor41()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor11, Adesk::kFalse, m_iVColor11);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor42()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor12, Adesk::kFalse, m_iVColor12);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor43()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor13, Adesk::kFalse, m_iVColor13);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor44()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor14, Adesk::kFalse, m_iVColor14);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor46()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor16, Adesk::kFalse, m_iVColor16);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor47()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor17, Adesk::kFalse, m_iVColor17);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor48()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor18, Adesk::kFalse, m_iVColor18);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor49()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor19, Adesk::kFalse, m_iVColor19);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor50()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor20, Adesk::kFalse, m_iVColor20);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor51()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor21, Adesk::kFalse, m_iVColor21);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor52()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor22, Adesk::kFalse, m_iVColor22);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::OnStaticColor53()
|
|
{
|
|
UpdateData(TRUE);
|
|
acedSetColorDialog(m_iVColor23, Adesk::kFalse, m_iVColor23);
|
|
UpdateData(FALSE);
|
|
DrawStatic();
|
|
}
|
|
|
|
void CPipeSettingChild2Dlg::ResetLineCombox()
|
|
{
|
|
UpdateData(TRUE);
|
|
m_lstLineTypeName.Reset();
|
|
m_lstLineTypeComment.Reset();
|
|
m_comboLineType10.ResetContent();
|
|
m_comboLineType11.ResetContent();
|
|
m_comboLineType12.ResetContent();
|
|
m_comboLineType13.ResetContent();
|
|
m_comboLineType14.ResetContent();
|
|
m_comboLineType16.ResetContent();
|
|
m_comboLineType17.ResetContent();
|
|
// cet 2011.11.29 add
|
|
m_comboLineType18.ResetContent();
|
|
m_comboLineType19.ResetContent();
|
|
m_comboLineType20.ResetContent();
|
|
m_comboLineType21.ResetContent();
|
|
m_comboLineType22.ResetContent();
|
|
m_comboLineType23.ResetContent();
|
|
|
|
GetAllTgLineType(m_lstLineTypeName, m_lstLineTypeComment);
|
|
for(int i=0;i<m_lstLineTypeComment.Length();i++){
|
|
m_comboLineType10.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType11.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType12.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType13.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType14.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType16.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType17.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
// cet 2011.11.29 add
|
|
m_comboLineType18.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType19.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType20.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType21.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType22.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
m_comboLineType23.AddString(CString(m_lstLineTypeName[i]) + _T(" ") + m_lstLineTypeComment[i]);
|
|
}
|
|
|
|
|
|
m_iLineType10 = m_lstLineTypeName.Index(m_csLineType10);
|
|
m_iLineType11 = m_lstLineTypeName.Index(m_csLineType11);
|
|
m_iLineType12 = m_lstLineTypeName.Index(m_csLineType12);
|
|
m_iLineType13 = m_lstLineTypeName.Index(m_csLineType13);
|
|
m_iLineType14 = m_lstLineTypeName.Index(m_csLineType14);
|
|
m_iLineType16 = m_lstLineTypeName.Index(m_csLineType16);
|
|
m_iLineType17 = m_lstLineTypeName.Index(m_csLineType17);
|
|
// cet 2011.11.29 add
|
|
m_iLineType18 = m_lstLineTypeName.Index(m_csLineType18);
|
|
m_iLineType19 = m_lstLineTypeName.Index(m_csLineType19);
|
|
m_iLineType20 = m_lstLineTypeName.Index(m_csLineType20);
|
|
m_iLineType21 = m_lstLineTypeName.Index(m_csLineType21);
|
|
m_iLineType22 = m_lstLineTypeName.Index(m_csLineType22);
|
|
m_iLineType23 = m_lstLineTypeName.Index(m_csLineType23);
|
|
|
|
if(m_iLineType10 < 0) m_iLineType10 =0;
|
|
if(m_iLineType11 < 0) m_iLineType11 =0;
|
|
if(m_iLineType12 < 0) m_iLineType12 =0;
|
|
if(m_iLineType13 < 0) m_iLineType13 =0;
|
|
if(m_iLineType14 < 0) m_iLineType14 =0;
|
|
if(m_iLineType16 < 0) m_iLineType16 =0;
|
|
if(m_iLineType17 < 0) m_iLineType17 =0;
|
|
// cet 2011.11.29 add
|
|
if(m_iLineType18 < 0) m_iLineType18 =0;
|
|
if(m_iLineType19 < 0) m_iLineType19 =0;
|
|
if(m_iLineType20 < 0) m_iLineType20 =0;
|
|
if(m_iLineType21 < 0) m_iLineType21 =0;
|
|
if(m_iLineType22 < 0) m_iLineType22 =0;
|
|
if(m_iLineType23 < 0) m_iLineType23 =0;
|
|
|
|
UpdateData(FALSE);
|
|
}
|
|
// 文件中读取线型
|
|
BOOL ReadTwtLineType3()
|
|
{
|
|
XString fullFile;
|
|
int nCount = 0;
|
|
CString csLayer[] = {LAY_PIPE_FEED, LAY_PIPE_HEADFEED, LAY_PIPE_HEADBACK, LAY_PIPE_DIRT, LAY_PIPE_USELESS,
|
|
LAY_PIPE_RAIN, LAY_PIPE_USED, LAY_PIPE_FIRE, LAY_PIPE_SPRINKLE, LAY_PIPE_COAGULATE,
|
|
LAY_PIPE_DRINK, LAY_PIPE_PRESSDIRT, LAY_PIPE_PRESSUSELESS, LAY_PIPE_PRESSRAIN, LAY_PIPE_OTHER,
|
|
LAY_PIPE_USER1, LAY_PIPE_USER2, LAY_PIPE_FEED2, LAY_PIPE_FEED3, LAY_PIPE_HEADFEED2,
|
|
LAY_PIPE_HEADFEED3, LAY_PIPE_HEADBACK2, LAY_PIPE_HEADBACK3, LAY_PIPE_FIRE2, LAY_PIPE_FIRE3,
|
|
LAY_PIPE_SPRINKLE2, LAY_PIPE_SPRINKLE3, LAY_PIPE_USED2, LAY_PIPE_USED3, LAY_PIPE_USER3,
|
|
LAY_PIPE_USER4, LAY_PIPE_USER5, LAY_PIPE_USER6, LAY_PIPE_USER7, LAY_PIPE_USER8
|
|
};
|
|
|
|
if(FindFile(_T("LAYERDEF.DAT"), fullFile))
|
|
{
|
|
FILE *fp=fopen(_AS(fullFile), "r");
|
|
if(!fp)
|
|
return FALSE;
|
|
while(!feof(fp))
|
|
{
|
|
char sBuf[256]="";
|
|
TCHAR eName[256]=_T(""),sLineType[256]=_T("");
|
|
fgets(sBuf, 255, fp);
|
|
if(sBuf[0])
|
|
{
|
|
CT_strnth(TString(sBuf), 2, eName);
|
|
CT_strnth(TString(sBuf), 4, sLineType);
|
|
}
|
|
if (_tcscmp(sLineType,_T("")) == 0)
|
|
{
|
|
_tcscpy(sLineType,_T("Continuous"));
|
|
}
|
|
|
|
for (int i = 0;i < 35;++i)
|
|
{
|
|
if (_tcscmp(eName,csLayer[i]) == 0)
|
|
{
|
|
g_csTwtLineType[i] = sLineType;
|
|
nCount++;
|
|
}
|
|
}
|
|
|
|
if(nCount == 35)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
fclose(fp);
|
|
}
|
|
else
|
|
return FALSE;
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
void CPipeSettingChild2Dlg::UpdateDlgData(BOOL bIsRead)
|
|
{
|
|
UpdateData(TRUE);
|
|
CRegProperty regProp(GetRegLocation(), _T("TWTConfig"));
|
|
regProp.SetTopRootKey(HKEY_CURRENT_USER);
|
|
if(bIsRead){
|
|
m_iMaterial10 = 0;
|
|
m_iMaterial11 = 0;
|
|
m_iMaterial12 = 0;
|
|
m_iMaterial13 = 0;
|
|
m_iMaterial14 = 0;
|
|
m_iMaterial16 = 7;
|
|
m_iMaterial17 = 7;
|
|
// cet 2011.11.29 add
|
|
m_iMaterial18 = 0;
|
|
m_iMaterial19 = 0;
|
|
m_iMaterial20 = 7;
|
|
m_iMaterial21 = 0;
|
|
m_iMaterial22 = 2;
|
|
m_iMaterial23 = 7;
|
|
|
|
m_nRadius10 = 0.5;
|
|
m_nRadius11 = 0.5;
|
|
m_nRadius12 = 0.5;
|
|
m_nRadius13 = 0.5;
|
|
m_nRadius14 = 0.5;
|
|
m_nRadius16 = 0.5;
|
|
m_nRadius17 = 0.5;
|
|
// cet 2011.11.29 add
|
|
m_nRadius18 = 0.5;
|
|
m_nRadius19 = 0.5;
|
|
m_nRadius20 = 0.5;
|
|
m_nRadius21 = 0.5;
|
|
m_nRadius22 = 0.5;
|
|
m_nRadius23 = 0.5;
|
|
|
|
regProp.GetValue(_T("IsLineTypeByLayer"), m_bLineTypeByLayer);
|
|
regProp.GetValue(_T("Pipe10Width"), m_nWidth10);
|
|
regProp.GetValue(_T("Pipe11Width"), m_nWidth11);
|
|
regProp.GetValue(_T("Pipe12Width"), m_nWidth12);
|
|
regProp.GetValue(_T("Pipe13Width"), m_nWidth13);
|
|
regProp.GetValue(_T("Pipe14Width"), m_nWidth14);
|
|
regProp.GetValue(_T("Pipe16Width"), m_nWidth16);
|
|
regProp.GetValue(_T("Pipe17Width"), m_nWidth17);
|
|
// cet 2011.11.29 add
|
|
regProp.GetValue(_T("Pipe30Width"), m_nWidth18);
|
|
regProp.GetValue(_T("Pipe31Width"), m_nWidth19);
|
|
regProp.GetValue(_T("Pipe32Width"), m_nWidth20);
|
|
regProp.GetValue(_T("Pipe33Width"), m_nWidth21);
|
|
regProp.GetValue(_T("Pipe34Width"), m_nWidth22);
|
|
regProp.GetValue(_T("Pipe35Width"), m_nWidth23);
|
|
|
|
regProp.GetValue(_T("Pipe10Radius"), m_nRadius10);
|
|
regProp.GetValue(_T("Pipe11Radius"), m_nRadius11);
|
|
regProp.GetValue(_T("Pipe12Radius"), m_nRadius12);
|
|
regProp.GetValue(_T("Pipe13Radius"), m_nRadius13);
|
|
regProp.GetValue(_T("Pipe14Radius"), m_nRadius14);
|
|
regProp.GetValue(_T("Pipe16Radius"), m_nRadius16);
|
|
regProp.GetValue(_T("Pipe17Radius"), m_nRadius17);
|
|
// cet 2011.11.29 add
|
|
regProp.GetValue(_T("Pipe30Radius"), m_nRadius18);
|
|
regProp.GetValue(_T("Pipe31Radius"), m_nRadius19);
|
|
regProp.GetValue(_T("Pipe32Radius"), m_nRadius20);
|
|
regProp.GetValue(_T("Pipe33Radius"), m_nRadius21);
|
|
regProp.GetValue(_T("Pipe34Radius"), m_nRadius22);
|
|
regProp.GetValue(_T("Pipe35Radius"), m_nRadius23);
|
|
/*
|
|
regProp.GetValue(_T("Pipe1Name"), m_csPipeName1);
|
|
regProp.GetValue(_T("Pipe2Name"), m_csPipeName2);
|
|
regProp.GetValue(_T("Pipe3Name"), m_csPipeName3);
|
|
regProp.GetValue(_T("Pipe4Name"), m_csPipeName4);
|
|
regProp.GetValue(_T("Pipe5Name"), m_csPipeName5);
|
|
regProp.GetValue(_T("Pipe6Name"), m_csPipeName6);
|
|
regProp.GetValue(_T("Pipe7Name"), m_csPipeName7);
|
|
// cet 2011.11.29 add
|
|
regProp.GetValue(_T("Pipe30Name"), m_csPipeName8);
|
|
regProp.GetValue(_T("Pipe31Name"), m_csPipeName9);
|
|
regProp.GetValue(_T("Pipe32Name"), m_csPipeName10);
|
|
regProp.GetValue(_T("Pipe33Name"), m_csPipeName11);
|
|
regProp.GetValue(_T("Pipe34Name"), m_csPipeName12);
|
|
regProp.GetValue(_T("Pipe35Name"), m_csPipeName13);
|
|
*/
|
|
CString sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_COAGULATE, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName1 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_DRINK, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName2 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_PRESSDIRT, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName3 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_PRESSUSELESS, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName4 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_PRESSRAIN, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName5 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_USER1, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName6 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_USER2, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName7 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_USER3, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName8 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_USER4, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName9 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_USER5, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName10 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_USER6, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName11 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_USER7, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName12 = sTemp;
|
|
if(GetLayerReMark(LAY_PIPE_USER8, sTemp) && !sTemp.IsEmpty())
|
|
m_csPipeName13 = sTemp;
|
|
|
|
/*
|
|
regProp.GetValue(_T("PipeLineType10"), m_csLineType10);
|
|
regProp.GetValue(_T("PipeLineType11"), m_csLineType11);
|
|
regProp.GetValue(_T("PipeLineType12"), m_csLineType12);
|
|
regProp.GetValue(_T("PipeLineType13"), m_csLineType13);
|
|
regProp.GetValue(_T("PipeLineType14"), m_csLineType14);
|
|
regProp.GetValue(_T("PipeLineType16"), m_csLineType16);
|
|
regProp.GetValue(_T("PipeLineType17"), m_csLineType17);
|
|
// cet 2011.11.29 add
|
|
regProp.GetValue(_T("PipeLineType30"), m_csLineType18);
|
|
regProp.GetValue(_T("PipeLineType31"), m_csLineType19);
|
|
regProp.GetValue(_T("PipeLineType32"), m_csLineType20);
|
|
regProp.GetValue(_T("PipeLineType33"), m_csLineType21);
|
|
regProp.GetValue(_T("PipeLineType34"), m_csLineType22);
|
|
regProp.GetValue(_T("PipeLineType35"), m_csLineType23);
|
|
*/
|
|
|
|
m_csLineType10 = g_csTwtLineType[9];
|
|
m_csLineType11= g_csTwtLineType[10];
|
|
m_csLineType12= g_csTwtLineType[11];
|
|
m_csLineType13= g_csTwtLineType[12];
|
|
m_csLineType14= g_csTwtLineType[13];
|
|
m_csLineType16= g_csTwtLineType[15];
|
|
m_csLineType17= g_csTwtLineType[16];
|
|
m_csLineType18= g_csTwtLineType[29];
|
|
m_csLineType19= g_csTwtLineType[30];
|
|
m_csLineType20= g_csTwtLineType[31];
|
|
m_csLineType21= g_csTwtLineType[32];
|
|
m_csLineType22= g_csTwtLineType[33];
|
|
m_csLineType23= g_csTwtLineType[34];
|
|
|
|
regProp.GetValue(_T("Pipe10Dim"), m_csDim10);
|
|
regProp.GetValue(_T("Pipe11Dim"), m_csDim11);
|
|
regProp.GetValue(_T("Pipe12Dim"), m_csDim12);
|
|
regProp.GetValue(_T("Pipe13Dim"), m_csDim13);
|
|
regProp.GetValue(_T("Pipe14Dim"), m_csDim14);
|
|
regProp.GetValue(_T("Pipe16Dim"), m_csDim16);
|
|
regProp.GetValue(_T("Pipe17Dim"), m_csDim17);
|
|
// cet 2011.11.29 add
|
|
regProp.GetValue(_T("Pipe30Dim"), m_csDim18);
|
|
regProp.GetValue(_T("Pipe31Dim"), m_csDim19);
|
|
regProp.GetValue(_T("Pipe32Dim"), m_csDim20);
|
|
regProp.GetValue(_T("Pipe33Dim"), m_csDim21);
|
|
regProp.GetValue(_T("Pipe34Dim"), m_csDim22);
|
|
regProp.GetValue(_T("Pipe35Dim"), m_csDim23);
|
|
|
|
regProp.GetValue(_T("Pipe10Material"), m_iMaterial10);
|
|
regProp.GetValue(_T("Pipe11Material"), m_iMaterial11);
|
|
regProp.GetValue(_T("Pipe12Material"), m_iMaterial12);
|
|
regProp.GetValue(_T("Pipe13Material"), m_iMaterial13);
|
|
regProp.GetValue(_T("Pipe14Material"), m_iMaterial14);
|
|
regProp.GetValue(_T("Pipe16Material"), m_iMaterial16);
|
|
regProp.GetValue(_T("Pipe17Material"), m_iMaterial17);
|
|
// cet 2011.11.29 add
|
|
regProp.GetValue(_T("Pipe30Material"), m_iMaterial18);
|
|
regProp.GetValue(_T("Pipe31Material"), m_iMaterial19);
|
|
regProp.GetValue(_T("Pipe32Material"), m_iMaterial20);
|
|
regProp.GetValue(_T("Pipe33Material"), m_iMaterial21);
|
|
regProp.GetValue(_T("Pipe34Material"), m_iMaterial22);
|
|
regProp.GetValue(_T("Pipe35Material"), m_iMaterial23);
|
|
}
|
|
else {
|
|
regProp.SetValue(_T("Pipe10Material"), m_iMaterial10);
|
|
regProp.SetValue(_T("Pipe11Material"), m_iMaterial11);
|
|
regProp.SetValue(_T("Pipe12Material"), m_iMaterial12);
|
|
regProp.SetValue(_T("Pipe13Material"), m_iMaterial13);
|
|
regProp.SetValue(_T("Pipe14Material"), m_iMaterial14);
|
|
regProp.SetValue(_T("Pipe16Material"), m_iMaterial16);
|
|
regProp.SetValue(_T("Pipe17Material"), m_iMaterial17);
|
|
// cet 2011.11.29 add
|
|
regProp.SetValue(_T("Pipe30Material"), m_iMaterial18);
|
|
regProp.SetValue(_T("Pipe31Material"), m_iMaterial19);
|
|
regProp.SetValue(_T("Pipe32Material"), m_iMaterial20);
|
|
regProp.SetValue(_T("Pipe33Material"), m_iMaterial21);
|
|
regProp.SetValue(_T("Pipe34Material"), m_iMaterial22);
|
|
regProp.SetValue(_T("Pipe35Material"), m_iMaterial23);
|
|
|
|
regProp.SetValue(_T("Pipe10Radius"), m_nRadius10);
|
|
regProp.SetValue(_T("Pipe11Radius"), m_nRadius11);
|
|
regProp.SetValue(_T("Pipe12Radius"), m_nRadius12);
|
|
regProp.SetValue(_T("Pipe13Radius"), m_nRadius13);
|
|
regProp.SetValue(_T("Pipe14Radius"), m_nRadius14);
|
|
regProp.SetValue(_T("Pipe16Radius"), m_nRadius16);
|
|
regProp.SetValue(_T("Pipe17Radius"), m_nRadius17);
|
|
// cet 2011.11.29 add
|
|
regProp.SetValue(_T("Pipe30Radius"), m_nRadius18);
|
|
regProp.SetValue(_T("Pipe31Radius"), m_nRadius19);
|
|
regProp.SetValue(_T("Pipe32Radius"), m_nRadius20);
|
|
regProp.SetValue(_T("Pipe33Radius"), m_nRadius21);
|
|
regProp.SetValue(_T("Pipe34Radius"), m_nRadius22);
|
|
regProp.SetValue(_T("Pipe35Radius"), m_nRadius23);
|
|
|
|
regProp.SetValue(_T("Pipe10Width"), m_nWidth10);
|
|
regProp.SetValue(_T("Pipe11Width"), m_nWidth11);
|
|
regProp.SetValue(_T("Pipe12Width"), m_nWidth12);
|
|
regProp.SetValue(_T("Pipe13Width"), m_nWidth13);
|
|
regProp.SetValue(_T("Pipe14Width"), m_nWidth14);
|
|
regProp.SetValue(_T("Pipe16Width"), m_nWidth16);
|
|
regProp.SetValue(_T("Pipe17Width"), m_nWidth17);
|
|
// cet 2011.11.29 add
|
|
regProp.SetValue(_T("Pipe30Width"), m_nWidth18);
|
|
regProp.SetValue(_T("Pipe31Width"), m_nWidth19);
|
|
regProp.SetValue(_T("Pipe32Width"), m_nWidth20);
|
|
regProp.SetValue(_T("Pipe33Width"), m_nWidth21);
|
|
regProp.SetValue(_T("Pipe34Width"), m_nWidth22);
|
|
regProp.SetValue(_T("Pipe35Width"), m_nWidth23);
|
|
|
|
regProp.SetValue(_T("Pipe1Name"), m_csPipeName1);
|
|
regProp.SetValue(_T("Pipe2Name"), m_csPipeName2);
|
|
regProp.SetValue(_T("Pipe3Name"), m_csPipeName3);
|
|
regProp.SetValue(_T("Pipe4Name"), m_csPipeName4);
|
|
regProp.SetValue(_T("Pipe5Name"), m_csPipeName5);
|
|
regProp.SetValue(_T("Pipe6Name"), m_csPipeName6);
|
|
regProp.SetValue(_T("Pipe7Name"), m_csPipeName7);
|
|
// cet 2011.11.29 add
|
|
regProp.SetValue(_T("Pipe30Name"), m_csPipeName8);
|
|
regProp.SetValue(_T("Pipe31Name"), m_csPipeName9);
|
|
regProp.SetValue(_T("Pipe32Name"), m_csPipeName10);
|
|
regProp.SetValue(_T("Pipe33Name"), m_csPipeName11);
|
|
regProp.SetValue(_T("Pipe34Name"), m_csPipeName12);
|
|
regProp.SetValue(_T("Pipe35Name"), m_csPipeName13);
|
|
|
|
regProp.SetValue(_T("Pipe10Dim"), m_csDim10);
|
|
regProp.SetValue(_T("Pipe11Dim"), m_csDim11);
|
|
regProp.SetValue(_T("Pipe12Dim"), m_csDim12);
|
|
regProp.SetValue(_T("Pipe13Dim"), m_csDim13);
|
|
regProp.SetValue(_T("Pipe14Dim"), m_csDim14);
|
|
regProp.SetValue(_T("Pipe16Dim"), m_csDim16);
|
|
regProp.SetValue(_T("Pipe17Dim"), m_csDim17);
|
|
// cet 2011.11.29 add
|
|
regProp.SetValue(_T("Pipe30Dim"), m_csDim18);
|
|
regProp.SetValue(_T("Pipe31Dim"), m_csDim19);
|
|
regProp.SetValue(_T("Pipe32Dim"), m_csDim20);
|
|
regProp.SetValue(_T("Pipe33Dim"), m_csDim21);
|
|
regProp.SetValue(_T("Pipe34Dim"), m_csDim22);
|
|
regProp.SetValue(_T("Pipe35Dim"), m_csDim23);
|
|
|
|
regProp.SetValue(_T("IsLineTypeByLayer"), m_bLineTypeByLayer);
|
|
|
|
g_bLineTypeByLayer = m_bLineTypeByLayer;
|
|
g_nPipeWidth[9] = m_nWidth10;
|
|
g_nPipeWidth[10] = m_nWidth11;
|
|
g_nPipeWidth[11] = m_nWidth12;
|
|
g_nPipeWidth[12] = m_nWidth13;
|
|
g_nPipeWidth[13] = m_nWidth14;
|
|
g_nPipeWidth[15] = m_nWidth16;
|
|
g_nPipeWidth[16] = m_nWidth17;
|
|
// cet 2011.11.29 add
|
|
g_nPipeWidth[29] = m_nWidth18;
|
|
g_nPipeWidth[30] = m_nWidth19;
|
|
g_nPipeWidth[31] = m_nWidth20;
|
|
g_nPipeWidth[32] = m_nWidth21;
|
|
g_nPipeWidth[33] = m_nWidth22;
|
|
g_nPipeWidth[34] = m_nWidth23;
|
|
|
|
g_nPipeRadius[9] = m_nRadius10;
|
|
g_nPipeRadius[10] = m_nRadius11;
|
|
g_nPipeRadius[11] = m_nRadius12;
|
|
g_nPipeRadius[12] = m_nRadius13;
|
|
g_nPipeRadius[13] = m_nRadius14;
|
|
g_nPipeRadius[15] = m_nRadius16;
|
|
g_nPipeRadius[16] = m_nRadius17;
|
|
// cet 2011.11.29 add
|
|
g_nPipeRadius[29] = m_nRadius18;
|
|
g_nPipeRadius[30] = m_nRadius19;
|
|
g_nPipeRadius[31] = m_nRadius20;
|
|
g_nPipeRadius[32] = m_nRadius21;
|
|
g_nPipeRadius[33] = m_nRadius22;
|
|
g_nPipeRadius[34] = m_nRadius23;
|
|
|
|
g_iPipeMaterial[9] = m_iMaterial10;
|
|
g_iPipeMaterial[10] = m_iMaterial11;
|
|
g_iPipeMaterial[11] = m_iMaterial12;
|
|
g_iPipeMaterial[12] = m_iMaterial13;
|
|
g_iPipeMaterial[13] = m_iMaterial14;
|
|
g_iPipeMaterial[15] = m_iMaterial16;
|
|
g_iPipeMaterial[16] = m_iMaterial17;
|
|
// cet 2011.11.29 add
|
|
g_iPipeMaterial[29] = m_iMaterial18;
|
|
g_iPipeMaterial[30] = m_iMaterial19;
|
|
g_iPipeMaterial[31] = m_iMaterial20;
|
|
g_iPipeMaterial[32] = m_iMaterial21;
|
|
g_iPipeMaterial[33] = m_iMaterial22;
|
|
g_iPipeMaterial[34] = m_iMaterial23;
|
|
|
|
g_csPipeDim[9] = m_csDim10;
|
|
g_csPipeDim[10] = m_csDim11;
|
|
g_csPipeDim[11] = m_csDim12;
|
|
g_csPipeDim[12] = m_csDim13;
|
|
g_csPipeDim[13] = m_csDim14;
|
|
g_csPipeDim[15] = m_csDim16;
|
|
g_csPipeDim[16] = m_csDim17;
|
|
// cet 2011.11.29 add
|
|
g_csPipeDim[29] = m_csDim18;
|
|
g_csPipeDim[30] = m_csDim19;
|
|
g_csPipeDim[31] = m_csDim20;
|
|
g_csPipeDim[32] = m_csDim21;
|
|
g_csPipeDim[33] = m_csDim22;
|
|
g_csPipeDim[34] = m_csDim23;
|
|
/* cet 2011.11.30 del
|
|
if(g_csPipeName[0] != m_csPipeName1)
|
|
SetLayerEngName(_T("凝结水管线"), _T("PIPE-")+m_csPipeName1);
|
|
if(g_csPipeName[1] != m_csPipeName2)
|
|
SetLayerEngName(_T("直饮水管线"), _T("PIPE-")+m_csPipeName2);
|
|
if(g_csPipeName[2] != m_csPipeName3)
|
|
SetLayerEngName(_T("压力污水管线"), _T("PIPE-")+m_csPipeName3);
|
|
if(g_csPipeName[3] != m_csPipeName4)
|
|
SetLayerEngName(_T("压力废水管线"), _T("PIPE-")+m_csPipeName4);
|
|
if(g_csPipeName[4] != m_csPipeName5)
|
|
SetLayerEngName(_T("压力雨水管线"), _T("PIPE-")+m_csPipeName5);
|
|
if(g_csPipeName[5] != m_csPipeName6)
|
|
SetLayerEngName(_T("用户1管线"), _T("PIPE-")+m_csPipeName6);
|
|
if(g_csPipeName[6] != m_csPipeName7)
|
|
SetLayerEngName(_T("用户2管线"), _T("PIPE-")+m_csPipeName7);
|
|
*/
|
|
|
|
g_csPipeName[0] = m_csPipeName1;
|
|
g_csPipeName[1] = m_csPipeName2;
|
|
g_csPipeName[2] = m_csPipeName3;
|
|
g_csPipeName[3] = m_csPipeName4;
|
|
g_csPipeName[4] = m_csPipeName5;
|
|
g_csPipeName[5] = m_csPipeName6;
|
|
g_csPipeName[6] = m_csPipeName7;
|
|
|
|
AcDbDatabase *dwg=acdbCurDwg();
|
|
AcAxDocLock docLock(dwg);
|
|
VERIFY(docLock.lockStatus() == Acad::eOk);
|
|
// cet 2011.11.30 add
|
|
CString sTemp;
|
|
if(!m_csPipeName1.IsEmpty() && GetLayerReMark(LAY_PIPE_COAGULATE, sTemp) && sTemp != m_csPipeName1)
|
|
SetLayerRemark(LAY_PIPE_COAGULATE, m_csPipeName1);
|
|
if(!m_csPipeName2.IsEmpty() && GetLayerReMark(LAY_PIPE_DRINK, sTemp) && sTemp != m_csPipeName2)
|
|
SetLayerRemark(LAY_PIPE_DRINK, m_csPipeName2);
|
|
if(!m_csPipeName3.IsEmpty() && GetLayerReMark(LAY_PIPE_PRESSDIRT, sTemp) && sTemp != m_csPipeName3)
|
|
SetLayerRemark(LAY_PIPE_PRESSDIRT, m_csPipeName3);
|
|
if(!m_csPipeName4.IsEmpty() && GetLayerReMark(LAY_PIPE_PRESSUSELESS, sTemp) && sTemp != m_csPipeName4)
|
|
SetLayerRemark(LAY_PIPE_PRESSUSELESS, m_csPipeName4);
|
|
if(!m_csPipeName5.IsEmpty() && GetLayerReMark(LAY_PIPE_PRESSRAIN, sTemp) && sTemp != m_csPipeName5)
|
|
SetLayerRemark(LAY_PIPE_PRESSRAIN, m_csPipeName5);
|
|
if(!m_csPipeName6.IsEmpty() && GetLayerReMark(LAY_PIPE_USER1, sTemp) && sTemp != m_csPipeName6)
|
|
SetLayerRemark(LAY_PIPE_USER1, m_csPipeName6);
|
|
if(!m_csPipeName7.IsEmpty() && GetLayerReMark(LAY_PIPE_USER2, sTemp) && sTemp != m_csPipeName7)
|
|
SetLayerRemark(LAY_PIPE_USER2, m_csPipeName7);
|
|
if(!m_csPipeName8.IsEmpty() && GetLayerReMark(LAY_PIPE_USER3, sTemp) && sTemp != m_csPipeName8)
|
|
SetLayerRemark(LAY_PIPE_USER3, m_csPipeName8);
|
|
if(!m_csPipeName9.IsEmpty() && GetLayerReMark(LAY_PIPE_USER4, sTemp) && sTemp != m_csPipeName9)
|
|
SetLayerRemark(LAY_PIPE_USER4, m_csPipeName9);
|
|
if(!m_csPipeName10.IsEmpty() && GetLayerReMark(LAY_PIPE_USER5, sTemp) && sTemp != m_csPipeName10)
|
|
SetLayerRemark(LAY_PIPE_USER5, m_csPipeName10);
|
|
if(!m_csPipeName11.IsEmpty() && GetLayerReMark(LAY_PIPE_USER6, sTemp) && sTemp != m_csPipeName11)
|
|
SetLayerRemark(LAY_PIPE_USER6, m_csPipeName11);
|
|
if(!m_csPipeName12.IsEmpty() && GetLayerReMark(LAY_PIPE_USER7, sTemp) && sTemp != m_csPipeName12)
|
|
SetLayerRemark(LAY_PIPE_USER7, m_csPipeName12);
|
|
if(!m_csPipeName13.IsEmpty() && GetLayerReMark(LAY_PIPE_USER8, sTemp) && sTemp != m_csPipeName13)
|
|
SetLayerRemark(LAY_PIPE_USER8, m_csPipeName13);
|
|
|
|
if(m_iColor10 != GetLayerColorIdx(LAY_PIPE_COAGULATE))
|
|
SetLayerColorIdx(LAY_PIPE_COAGULATE, m_iColor10);
|
|
if(m_iColor11 != GetLayerColorIdx(LAY_PIPE_DRINK))
|
|
SetLayerColorIdx(LAY_PIPE_DRINK, m_iColor11);
|
|
if(m_iColor12 != GetLayerColorIdx(LAY_PIPE_PRESSDIRT))
|
|
SetLayerColorIdx(LAY_PIPE_PRESSDIRT, m_iColor12);
|
|
if(m_iColor13 != GetLayerColorIdx(LAY_PIPE_PRESSUSELESS))
|
|
SetLayerColorIdx(LAY_PIPE_PRESSUSELESS, m_iColor13);
|
|
if(m_iColor14 != GetLayerColorIdx(LAY_PIPE_PRESSRAIN))
|
|
SetLayerColorIdx(LAY_PIPE_PRESSRAIN, m_iColor14);
|
|
if(m_iColor16 != GetLayerColorIdx(LAY_PIPE_USER1))
|
|
SetLayerColorIdx(LAY_PIPE_USER1, m_iColor16);
|
|
if(m_iColor17 != GetLayerColorIdx(LAY_PIPE_USER2))
|
|
SetLayerColorIdx(LAY_PIPE_USER2, m_iColor17);
|
|
// cet 2011.11.29 add
|
|
if(m_iColor18 != GetLayerColorIdx(LAY_PIPE_USER3))
|
|
SetLayerColorIdx(LAY_PIPE_USER3, m_iColor18);
|
|
if(m_iColor19 != GetLayerColorIdx(LAY_PIPE_USER4))
|
|
SetLayerColorIdx(LAY_PIPE_USER4, m_iColor19);
|
|
if(m_iColor20 != GetLayerColorIdx(LAY_PIPE_USER5))
|
|
SetLayerColorIdx(LAY_PIPE_USER5, m_iColor20);
|
|
if(m_iColor21 != GetLayerColorIdx(LAY_PIPE_USER6))
|
|
SetLayerColorIdx(LAY_PIPE_USER6, m_iColor21);
|
|
if(m_iColor22 != GetLayerColorIdx(LAY_PIPE_USER7))
|
|
SetLayerColorIdx(LAY_PIPE_USER7, m_iColor22);
|
|
if(m_iColor23 != GetLayerColorIdx(LAY_PIPE_USER8))
|
|
SetLayerColorIdx(LAY_PIPE_USER8, m_iColor23);
|
|
|
|
if(m_iVColor10 != GetLayerColorIdx(LAY_VPIPE_COAGULATE))
|
|
SetLayerColorIdx(LAY_VPIPE_COAGULATE, m_iVColor10);
|
|
if(m_iVColor11 != GetLayerColorIdx(LAY_VPIPE_DRINK))
|
|
SetLayerColorIdx(LAY_VPIPE_DRINK, m_iVColor11);
|
|
if(m_iVColor12 != GetLayerColorIdx(LAY_VPIPE_PRESSDIRT))
|
|
SetLayerColorIdx(LAY_VPIPE_PRESSDIRT, m_iVColor12);
|
|
if(m_iVColor13 != GetLayerColorIdx(LAY_VPIPE_PRESSUSELESS))
|
|
SetLayerColorIdx(LAY_VPIPE_PRESSUSELESS, m_iVColor13);
|
|
if(m_iVColor14 != GetLayerColorIdx(LAY_VPIPE_PRESSRAIN))
|
|
SetLayerColorIdx(LAY_VPIPE_PRESSRAIN, m_iVColor14);
|
|
if(m_iVColor16 != GetLayerColorIdx(LAY_VPIPE_USER1))
|
|
SetLayerColorIdx(LAY_VPIPE_USER1, m_iVColor16);
|
|
if(m_iVColor17 != GetLayerColorIdx(LAY_VPIPE_USER2))
|
|
SetLayerColorIdx(LAY_VPIPE_USER2, m_iVColor17);
|
|
// cet 2011.11.29 add
|
|
if(m_iVColor18 != GetLayerColorIdx(LAY_VPIPE_USER3))
|
|
SetLayerColorIdx(LAY_VPIPE_USER3, m_iVColor18);
|
|
if(m_iVColor19 != GetLayerColorIdx(LAY_VPIPE_USER4))
|
|
SetLayerColorIdx(LAY_VPIPE_USER4, m_iVColor19);
|
|
if(m_iVColor20 != GetLayerColorIdx(LAY_VPIPE_USER5))
|
|
SetLayerColorIdx(LAY_VPIPE_USER5, m_iVColor20);
|
|
if(m_iVColor21 != GetLayerColorIdx(LAY_VPIPE_USER6))
|
|
SetLayerColorIdx(LAY_VPIPE_USER6, m_iVColor21);
|
|
if(m_iVColor22 != GetLayerColorIdx(LAY_VPIPE_USER7))
|
|
SetLayerColorIdx(LAY_VPIPE_USER7, m_iVColor22);
|
|
if(m_iVColor23 != GetLayerColorIdx(LAY_VPIPE_USER8))
|
|
SetLayerColorIdx(LAY_VPIPE_USER8, m_iVColor23);
|
|
|
|
|
|
m_csLineType10 = m_lstLineTypeName[m_iLineType10];
|
|
m_csLineType11 = m_lstLineTypeName[m_iLineType11];
|
|
m_csLineType12 = m_lstLineTypeName[m_iLineType12];
|
|
m_csLineType13 = m_lstLineTypeName[m_iLineType13];
|
|
m_csLineType14 = m_lstLineTypeName[m_iLineType14];
|
|
m_csLineType16 = m_lstLineTypeName[m_iLineType16];
|
|
m_csLineType17 = m_lstLineTypeName[m_iLineType17];
|
|
// cet 2011.11.29 add
|
|
m_csLineType18 = m_lstLineTypeName[m_iLineType18];
|
|
m_csLineType19 = m_lstLineTypeName[m_iLineType19];
|
|
m_csLineType20 = m_lstLineTypeName[m_iLineType20];
|
|
m_csLineType21 = m_lstLineTypeName[m_iLineType21];
|
|
m_csLineType22 = m_lstLineTypeName[m_iLineType22];
|
|
m_csLineType23 = m_lstLineTypeName[m_iLineType23];
|
|
|
|
g_csTwtLineType[9] = m_csLineType10;
|
|
g_csTwtLineType[10] = m_csLineType11;
|
|
g_csTwtLineType[11] = m_csLineType12;
|
|
g_csTwtLineType[12] = m_csLineType13;
|
|
g_csTwtLineType[13] = m_csLineType14;
|
|
g_csTwtLineType[15] = m_csLineType16;
|
|
g_csTwtLineType[16] = m_csLineType17;
|
|
// cet 2011.11.29 add
|
|
g_csTwtLineType[29] = m_csLineType18;
|
|
g_csTwtLineType[30] = m_csLineType19;
|
|
g_csTwtLineType[31] = m_csLineType20;
|
|
g_csTwtLineType[32] = m_csLineType21;
|
|
g_csTwtLineType[33] = m_csLineType22;
|
|
g_csTwtLineType[34] = m_csLineType23;
|
|
|
|
/* cet 2011.12.1 modify 将图层线型写入文件
|
|
regProp.SetValue(_T("PipeLineType10"), g_csTwtLineType[9]);
|
|
regProp.SetValue(_T("PipeLineType11"), g_csTwtLineType[10]);
|
|
regProp.SetValue(_T("PipeLineType12"), g_csTwtLineType[11]);
|
|
regProp.SetValue(_T("PipeLineType13"), g_csTwtLineType[12]);
|
|
regProp.SetValue(_T("PipeLineType14"), g_csTwtLineType[13]);
|
|
regProp.SetValue(_T("PipeLineType16"), g_csTwtLineType[15]);
|
|
regProp.SetValue(_T("PipeLineType17"), g_csTwtLineType[16]);
|
|
// cet 2011.11.29 add
|
|
regProp.SetValue(_T("PipeLineType30"), g_csTwtLineType[29]);
|
|
regProp.SetValue(_T("PipeLineType31"), g_csTwtLineType[30]);
|
|
regProp.SetValue(_T("PipeLineType32"), g_csTwtLineType[31]);
|
|
regProp.SetValue(_T("PipeLineType33"), g_csTwtLineType[32]);
|
|
regProp.SetValue(_T("PipeLineType34"), g_csTwtLineType[33]);
|
|
regProp.SetValue(_T("PipeLineType35"), g_csTwtLineType[34]);
|
|
*/
|
|
|
|
if (m_csLineType10 != GetDefineLayerLineType(LAY_PIPE_COAGULATE) && GetDefineLayerLineType(LAY_PIPE_COAGULATE) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_COAGULATE, m_csLineType10);
|
|
}
|
|
if (m_csLineType11 != GetDefineLayerLineType(LAY_PIPE_DRINK) && GetDefineLayerLineType(LAY_PIPE_DRINK) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_DRINK, m_csLineType11);
|
|
}
|
|
if (m_csLineType12 != GetDefineLayerLineType(LAY_PIPE_PRESSDIRT) && GetDefineLayerLineType(LAY_PIPE_PRESSDIRT) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_PRESSDIRT, m_csLineType12);
|
|
}
|
|
if (m_csLineType13 != GetDefineLayerLineType(LAY_PIPE_PRESSUSELESS) && GetDefineLayerLineType(LAY_PIPE_PRESSUSELESS) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_PRESSUSELESS, m_csLineType13);
|
|
}
|
|
if (m_csLineType14 != GetDefineLayerLineType(LAY_PIPE_PRESSRAIN) && GetDefineLayerLineType(LAY_PIPE_PRESSRAIN) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_PRESSRAIN, m_csLineType14);
|
|
}
|
|
if (m_csLineType16 != GetDefineLayerLineType(LAY_PIPE_USER1) && GetDefineLayerLineType(LAY_PIPE_USER1) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_USER1, m_csLineType16);
|
|
}
|
|
if (m_csLineType17 != GetDefineLayerLineType(LAY_PIPE_USER2) && GetDefineLayerLineType(LAY_PIPE_USER2) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_USER2, m_csLineType17);
|
|
}
|
|
if (m_csLineType18 != GetDefineLayerLineType(LAY_PIPE_USER3) && GetDefineLayerLineType(LAY_PIPE_USER3) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_USER3, m_csLineType18);
|
|
}
|
|
if (m_csLineType19 != GetDefineLayerLineType(LAY_PIPE_USER4) && GetDefineLayerLineType(LAY_PIPE_USER4) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_USER4, m_csLineType19);
|
|
}
|
|
if (m_csLineType20 != GetDefineLayerLineType(LAY_PIPE_USER5) && GetDefineLayerLineType(LAY_PIPE_USER5) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_USER5, m_csLineType20);
|
|
}
|
|
if (m_csLineType21 != GetDefineLayerLineType(LAY_PIPE_USER6) && GetDefineLayerLineType(LAY_PIPE_USER6) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_USER6, m_csLineType21);
|
|
}
|
|
if (m_csLineType22 != GetDefineLayerLineType(LAY_PIPE_USER7) && GetDefineLayerLineType(LAY_PIPE_USER7) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_USER7, m_csLineType22);
|
|
}
|
|
if (m_csLineType23 != GetDefineLayerLineType(LAY_PIPE_USER8) && GetDefineLayerLineType(LAY_PIPE_USER8) != _T(""))
|
|
{
|
|
SetDefineLayerLineType(LAY_PIPE_USER8, m_csLineType23);
|
|
}
|
|
|
|
if(m_csLineType10 != GetLayerLineType(LAY_PIPE_COAGULATE) && GetLayerLineType(LAY_PIPE_COAGULATE) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_COAGULATE, m_csLineType10);
|
|
if(m_csLineType11 != GetLayerLineType(LAY_PIPE_DRINK) && GetLayerLineType(LAY_PIPE_DRINK) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_DRINK, m_csLineType11);
|
|
if(m_csLineType12 != GetLayerLineType(LAY_PIPE_PRESSDIRT) && GetLayerLineType(LAY_PIPE_PRESSDIRT) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_PRESSDIRT, m_csLineType12);
|
|
if(m_csLineType13 != GetLayerLineType(LAY_PIPE_PRESSUSELESS) && GetLayerLineType(LAY_PIPE_PRESSUSELESS) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_PRESSUSELESS, m_csLineType13);
|
|
if(m_csLineType14 != GetLayerLineType(LAY_PIPE_PRESSRAIN) && GetLayerLineType(LAY_PIPE_PRESSRAIN) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_PRESSRAIN, m_csLineType14);
|
|
if(m_csLineType16 != GetLayerLineType(LAY_PIPE_USER1) && GetLayerLineType(LAY_PIPE_USER1) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_USER1, m_csLineType16);
|
|
if(m_csLineType17 != GetLayerLineType(LAY_PIPE_USER2) && GetLayerLineType(LAY_PIPE_USER2) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_USER2, m_csLineType17);
|
|
// cet 2011.11.29 add
|
|
if(m_csLineType18 != GetLayerLineType(LAY_PIPE_USER3) && GetLayerLineType(LAY_PIPE_USER3) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_USER3, m_csLineType18);
|
|
if(m_csLineType19 != GetLayerLineType(LAY_PIPE_USER4) && GetLayerLineType(LAY_PIPE_USER4) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_USER4, m_csLineType19);
|
|
if(m_csLineType20 != GetLayerLineType(LAY_PIPE_USER5) && GetLayerLineType(LAY_PIPE_USER5) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_USER5, m_csLineType20);
|
|
if(m_csLineType21 != GetLayerLineType(LAY_PIPE_USER6) && GetLayerLineType(LAY_PIPE_USER6) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_USER6, m_csLineType21);
|
|
if(m_csLineType22 != GetLayerLineType(LAY_PIPE_USER7) && GetLayerLineType(LAY_PIPE_USER7) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_USER7, m_csLineType22);
|
|
if(m_csLineType23 != GetLayerLineType(LAY_PIPE_USER8) && GetLayerLineType(LAY_PIPE_USER8) != _T(""))
|
|
SetLayerLineType(LAY_PIPE_USER8, m_csLineType23);
|
|
|
|
|
|
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::kCoagulate)
|
|
{
|
|
if(pPipe->IsVertical())
|
|
{
|
|
pPipe->SetRadius(m_nRadius10);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType10);
|
|
pPipe->SetPipeWeight(m_nWidth10);
|
|
pPipe->SetMaterial(m_iMaterial10);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kDrink){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius11);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType11);
|
|
pPipe->SetPipeWeight(m_nWidth11);
|
|
pPipe->SetMaterial(m_iMaterial11);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kPressDirt){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius12);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType12);
|
|
pPipe->SetPipeWeight(m_nWidth12);
|
|
pPipe->SetMaterial(m_iMaterial12);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kPressUseless){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius13);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType13);
|
|
pPipe->SetPipeWeight(m_nWidth13);
|
|
pPipe->SetMaterial(m_iMaterial13);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kPressRain){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius14);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType14);
|
|
pPipe->SetPipeWeight(m_nWidth14);
|
|
pPipe->SetMaterial(m_iMaterial14);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kCivilFeed){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius16);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType16);
|
|
pPipe->SetPipeWeight(m_nWidth16);
|
|
pPipe->SetMaterial(m_iMaterial16);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kCycleFeed){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius17);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType17);
|
|
pPipe->SetPipeWeight(m_nWidth17);
|
|
pPipe->SetMaterial(m_iMaterial17);
|
|
}
|
|
// cet 2011.11.29 add
|
|
else if(pPipe->GetSysType() == TPipeSys::kUser3){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius18);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType18);
|
|
pPipe->SetPipeWeight(m_nWidth18);
|
|
pPipe->SetMaterial(m_iMaterial18);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kUser4){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius19);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType19);
|
|
pPipe->SetPipeWeight(m_nWidth19);
|
|
pPipe->SetMaterial(m_iMaterial19);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kUser5){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius20);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType20);
|
|
pPipe->SetPipeWeight(m_nWidth20);
|
|
pPipe->SetMaterial(m_iMaterial20);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kUser6){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius21);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType21);
|
|
pPipe->SetPipeWeight(m_nWidth21);
|
|
pPipe->SetMaterial(m_iMaterial21);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kUser7){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius22);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType22);
|
|
pPipe->SetPipeWeight(m_nWidth22);
|
|
pPipe->SetMaterial(m_iMaterial22);
|
|
}
|
|
else if(pPipe->GetSysType() == TPipeSys::kUser8){
|
|
if(pPipe->IsVertical()){
|
|
pPipe->SetRadius(m_nRadius23);
|
|
bChangleRadius = TRUE;
|
|
}
|
|
else
|
|
pPipe->setLinetype(m_csLineType23);
|
|
pPipe->SetPipeWeight(m_nWidth23);
|
|
pPipe->SetMaterial(m_iMaterial23);
|
|
}
|
|
}
|
|
OPENOBJ_END();
|
|
}
|
|
if(bChangleRadius){
|
|
TPipePerDocData *pData = GetCurPipeDocData();
|
|
pData->ApplyUpdates();
|
|
}
|
|
|
|
}
|
|
}
|
|
UpdateData(FALSE);
|
|
}
|
|
|