private void OnGeoObjectDidChange(IGeoObject Sender, GeoObjectChange Change) { centerProperty.GeoPointChanged(); majorRadiusProperty.LengthChanged(); majorRadiusHotSpot[0].Position = ellipse.Center + 2.0 / 3.0 * ellipse.MajorAxis; majorRadiusHotSpot[1].Position = ellipse.Center - 2.0 / 3.0 * ellipse.MajorAxis; minorRadiusProperty.LengthChanged(); minorRadiusHotSpot[0].Position = ellipse.Center + 2.0 / 3.0 * ellipse.MinorAxis; minorRadiusHotSpot[1].Position = ellipse.Center - 2.0 / 3.0 * ellipse.MinorAxis; majorAxisProperty.GeoVectorChanged(); majorAxisHotSpot[0].Position = ellipse.Center + ellipse.MajorAxis; majorAxisHotSpot[1].Position = ellipse.Center - ellipse.MajorAxis; minorAxisProperty.GeoVectorChanged(); minorAxisHotSpot[0].Position = ellipse.Center + ellipse.MinorAxis; minorAxisHotSpot[1].Position = ellipse.Center - ellipse.MinorAxis; if (startAngleProperty != null) { startAngleProperty.AngleChanged(); startAngleHotSpot.Position = ellipse.StartPoint; startPointProperty.Refresh(); if (endAngleProperty != null) { endAngleProperty.AngleChanged(); endAngleHotSpot.Position = ellipse.EndPoint; endPointProperty.Refresh(); } } if (directionProperty != null) { directionProperty.Refresh(); } }
private void OnGeoObjectDidChange(IGeoObject Sender, GeoObjectChange Change) { centerProperty.GeoPointChanged(); radiusProperty.LengthChanged(); diameterProperty.LengthChanged(); if (radiusHotSpots != null) { radiusHotSpots[0].Position = circle.Center + circle.MajorAxis; radiusHotSpots[1].Position = circle.Center - circle.MajorAxis; radiusHotSpots[2].Position = circle.Center + circle.MinorAxis; radiusHotSpots[3].Position = circle.Center - circle.MinorAxis; if (HotspotChangedEvent != null) { HotspotChangedEvent(radiusHotSpots[0], HotspotChangeMode.Moved); HotspotChangedEvent(radiusHotSpots[1], HotspotChangeMode.Moved); HotspotChangedEvent(radiusHotSpots[2], HotspotChangeMode.Moved); HotspotChangedEvent(radiusHotSpots[3], HotspotChangeMode.Moved); } } if (startAngleProperty != null) { startAngleProperty.AngleChanged(); if (endAngleProperty != null) { endAngleProperty.AngleChanged(); } startPointProperty.Refresh(); if (endAngleProperty != null) { endPointProperty.Refresh(); } startAngleHotSpot.Position = circle.StartPoint; if (endAngleProperty != null) { endAngleHotSpot.Position = circle.EndPoint; } if (HotspotChangedEvent != null) { HotspotChangedEvent(startAngleHotSpot, HotspotChangeMode.Moved); if (endAngleProperty != null) { HotspotChangedEvent(endAngleHotSpot, HotspotChangeMode.Moved); } } } if (arcLengthProperty != null) { arcLengthProperty.Refresh(); } if (directionProperty != null) { directionProperty.Refresh(); } }