/// <summary>
 /// Find child and destroy child and component parameter
 /// </summary>
 /// <param name="component">parent, will be destroy with all child connected</param>
 public void FindChildAndDestroy()
 {
     if (next != null)
     {
         next.FindChildAndDestroy();
     }
     RemoveComponent();
 }
Пример #2
0
        void RemoveBranch(int index)
        {
            DIVisualComponent removedComp = splitedComponent[index];

            if (removedComp != null)
            {
                removedComp.FindChildAndDestroy();
            }
            splitedComponent.RemoveAt(index);
        }
Пример #3
0
        void RemoveBranch()
        {
            DIVisualComponent removedComp = splitedComponent[splitedComponent.Count - 1];

            if (removedComp != null)
            {
                removedComp.FindChildAndDestroy();
            }
            splitedComponent.RemoveAt(splitedComponent.Count - 1);
        }