Example #1
0
 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();
     }
 }
Example #2
0
 private void OnDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     if (isChanging == 0)
     {
         FireDidChange(Change);
     }
 }
Example #3
0
 private void OnDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     if (flattened != null)
     {
         flattened.Target = null;
     }
     FireDidChange(Change);
 }
Example #4
0
 private void OnGeoObjectDidChange(IGeoObject Sender, GeoObjectChange Change)
 {       // wird bei Änderungen von der Linie aufgerufen, Abgleich der Anzeigen
     if (Change.MethodOrPropertyName == "ModifyInverse")
     {   // während der Selektion kann das Objekt per DragAndDrop verschoben werden. Dann kommen wir hier hin und updaten alles.
         polesProperty.Refresh();
         if (throughPointsProperty != null && !bSpline.ThroughPoints3dExist)
         {
             throughPointsProperty.Refresh();
         }
     }
 }
Example #5
0
 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();
     }
 }
Example #6
0
        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);
                }
            }
        }
Example #7
0
 private void OnGeoObjectDidChange(IGeoObject Sender, GeoObjectChange Change)
 {       // wird bei Änderungen der Geometrie aufgerufen, Abgleich der Anzeigen
     location.Refresh();
     width.Refresh();
     height.Refresh();
     dirWidthHotSpot.Position  = picture.Location + picture.DirectionWidth;
     dirHeightHotSpot.Position = picture.Location + picture.DirectionHeight;
     if (HotspotChangedEvent != null)
     {
         HotspotChangedEvent(location, HotspotChangeMode.Moved);
         HotspotChangedEvent(dirWidthHotSpot, HotspotChangeMode.Moved);
         HotspotChangedEvent(dirHeightHotSpot, HotspotChangeMode.Moved);
     }
 }
 void ToWatchDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     if (Sender == toWatch)
     {
         if (iHatchStyle.HatchStyle != null)
         {
             int ind = base.ChoiceIndex(iHatchStyle.HatchStyle.Name);
             if (ind != base.CurrentIndex)
             {
                 base.SetSelection(ind);
             }
         }
     }
 }
Example #9
0
 private void OnGeoObjectDidChange(IGeoObject Sender, GeoObjectChange Change)
 {   // wird bei Änderungen von der Linie aufgerufen, Abgleich der Anzeigen
     startPointProperty.Refresh();
     endPointProperty.Refresh();
     lengthProperty.Refresh();
     lengthHotSpot.Position = line.PointAt(2.0 / 3.0);    // sitzt bei 2/3 der Linie
     directionProperty.Refresh();
     directionHotSpot.Position = line.PointAt(1.0 / 3.0); // sitzt bei 1/3 der Linie
     if (HotspotChangedEvent != null)
     {
         HotspotChangedEvent(startPointProperty, HotspotChangeMode.Moved);
         HotspotChangedEvent(endPointProperty, HotspotChangeMode.Moved);
         HotspotChangedEvent(lengthHotSpot, HotspotChangeMode.Moved);
         HotspotChangedEvent(directionHotSpot, HotspotChangeMode.Moved);
     }
 }
Example #10
0
 private void GeoObjectDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     if (Sender == toWatch && Change.OnlyAttributeChanged && propertyPage != null)
     {
         if ((Change as GeoObjectChange).MethodOrPropertyName == "DimensionStyle")
         {
             if ((toWatch as IDimensionStyle).DimensionStyle != null)
             {
                 base.selectedText = (toWatch as IDimensionStyle).DimensionStyle.Name;
             }
             else
             {
                 base.selectedText = null;
             }
             propertyPage.Refresh(this);
         }
     }
 }
Example #11
0
 private void PolylineDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     if (rectangleProperty != null && !polyline.IsRectangle)
     {   // die Einträge für das Rechteck wegmachen
         rectangleProperty = null;
         subEntries        = new IPropertyEntry[1];
         subEntries[0]     = vertexProperty;
         base.resourceId   = "Polyline.Object";
         base.propertyPage.Refresh(this);
         base.propertyPage.OpenSubEntries(vertexProperty, true);
     }
     if (parallelProperty != null && !polyline.IsParallelogram)
     {   // die Einträge für das Parallelogramm wegmachen
         parallelProperty = null;
         subEntries       = new IPropertyEntry[1];
         subEntries[0]    = vertexProperty;
         base.resourceId  = "Polyline.Object";
         base.propertyPage.Refresh(this);
         base.propertyPage.OpenSubEntries(vertexProperty, true);
     }
     if (vertexProperty.SubEntries.Length != polyline.Vertices.Length)
     {
         vertexProperty.Refresh();
     }
     for (int i = 0; i < subEntries.Length; ++i)
     {
         propertyPage.Refresh(subEntries[i] as IPropertyEntry);
     }
     //if(Change.MethodOrPropertyName != "SetPoint")
     //    vertexProperty.ShowOpen(false); // warum? geht ja sonst immer zu
     if (polyline.IsRectangle && rectangleProperty != null)
     {
         widthHotSpot.Position     = polyline.RectangleLocation + 0.5 * polyline.ParallelogramSecondaryDirection + polyline.ParallelogramMainDirection;
         heightHotSpot.Position    = polyline.RectangleLocation + polyline.ParallelogramSecondaryDirection + 0.5 * polyline.ParallelogramMainDirection;
         directionHotSpot.Position = polyline.RectangleLocation + polyline.ParallelogramMainDirection;
         sizeHotSpot.Position      = polyline.RectangleLocation + polyline.ParallelogramMainDirection + polyline.ParallelogramSecondaryDirection;
     }
     if (polyline.IsParallelogram && parallelProperty != null)
     {
         directionXParallelHotSpot.Position = polyline.ParallelogramLocation + polyline.ParallelogramMainDirection;
         directionYParallelHotSpot.Position = polyline.ParallelogramLocation + polyline.ParallelogramSecondaryDirection;
         sizeHotSpot.Position = polyline.ParallelogramLocation + polyline.ParallelogramMainDirection + polyline.ParallelogramSecondaryDirection;
     }
 }
Example #12
0
 private void GeoObjectDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     if (Sender == toWatch && Change.OnlyAttributeChanged && propertyPage != null)
     {
         if ((Change as GeoObjectChange).MethodOrPropertyName == "Layer" ||
             (Change as GeoObjectChange).MethodOrPropertyName == "Style")
         {
             if (toWatch.Layer != null)
             {
                 base.selectedText = toWatch.Layer.Name;
             }
             else
             {
                 base.selectedText = null;
             }
             propertyPage.Refresh(this);
         }
     }
 }
 private void GeoObjectDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     if (Sender == toWatch && Change.OnlyAttributeChanged && propertyPage != null)
     {
         if ((Change as GeoObjectChange).MethodOrPropertyName == "ColorDef" ||
             (Change as GeoObjectChange).MethodOrPropertyName == "Style")
         {
             if ((toWatch as IColorDef).ColorDef != null)
             {
                 selectedCD = (toWatch as IColorDef).ColorDef;
             }
             else
             {
                 selectedCD = null;
             }
             if (propertyPage != null)
             {
                 propertyPage.Refresh(this);
             }
         }
     }
 }
Example #14
0
 void OnGeoObjectWillChange(IGeoObject Sender, GeoObjectChange Change)
 {
     FireDidChange(Change);
 }
Example #15
0
 private void OnWillChange(IGeoObject Sender, GeoObjectChange Change)
 {
     FireWillChange(Change);
 }
Example #16
0
 private void PathDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     area.Refresh();
 }
Example #17
0
 void OnModelChanged(IGeoObject Sender, GeoObjectChange Change)
 {
     InvalidateRepresentation();
 }
Example #18
0
 private void OnTextEdited(IGeoObject Sender, GeoObjectChange Change)
 {
     dimension.SetDimText(0, (Sender as Text).TextString);
 }
Example #19
0
 private void OnPointDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     locationProperty.GeoPointChanged();
 }