// TreeListView recursion
        private void NodeFind(string text, CommonTools.NodeCollection cNodes, bool searchFields, out CommonTools.Node outNode)
        {
            bool found = false;

            outNode = null;

            foreach (Node n in NodeCollection.ForwardNodeIterator(this.Nodes[0], false))
            {
                for (int f = 0; f <= this.Columns.Count - 1; f++)
                {
                    if (n[f] == null)
                    {
                        continue;
                    }

                    if (text == n[f].ToString())
                    {
                        found = true;
                        break;
                    }
                }

                if (found)
                {
                    outNode = n;
                    break;
                }
            }
        }
Beispiel #2
0
        public static int GetNodeIndex(CommonTools.NodeCollection coll, CommonTools.Node node)
        {
            int index = 0;

            CommonTools.Node tmp = coll.FirstNode;

            while (tmp != null && !CRMOntology.BusinessLayer.Node.Equals(tmp, node))
            {
                if (tmp.Nodes.Count > 0)
                {
                    int recursive = CRMOntology.BusinessLayer.Node.GetNodeIndex(tmp.Nodes, node);
                    if (recursive >= 0)
                    {
                        return(index);
                    }
                }
                tmp = tmp.NextSibling;
                index++;
            }
            if (tmp == null)
            {
                return(-1);
            }
            return(index);
        }
Beispiel #3
0
 public NodeCollectionUnitTest(CommonTools.NodeCollection collection)
 {
     m_collection = collection;
 }
Beispiel #4
0
 public NodeCollectionUnitTest()
 {
     m_collection = new CommonTools.NodeCollection(null);
 }
Beispiel #5
0
 internal ITRviewer(CommonTools.NodeCollection collection)
 {
     rootNodes = collection;
 }