private void method_2(IPolyline ipolyline_1) { esriGeometryType shapeType = Yutai.ArcGIS.Common.Editor.Editor.CurrentEditTemplate.FeatureLayer.FeatureClass.ShapeType; if (SketchToolAssist.Feedback == null) { if (shapeType == esriGeometryType.esriGeometryPolyline) { SketchToolAssist.Feedback = new NewPolylineFeedback(); SketchToolAssist.Feedback.Display = (_context.FocusMap as IActiveView).ScreenDisplay; SketchShareEx.m_bInUse = true; } else if (shapeType == esriGeometryType.esriGeometryPolygon) { SketchToolAssist.Feedback = new NewPolygonFeedbackEx(); SketchToolAssist.Feedback.Display = (_context.FocusMap as IActiveView).ScreenDisplay; SketchShareEx.m_bInUse = true; } } if (SketchToolAssist.Feedback is INewPolygonFeedbackEx) { (SketchToolAssist.Feedback as INewPolygonFeedbackEx).AddPart(ipolyline_1); SketchShareEx.PointCount += (ipolyline_1 as IPointCollection).PointCount; } else if (SketchToolAssist.Feedback is INewPolylineFeedback) { (SketchToolAssist.Feedback as INewPolylineFeedback).AddPart(ipolyline_1); SketchShareEx.PointCount += (ipolyline_1 as IPointCollection).PointCount; } ISegmentCollection segmentCollection = null; this.bool_3 = true; if (this.isegmentCollection_0 == null) { if (shapeType == esriGeometryType.esriGeometryPolyline) { this.isegmentCollection_0 = new Polyline() as ISegmentCollection; } else if (shapeType == esriGeometryType.esriGeometryPolygon) { this.isegmentCollection_0 = new Polygon() as ISegmentCollection; } } if (shapeType == esriGeometryType.esriGeometryPolyline) { segmentCollection = new Path() as ISegmentCollection; } else if (shapeType == esriGeometryType.esriGeometryPolygon) { segmentCollection = new Ring() as ISegmentCollection; } IGeometryCollection geometryCollection = this.isegmentCollection_0 as IGeometryCollection; IGeometry geometry = segmentCollection as IGeometry; geometryCollection.InsertGeometries(-1, 1, ref geometry); if (shapeType == esriGeometryType.esriGeometryPolygon) { IPolygon polygon = this.isegmentCollection_0 as IPolygon; polygon.Close(); } this.bool_3 = false; }