示例#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();
     }
 }
示例#2
0
        private void OnDrawingPlaneDone(ConstructAction ca, bool success)
        {
            if (!success)
            {
                return;
            }
            frame.ShowPropertyDisplay("View");
            if (propertyTreeView != null)
            {
                propertyTreeView.SelectEntry(this);
            }
            Plane          pln = Plane.XYPlane;
            ConstructPlane cp  = ca as ConstructPlane;

            if (ca is ConstructPlane)
            {
                pln = (ca as ConstructPlane).ConstructedPlane;
            }
            else if (ca is ConstructTangentialPlane)
            {
                pln = (ca as ConstructTangentialPlane).ConstructedPlane;
            }
            else
            {
                return;
            }
            try
            {
                if (!Precision.IsPerpendicular(projection.Direction, pln.Normal, false))
                {
                    projection.DrawingPlane = pln;
                }
                else
                {
                    Frame.UIService.ShowMessageBox(StringTable.GetString("Error.DrawingPlane.Impossible"), StringTable.GetString("Errormessage.Title.InvalidInput"), MessageBoxButtons.OK);
                }
            }
            catch (ConstructPlane.ConstructPlaneException)
            {   // hat aus irgend einem Grund nicht geklappt
                Frame.UIService.ShowMessageBox(StringTable.GetString("Error.DrawingPlane.Impossible"), StringTable.GetString("Errormessage.Title.InvalidInput"), MessageBoxButtons.OK);
            }
            planeOrigin.Refresh();
            planeDirectionX.Refresh();
            planeDirectionY.Refresh();
            frame.ActiveView.InvalidateAll();
            frame.SetControlCenterFocus("View", null, false, false);
        }
 /// <summary>
 /// Refreshes the display of the point with the given index.
 /// </summary>
 /// <param name="Index">index of point to refresh</param>
 public void Refresh(int Index)
 {
     if (subEntries != null && Index < subEntries.Length)
     {
         GeoPointProperty gpp = subEntries[Index] as GeoPointProperty;
         if (gpp != null)
         {
             gpp.Refresh();
         }
     }
 }
示例#4
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();
     }
 }
 //public void EnableMouse(int Index)
 //{
 //    if (propertyPage!=null)
 //    {
 //        GeoPointProperty gpp = subEntries[Index] as GeoPointProperty;
 //        gpp.SetMouseButton(MouseButtonMode.MouseActive);
 //    }
 //}
 #region IShowPropertyImpl Overrides
 public override void Added(IPropertyPage propertyPage)
 {
     base.Added(propertyPage);
     IShowProperty[] sub = SubEntries;
     for (int i = 0; i < sub.Length; ++i)
     {
         GeoPointProperty gpp = sub[i] as GeoPointProperty;
         if (gpp != null)
         {
             gpp.Refresh();
         }
     }
 }
示例#6
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);
     }
 }