private void ctlProperties_Navigate(object sender, EventArgs e)
{
if (this.ctlProperties.SelectedUsage != null && this.ctlProperties.SelectedUsage.Length == 3)
{
DocEntity docEnt = (DocEntity)this.ctlProperties.SelectedUsage[0];
DocConceptRoot docRoot = (DocConceptRoot)this.ctlProperties.SelectedUsage[1];
DocTemplateUsage docUsage = (DocTemplateUsage)this.ctlProperties.SelectedUsage[2];
TreeNode tnEntity = this.m_mapTree[docEnt.Name.ToLowerInvariant()];
foreach(TreeNode tnRoot in tnEntity.Nodes)
{
if(tnRoot.Tag == docRoot)
{
foreach(TreeNode tnUsage in tnRoot.Nodes)
{
if(tnUsage.Tag == docUsage)
{
this.treeView.SelectedNode = tnUsage;
return;
}
}
}
}
}
else if(this.ctlProperties.SelectedUsage != null && this.ctlProperties.SelectedUsage.Length == 1 && this.ctlProperties.SelectedUsage[0] is DocTemplateDefinition)
{
DocTemplateDefinition dtd = (DocTemplateDefinition)this.ctlProperties.SelectedUsage[0];
this.Navigate(this.treeView.Nodes[3], dtd);
}
}