IfcDoc.FormEdit.ctlCheckGrid_SelectionChanged C# (CSharp) Method

ctlCheckGrid_SelectionChanged() private method

private ctlCheckGrid_SelectionChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void ctlCheckGrid_SelectionChanged(object sender, EventArgs e)
        {
            if (this.ctlCheckGrid.Selection is DocObject)
            {
                DocObject docObj = (DocObject)this.ctlCheckGrid.Selection;
                TreeNode tn = null;

                if (docObj is DocConceptRoot)
                {
                    // redirect to applicable entity
                    DocConceptRoot cr = (DocConceptRoot)docObj;
                    if (cr.ApplicableEntity != null && this.m_mapTree.TryGetValue(cr.ApplicableEntity.Name.ToLowerInvariant(), out tn))
                    {
                        this.UpdateTreeSelection(tn, docObj);
                    }
                }
                else if (docObj is DocTemplateUsage)
                {
                    // need a more efficient mapping...
                    this.UpdateTreeSelection(this.treeView.Nodes[4], docObj);
                    this.UpdateTreeSelection(this.treeView.Nodes[5], docObj);
                    this.UpdateTreeSelection(this.treeView.Nodes[6], docObj);
                    this.UpdateTreeSelection(this.treeView.Nodes[7], docObj);
                }
                else if (docObj.Name != null && this.m_mapTree.TryGetValue(docObj.Name.ToLowerInvariant(), out tn))
                {
                    this.treeView.SelectedNode = tn;
                }
            }
        }
FormEdit