public void AddElement(BaseElement el) { if (el == null) { return; } elements.Add(el); el.AppearanceChanged += new EventHandler(element_AppearanceChanged); OnAppearancePropertyChanged(new EventArgs()); }
public void SelectElement(BaseElement el) { selectedElements.Add(el); if (el is NodeElement) { selectedNodes.Add(el); } if (canFireEvents) { OnElementSelection(this, new ElementSelectionEventArgs(selectedElements)); } }
public virtual ElementCollection GetLinkedNodes() { ElementCollection ec = new ElementCollection(); foreach (ConnectorElement ce in connects) { foreach (BaseLinkElement le in ce.Links) { if (le.Connector1 == ce) { ec.Add(le.Connector2.ParentElement); } else { ec.Add(le.Connector1.ParentElement); } } } return(ec); }
public virtual ElementCollection GetLinkedNodes() { ElementCollection ec = new ElementCollection(); foreach(ConnectorElement ce in connects) { foreach(BaseLinkElement le in ce.Links) { if (le.Connector1 == ce) { ec.Add(le.Connector2.ParentElement); } else { ec.Add(le.Connector1.ParentElement); } } } return ec; }
internal void AddLink(BaseLinkElement lnk) { links.Add(lnk); }