Add() 개인적인 메소드

private Add ( BaseElement element ) : int
element BaseElement
리턴 int
예제 #1
0
 public void AddElement(BaseElement el)
 {
     if (el == null)
     {
         return;
     }
     elements.Add(el);
     el.AppearanceChanged += new EventHandler(element_AppearanceChanged);
     OnAppearancePropertyChanged(new EventArgs());
 }
예제 #2
0
 public void SelectElement(BaseElement el)
 {
     selectedElements.Add(el);
     if (el is NodeElement)
     {
         selectedNodes.Add(el);
     }
     if (canFireEvents)
     {
         OnElementSelection(this, new ElementSelectionEventArgs(selectedElements));
     }
 }
예제 #3
0
        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);
        }
예제 #4
0
		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;
		}
예제 #5
0
 internal void AddLink(BaseLinkElement lnk)
 {
     links.Add(lnk);
 }