Пример #1
0
		private Node CloneNode(Node oNode, bool bExpand)
		{
			Node oCloneNode = new Node();

			oCloneNode.NodeMoving = true;
			oCloneNode.Parent = null;
			oCloneNode.Copy(oNode);
			oCloneNode._TreeView = oNode._TreeView;

			if (bExpand == true)
				oCloneNode.Expand();

			foreach (Node oSubNode in oNode.Nodes.ToNodeArray())
			{
				Node oSubNodeClone = CloneNode(oSubNode, bExpand);

				oSubNodeClone.Parent = oCloneNode;
			}

			oCloneNode.NodeMoving = false;

			return oCloneNode;
		}