private void method_1(IEdgeFeature iedgeFeature_0) { int edgeFeatureCount; int i; IEdgeFeature edgeFeature; IPoint shape; ILineMovePointFeedback lineMovePointFeedbackClass; IHitTest hitTest; IPoint pointClass; double num; int num1; int num2; bool flag; int pointCount; int j; IPath geometry; if (!(iedgeFeature_0 is IComplexEdgeFeature)) { int oID = (iedgeFeature_0 as IFeature).OID; IGeometry shapeCopy = (iedgeFeature_0 as IFeature).ShapeCopy; if (this.imoveGeometryFeedback_0 == null) { this.imoveGeometryFeedback_0 = new MoveGeometryFeedback() { Display = this.iscreenDisplay_0 }; } this.imoveGeometryFeedback_0.AddGeometry(shapeCopy); int fromJunctionEID = iedgeFeature_0.FromJunctionEID; IJunctionFeature fromJunctionFeature = iedgeFeature_0.FromJunctionFeature; if (fromJunctionFeature is ISimpleJunctionFeature) { edgeFeatureCount = (fromJunctionFeature as ISimpleJunctionFeature).EdgeFeatureCount; for (i = 0; i < edgeFeatureCount; i++) { edgeFeature = (fromJunctionFeature as ISimpleJunctionFeature).EdgeFeature[i]; if ((edgeFeature as IFeature).OID != oID && !this.iset_0.Find(edgeFeature) && !this.iset_1.Find(edgeFeature)) { this.iset_1.Add(edgeFeature); shapeCopy = (edgeFeature as IFeature).Shape; if (!(edgeFeature is ISimpleEdgeFeature)) { shape = (fromJunctionFeature as IFeature).Shape as IPoint; hitTest = shapeCopy as IHitTest; pointClass = new ESRI.ArcGIS.Geometry.Point(); num = 0; num1 = -1; num2 = -1; flag = false; if (hitTest.HitTest(shape, 0, esriGeometryHitPartType.esriGeometryPartVertex, pointClass, ref num, ref num1, ref num2, ref flag)) { lineMovePointFeedbackClass = new LineMovePointFeedback() { Display = this.iscreenDisplay_0 }; pointCount = 0; for (j = 0; j < num1; j++) { geometry = (IPath)((IGeometryCollection)hitTest).Geometry[j]; pointCount = pointCount + (geometry as IPointCollection).PointCount; } num2 = num2 + pointCount; lineMovePointFeedbackClass.Start(hitTest as IPolyline, num2, shape); this.ilist_0.Add(lineMovePointFeedbackClass); this.ilist_1.Add(shape); } } else { shape = null; lineMovePointFeedbackClass = new LineMovePointFeedback() { Display = this.iscreenDisplay_0 }; if (edgeFeature.FromJunctionEID != fromJunctionEID) { shape = (shapeCopy as IPointCollection).Point[ (shapeCopy as IPointCollection).PointCount - 1]; lineMovePointFeedbackClass.Start(shapeCopy as IPolyline, (shapeCopy as IPointCollection).PointCount - 1, shape); } else { shape = (shapeCopy as IPointCollection).Point[0]; lineMovePointFeedbackClass.Start(shapeCopy as IPolyline, 0, shape); } this.ilist_0.Add(lineMovePointFeedbackClass); this.ilist_1.Add(shape); } } } } fromJunctionEID = iedgeFeature_0.ToJunctionEID; IJunctionFeature toJunctionFeature = iedgeFeature_0.ToJunctionFeature; if (toJunctionFeature is ISimpleJunctionFeature) { edgeFeatureCount = (toJunctionFeature as ISimpleJunctionFeature).EdgeFeatureCount; for (i = 0; i < edgeFeatureCount; i++) { edgeFeature = (toJunctionFeature as ISimpleJunctionFeature).EdgeFeature[i]; if ((edgeFeature as IFeature).OID != oID && !this.iset_0.Find(edgeFeature) && !this.iset_1.Find(edgeFeature)) { this.iset_1.Add(edgeFeature); shape = null; lineMovePointFeedbackClass = new LineMovePointFeedback() { Display = this.iscreenDisplay_0 }; shapeCopy = (edgeFeature as IFeature).Shape; if (!(edgeFeature is ISimpleEdgeFeature)) { IPoint point = (toJunctionFeature as IFeature).Shape as IPoint; hitTest = shapeCopy as IHitTest; pointClass = new ESRI.ArcGIS.Geometry.Point(); num = 0; num1 = -1; num2 = -1; flag = false; if (hitTest.HitTest(point, 0, esriGeometryHitPartType.esriGeometryPartVertex, pointClass, ref num, ref num1, ref num2, ref flag)) { lineMovePointFeedbackClass = new LineMovePointFeedback() { Display = this.iscreenDisplay_0 }; pointCount = 0; for (j = 0; j < num1; j++) { geometry = (IPath)((IGeometryCollection)hitTest).Geometry[j]; pointCount = pointCount + (geometry as IPointCollection).PointCount; } num2 = num2 + pointCount; lineMovePointFeedbackClass.Start(hitTest as IPolyline, num2, point); this.ilist_0.Add(lineMovePointFeedbackClass); this.ilist_1.Add(point); } } else { if (edgeFeature.FromJunctionEID != fromJunctionEID) { shape = (shapeCopy as IPointCollection).Point[ (shapeCopy as IPointCollection).PointCount - 1]; lineMovePointFeedbackClass.Start(shapeCopy as IPolyline, (shapeCopy as IPointCollection).PointCount - 1, shape); } else { shape = (shapeCopy as IPointCollection).Point[0]; lineMovePointFeedbackClass.Start(shapeCopy as IPolyline, 0, shape); } this.ilist_0.Add(lineMovePointFeedbackClass); this.ilist_1.Add(shape); } } } } } else { this.method_2(iedgeFeature_0 as IComplexEdgeFeature); } }
private void method_2(IComplexEdgeFeature icomplexEdgeFeature_0) { ILineMovePointFeedback lineMovePointFeedbackClass; int oID = (icomplexEdgeFeature_0 as IFeature).OID; IGeometry shapeCopy = (icomplexEdgeFeature_0 as IFeature).ShapeCopy; if (this.imoveGeometryFeedback_0 == null) { this.imoveGeometryFeedback_0 = new MoveGeometryFeedback() { Display = this.iscreenDisplay_0 }; } this.imoveGeometryFeedback_0.AddGeometry(shapeCopy); for (int i = 0; i < icomplexEdgeFeature_0.JunctionFeatureCount; i++) { IJunctionFeature junctionFeature = icomplexEdgeFeature_0.JunctionFeature[i]; if (junctionFeature is ISimpleJunctionFeature) { int eID = (junctionFeature as ISimpleJunctionFeature).EID; IPoint point = (junctionFeature as IFeature).ShapeCopy as IPoint; int edgeFeatureCount = (junctionFeature as ISimpleJunctionFeature).EdgeFeatureCount; for (int j = 0; j < edgeFeatureCount; j++) { IEdgeFeature edgeFeature = (junctionFeature as ISimpleJunctionFeature).EdgeFeature[j]; if ((edgeFeature as IFeature).OID != oID && !this.iset_0.Find(edgeFeature) && !this.iset_1.Find(edgeFeature)) { this.iset_1.Add(edgeFeature); shapeCopy = (edgeFeature as IFeature).Shape; IPoint point1 = null; if (!(edgeFeature is ISimpleEdgeFeature)) { IHitTest shape = (edgeFeature as IFeature).Shape as IHitTest; IPoint pointClass = new ESRI.ArcGIS.Geometry.Point(); double num = 0; int num1 = -1; int num2 = -1; bool flag = false; if (shape.HitTest(point, 0, esriGeometryHitPartType.esriGeometryPartVertex, pointClass, ref num, ref num1, ref num2, ref flag)) { lineMovePointFeedbackClass = new LineMovePointFeedback() { Display = this.iscreenDisplay_0 }; int pointCount = 0; for (int k = 0; k < num1; k++) { IPath geometry = (IPath)((IGeometryCollection)shape).Geometry[k]; pointCount = pointCount + (geometry as IPointCollection).PointCount; } num2 = num2 + pointCount; lineMovePointFeedbackClass.Start(shape as IPolyline, num2, point); this.ilist_0.Add(lineMovePointFeedbackClass); this.ilist_1.Add(point); } } else { lineMovePointFeedbackClass = new LineMovePointFeedback() { Display = this.iscreenDisplay_0 }; if (edgeFeature.FromJunctionEID != eID) { point1 = (shapeCopy as IPointCollection).Point[ (shapeCopy as IPointCollection).PointCount - 1]; lineMovePointFeedbackClass.Start(shapeCopy as IPolyline, (shapeCopy as IPointCollection).PointCount - 1, point1); } else { point1 = (shapeCopy as IPointCollection).Point[0]; lineMovePointFeedbackClass.Start(shapeCopy as IPolyline, 0, point1); } this.ilist_0.Add(lineMovePointFeedbackClass); this.ilist_1.Add(point1); } } } } } }