void item_Click(object sender, EventArgs e)
        {
            MenuItem item = (MenuItem)sender;

            Type  editorType = (Type)item.Tag;
            Label label      = (Label)item.Parent.Tag;
            DesignerPropertyEditor editor = (DesignerPropertyEditor)label.Tag;

            Debug.Check(_selectedObject == editor.SelectedObject);

            FlexibleProperty flexProp = (FlexibleProperty)editor.Property.Property.GetValue(_selectedObject, null);

            flexProp.ChangeEditor(editorType);

            Nodes.Node node = _selectedObject as Nodes.Node;
            if (node != null)
            {
                node.OnPropertyValueChanged(true);
            }

            Events.Event evnt = _selectedObject as Events.Event;
            if (evnt != null)
            {
                evnt.OnPropertyValueChanged(true);
            }

            SelectedObject = _selectedObject;
        }
Beispiel #2
0
        public Event Clone(Nodes.Node newnode)
        {
            Event newevent = Create(GetType(), newnode);

            CloneProperties(newevent);

            newevent.OnPropertyValueChanged(false);

            return(newevent);
        }