IfcDoc.FormEdit.Navigate C# (CSharp) Method

Navigate() private method

Navigates to item in tree corresponding to object
private Navigate ( TreeNode tn, DocObject docObj ) : void
tn TreeNode
docObj DocObject
return void
        private void Navigate(TreeNode tn, DocObject docObj)
        {
            if (tn == null)
            {
                foreach(TreeNode sub in this.treeView.Nodes)
                {
                    Navigate(sub, docObj);
                }
                return;
            }

            if (tn.Tag == docObj)
            {
                this.treeView.SelectedNode = tn;
                return;
            }

            foreach(TreeNode sub in tn.Nodes)
            {
                Navigate(sub, docObj);
            }
        }
FormEdit