private void method_6() { int count = this.arrayList_3.Count; GPoint gPoint = new GPoint(); double num = 0.0; for (int i = 0; i < count; i++) { PipeLine pipeLine = (PipeLine)this.arrayList_3[i]; int num2 = pipeLine.Size(); for (int j = 0; j < num2; j++) { GPoint gPoint2 = pipeLine[j]; double num3; if (j < num2 - 1) { GPoint deepCopy = pipeLine[j + 1].GetDeepCopy(); num3 = gPoint2.DistanceToPt(deepCopy); } else { num3 = 0.0; } if (i == 0) { if (j != 0) { gPoint2.X = gPoint.X + num; } } else if (j == 0) { gPoint2.X = gPoint.X; } else { gPoint2.X = gPoint.X + num; } num = num3; gPoint = gPoint2.GetDeepCopy(); } this.method_3(this.arrayList_4, this.arrayList_3); } for (int k = 0; k < count; k++) { PipeLine pipeLine2 = (PipeLine)this.arrayList_1[k]; int num4 = pipeLine2.Size(); for (int l = 0; l < num4; l++) { } } for (int m = 0; m < count; m++) { PipeLine pipeLine3 = (PipeLine)this.arrayList_3[m]; int num5 = pipeLine3.Size(); for (int n = 0; n < num5; n++) { } } }
private void method_3(ArrayList arrayList, ArrayList arrayList2) { int count = arrayList2.Count; int num = 0; for (int i = 0; i < count; i++) { PipeLine pipeLine = (PipeLine)arrayList2[i]; int num2 = pipeLine.Size(); if (i == 0) { PipePoint pipePoint = (PipePoint)arrayList[num]; pipePoint.x = pipeLine[i].X; pipePoint.y = pipeLine[i].Y; pipePoint.z = pipeLine[i].Z; pipePoint.m = pipeLine[i].M; pipePoint.strPipeWidthHeight = pipeLine.PipeWidthHeight; num++; } PipePoint pipePoint2 = (PipePoint)arrayList[num]; pipePoint2.x = pipeLine[num2 - 1].X; pipePoint2.y = pipeLine[num2 - 1].Y; pipePoint2.z = pipeLine[num2 - 1].Z; pipePoint2.m = pipeLine[num2 - 1].M; pipePoint2.strPipeWidthHeight = pipeLine.PipeWidthHeight; num++; } }
private void method_7(ArrayList arrayList) { int count = arrayList.Count; for (int i = 0; i < count; i++) { PipeLine pipeLine = (PipeLine)arrayList[i]; int num = pipeLine.Size(); for (int j = 0; j < num; j++) { GPoint gPoint = pipeLine[j]; if (i == 0 && j == 0) { this.m_dMinX = (this.m_dMaxX = gPoint.X); this.m_dMinY = Math.Min(gPoint.Z, gPoint.M); this.m_dMaxY = Math.Max(gPoint.Z, gPoint.M); } else { this.m_dMinX = Math.Min(this.m_dMinX, gPoint.X); this.m_dMaxX = Math.Max(this.m_dMaxX, gPoint.X); this.m_dMinY = Math.Min(this.m_dMinY, Math.Min(gPoint.Z, gPoint.M)); this.m_dMaxY = Math.Max(this.m_dMaxY, Math.Max(gPoint.Z, gPoint.M)); } } } this.m_pSectionDisp.SetDataBound(this.m_dMinX, this.m_dMaxX, this.m_dMinY, this.m_dMaxY); for (int k = 0; k < count; k++) { PipeLine pipeLine2 = (PipeLine)this.arrayList_3[k]; int num2 = pipeLine2.Size(); for (int l = 0; l < num2; l++) { } } int count2 = this.arrayList_4.Count; for (int m = 0; m < count2; m++) { } }
public override void SaveSectionFile(string strFileName) { int count = this.arrayList_1.Count; XmlTextWriter xmlTextWriter = new XmlTextWriter(strFileName, null); xmlTextWriter.Formatting = Formatting.Indented; xmlTextWriter.WriteComment("SectionSaveFile"); xmlTextWriter.WriteStartElement("VerSectionAnalyse"); xmlTextWriter.WriteAttributeString("SectionType", "VerSectionType"); string title = this.m_pSectionDisp.Title; string roadName = this.m_pSectionDisp.RoadName; string sectionNo = this.m_pSectionDisp.SectionNo; xmlTextWriter.WriteAttributeString("Title", title); xmlTextWriter.WriteAttributeString("RoadName", roadName); xmlTextWriter.WriteAttributeString("SectionNo", sectionNo); xmlTextWriter.WriteStartElement("PipeLines"); xmlTextWriter.WriteAttributeString("PipeLineCount", count.ToString()); for (int i = 0; i < count; i++) { PipeLine pipeLine = (PipeLine)this.arrayList_1[i]; int num = pipeLine.Size(); xmlTextWriter.WriteStartElement("PipeLine"); xmlTextWriter.WriteAttributeString("DatasetName", pipeLine.DatasetName); xmlTextWriter.WriteAttributeString("ID", pipeLine.ID.ToString()); xmlTextWriter.WriteAttributeString("Material", pipeLine.Material); xmlTextWriter.WriteAttributeString("PipeWidthAndHeight", pipeLine.PipeWidthHeight); xmlTextWriter.WriteAttributeString("PointCount", pipeLine.Size().ToString()); xmlTextWriter.WriteAttributeString("Red", pipeLine.Red.ToString()); xmlTextWriter.WriteAttributeString("Green", pipeLine.Green.ToString()); xmlTextWriter.WriteAttributeString("Blue", pipeLine.Blue.ToString()); for (int j = 0; j < num; j++) { GPoint gPoint = pipeLine[j]; xmlTextWriter.WriteStartElement("Point"); xmlTextWriter.WriteAttributeString("X", gPoint.X.ToString("f3")); xmlTextWriter.WriteAttributeString("Y", gPoint.Y.ToString("f3")); xmlTextWriter.WriteAttributeString("Z", gPoint.Z.ToString("f3")); xmlTextWriter.WriteAttributeString("M", gPoint.M.ToString("f3")); xmlTextWriter.WriteEndElement(); } xmlTextWriter.WriteEndElement(); } xmlTextWriter.WriteEndElement(); int count2 = this.arrayList_2.Count; xmlTextWriter.WriteStartElement("PipePoints"); xmlTextWriter.WriteAttributeString("PipePointCount", count2.ToString()); for (int k = 0; k < count2; k++) { PipePoint pipePoint = (PipePoint)this.arrayList_2[k]; xmlTextWriter.WriteStartElement("PipePoint"); xmlTextWriter.WriteAttributeString("X", pipePoint.x.ToString("f3")); xmlTextWriter.WriteAttributeString("Y", pipePoint.y.ToString("f3")); xmlTextWriter.WriteAttributeString("Z", pipePoint.z.ToString("f3")); xmlTextWriter.WriteAttributeString("M", pipePoint.m.ToString("f3")); xmlTextWriter.WriteAttributeString("DatasetName", pipePoint.bstrDatasetName); xmlTextWriter.WriteAttributeString("ID", pipePoint.nID.ToString()); xmlTextWriter.WriteAttributeString("PipePointKind", pipePoint.bstrPointKind); xmlTextWriter.WriteAttributeString("Red", pipePoint.Red.ToString()); xmlTextWriter.WriteAttributeString("Green", pipePoint.Green.ToString()); xmlTextWriter.WriteAttributeString("Blue", pipePoint.Blue.ToString()); xmlTextWriter.WriteEndElement(); } xmlTextWriter.WriteEndElement(); xmlTextWriter.WriteEndElement(); xmlTextWriter.Flush(); xmlTextWriter.Close(); }
public override void SectionInfo(out ArrayList pArrInfo) { pArrInfo = new ArrayList(); int count = this.arrayList_1.Count; if (this.m_nSelectIndex != -1) { if (this.m_nSelectIndex < count) { PipeLine pipeLine = (PipeLine)this.arrayList_1[this.m_nSelectIndex]; SectionInfoStore sectionInfoStore; sectionInfoStore.strField = "数据集名称"; sectionInfoStore.strVal = pipeLine.DatasetName; pArrInfo.Add(sectionInfoStore); SectionInfoStore sectionInfoStore2; sectionInfoStore2.strField = "ID"; sectionInfoStore2.strVal = pipeLine.ID.ToString(); pArrInfo.Add(sectionInfoStore2); SectionInfoStore sectionInfoStore3; sectionInfoStore3.strField = "材质"; sectionInfoStore3.strVal = pipeLine.Material; pArrInfo.Add(sectionInfoStore3); SectionInfoStore sectionInfoStore4; sectionInfoStore4.strField = "规格"; sectionInfoStore4.strVal = pipeLine.PipeWidthHeight; pArrInfo.Add(sectionInfoStore4); SectionInfoStore sectionInfoStore5; sectionInfoStore5.strField = "管点数"; sectionInfoStore5.strVal = pipeLine.Size().ToString(); pArrInfo.Add(sectionInfoStore5); SectionInfoStore sectionInfoStore6; sectionInfoStore6.strField = "管线长度"; sectionInfoStore6.strVal = pipeLine.Length.ToString(); pArrInfo.Add(sectionInfoStore6); } else { PipePoint pipePoint = (PipePoint)this.arrayList_2[this.m_nSelectIndex - count]; SectionInfoStore sectionInfoStore7; sectionInfoStore7.strField = "数据集名称"; sectionInfoStore7.strVal = pipePoint.bstrDatasetName; pArrInfo.Add(sectionInfoStore7); SectionInfoStore sectionInfoStore8; sectionInfoStore8.strField = "ID"; sectionInfoStore8.strVal = pipePoint.nID.ToString(); pArrInfo.Add(sectionInfoStore8); SectionInfoStore sectionInfoStore9; sectionInfoStore9.strField = "点性"; sectionInfoStore9.strVal = pipePoint.bstrPointKind; pArrInfo.Add(sectionInfoStore9); SectionInfoStore sectionInfoStore10; sectionInfoStore10.strField = "横坐标"; sectionInfoStore10.strVal = pipePoint.x.ToString("f3"); pArrInfo.Add(sectionInfoStore10); SectionInfoStore sectionInfoStore11; sectionInfoStore11.strField = "纵坐标"; sectionInfoStore11.strVal = pipePoint.y.ToString("f3"); pArrInfo.Add(sectionInfoStore11); SectionInfoStore sectionInfoStore12; sectionInfoStore12.strField = "地面高程"; sectionInfoStore12.strVal = pipePoint.m.ToString("f3"); pArrInfo.Add(sectionInfoStore12); } } }