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;
}
}
}