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 DimensionDidChange(IGeoObject Sender, GeoObjectChange Change) { if (ignoreChange) { return; // es wird. z.B. gerade ein Punkt entfernt } // und die Properties müssen erst wieder neu Refresht werden if (HotspotChangedEvent != null) { // mitführen der TextHotSpots. Die Hotspots der Punkte werden automatisch // mitgeführt, ebenso der für die DimLineRef for (int i = 0; i < textPosHotSpot.Length; ++i) { textPos[i].DoubleChanged(); textPosHotSpot[i].Position = dimension.GetTextPosCoordinate(i, Frame.ActiveView.Projection); HotspotChangedEvent(textPosHotSpot[i], HotspotChangeMode.Moved); } if (startAngle != null) { startAngle.GeoVectorChanged(); endAngle.GeoVectorChanged(); startAngle.SetHotspotPosition(dimension.GetPoint(1)); endAngle.SetHotspotPosition(dimension.GetPoint(2)); HotspotChangedEvent(startAngleHotSpot, HotspotChangeMode.Moved); HotspotChangedEvent(endAngleHotSpot, HotspotChangeMode.Moved); } if (centerProperty != null) { centerProperty.GeoPointChanged(); // Refresh HotspotChangedEvent(centerProperty, HotspotChangeMode.Moved); } if (radiusProperty != null) { radiusProperty.DoubleChanged(); } } int numprop = 1; if (dimension.DimType == Dimension.EDimType.DimPoints || dimension.DimType == Dimension.EDimType.DimCoord) { numprop = dimension.PointCount - 1; } if (numprop != dimText.Length) { Opened(false); // alle hotspots abmelden Init(); if (propertyPage != null) { propertyPage.Refresh(this); propertyPage.OpenSubEntries(points, true); } } }