Ejemplo n.º 1
0
 /// <summary>
 /// adds children to newly created clones
 /// </summary>
 /// <param name="menu">menu that has children to be coppied from</param>
 private void addChildOf(TreeMenu menu)
 {
     if (menu.child == null)
     {
         return;
     }
     child = new TreeMenu(SquareList.createSquareList(menu.child.children));
     child.addChildOf(menu.child);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// create a new tree menu based on 
        /// this treeMenu
        /// </summary>
        /// <returns></returns>
        public TreeMenu Clone()
        {
            TreeMenu newmenu = new TreeMenu(children, breadCrumbs, ParentList);
            newmenu.addChildOf(this);

            return newmenu;
        }