Exemplo n.º 1
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();
         }
     }
 }
Exemplo n.º 2
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;
     }
 }