IfcDoc.FormEdit.ctlInheritance_SelectionChanged C# (CSharp) Method

ctlInheritance_SelectionChanged() private method

private ctlInheritance_SelectionChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void ctlInheritance_SelectionChanged(object sender, EventArgs e)
        {
            // navigate
            if(this.ctlInheritance.Selection != null)
            {
                TreeNode tn = null;
                if (this.m_mapTree.TryGetValue(this.ctlInheritance.Selection.Name.ToLower(), out tn))
                {
                    // if model view is selected, get the concept root
                    if(this.ctlInheritance.ModelView != null)
                    {
                        foreach(DocConceptRoot docRoot in this.ctlInheritance.ModelView.ConceptRoots)
                        {
                            if(docRoot.ApplicableEntity == this.ctlInheritance.Selection)
                            {
                                foreach(TreeNode tnConcept in tn.Nodes)
                                {
                                    if(tnConcept.Tag == docRoot)
                                    {
                                        this.treeView.SelectedNode = tnConcept;
                                        return;
                                    }
                                }

                            }
                        }
                    }

                    // otherwise go to entity
                    this.treeView.SelectedNode = tn;
                }
            }
        }
FormEdit