Example #1
0
        private void InitSubEntries()
        {
            ArrayList gp = new ArrayList();

            // wenn der Pfad zu viele Eckpunkte hat, gibts Probleme mit der WindowHandles
            for (int i = 0; i <= path.CurveCount; ++i) // mit Endpunkt
            {
                GeoPointProperty vertex = new GeoPointProperty("Path.Vertex", Frame, true);
                vertex.UserData.Add("Index", i);
                vertex.GetGeoPointEvent               += new CADability.UserInterface.GeoPointProperty.GetGeoPointDelegate(OnGetVertexPoint);
                vertex.SetGeoPointEvent               += new CADability.UserInterface.GeoPointProperty.SetGeoPointDelegate(OnSetVertexPoint);
                vertex.ModifyWithMouseEvent           += new ModifyWithMouseDelegate(ModifyVertexWithMouse);
                vertex.PropertyEntryChangedStateEvent += new PropertyEntryChangedStateDelegate(OnVertexStateChanged);
                vertex.GeoPointChanged();
                if (path.IsClosed)
                {
                    vertex.PrependContextMenu = MenuResource.LoadMenuDefinition("MenuId.Path.Vertex", false, new VertexCommandHandler(this, i));
                }

                gp.Add(vertex);
            }
            area                 = new DoubleProperty("Path.Area", Frame);
            area.ReadOnly        = true;
            area.GetDoubleEvent += new CADability.UserInterface.DoubleProperty.GetDoubleDelegate(OnGetArea);
            area.Refresh();
            gp.Add(area);
            length                 = new DoubleProperty("Path.Length", Frame);
            length.ReadOnly        = true;
            length.GetDoubleEvent += new CADability.UserInterface.DoubleProperty.GetDoubleDelegate(OnGetLength);
            length.Refresh();
            gp.Add(length);
            subEntries          = (IPropertyEntry[])gp.ToArray(typeof(IPropertyEntry));
            attributeProperties = path.GetAttributeProperties(Frame);
        }
Example #2
0
 private void PathDidChange(IGeoObject Sender, GeoObjectChange Change)
 {
     area.Refresh();
 }