예제 #1
0
        public static UltraTreeNode GetNodeByTag(this UltraTree tree, string tag)
        {
            UltraTreeNode ultraTreeNode1 = (UltraTreeNode)null;

            foreach (UltraTreeNode node in tree.Nodes)
            {
                UltraTreeNode ultraTreeNode2 = TreeExtensions.SearchChildNodes(node, tag);
                if (ultraTreeNode2 != null)
                {
                    ultraTreeNode1 = ultraTreeNode2;
                }
            }
            return(ultraTreeNode1);
        }
예제 #2
0
        private static UltraTreeNode SearchChildNodes(UltraTreeNode searchNode, string tag)
        {
            UltraTreeNode ultraTreeNode1;

            if (searchNode.Tag != null && Operators.CompareString(searchNode.Tag.ToString(), tag, false) == 0)
            {
                ultraTreeNode1 = searchNode;
            }
            else
            {
                foreach (UltraTreeNode node in searchNode.Nodes)
                {
                    UltraTreeNode ultraTreeNode2 = TreeExtensions.SearchChildNodes(node, tag);
                    if (ultraTreeNode2 != null)
                    {
                        ultraTreeNode1 = ultraTreeNode2;
                        goto label_7;
                    }
                }
                ultraTreeNode1 = (UltraTreeNode)null;
            }
label_7:
            return(ultraTreeNode1);
        }