/// <summary> /// Create edit markers for polygon. /// </summary> /// <param name="obj">Editing object.</param> /// <param name="polyCurve">Polygon geometry</param> private void _FillGeometryEditMarkers(object obj, ESRI.ArcLogistics.Geometry.PolyCurve polyCurve) { for (int pointIndex = 0; pointIndex < polyCurve.TotalPointCount; pointIndex++) { _AddMarker(pointIndex, obj); } }
/// <summary> /// Create position for editing marker for edit zone or barrier. /// </summary> /// <param name="obj">Edited object.</param> /// <returns>Position for editing marker for edit zone or barrier.</returns> private ESRI.ArcLogistics.Geometry.Point?_CreatePointForMultiPointObject(object obj) { ESRI.ArcLogistics.Geometry.Point?point = null; object editObj = _editingMarker.EditingObject; object geometry = (editObj is Zone) ? (editObj as Zone).Geometry : (editObj as Barrier).Geometry; if (null != geometry) { if (geometry is ESRI.ArcLogistics.Geometry.Point) { ESRI.ArcLogistics.Geometry.Point?pt = geometry as ESRI.ArcLogistics.Geometry.Point?; point = new ESRI.ArcLogistics.Geometry.Point(pt.Value.X, pt.Value.Y); } else if (geometry is ESRI.ArcLogistics.Geometry.PolyCurve) { System.Diagnostics.Debug.Assert(geometry is ESRI.ArcLogistics.Geometry.Polygon || geometry is ESRI.ArcLogistics.Geometry.Polyline); int index = _editingMarker.MultipleIndex; if (index == -1) { index = 0; } ESRI.ArcLogistics.Geometry.PolyCurve polyCurve = geometry as ESRI.ArcLogistics.Geometry.PolyCurve; ESRI.ArcLogistics.Geometry.Point polyCurvePoint = polyCurve.GetPoint(index); point = new ESRI.ArcLogistics.Geometry.Point(polyCurvePoint.X, polyCurvePoint.Y); } else { Debug.Assert(false); } } else { point = null; } return(point); }