IfcDoc.CtlProperties.UpdateTreeRule C# (CSharp) Method

UpdateTreeRule() private method

private UpdateTreeRule ( TreeNode tnRule ) : void
tnRule TreeNode
return void
        private void UpdateTreeRule(TreeNode tnRule)
        {
            DocModelRule docRule = (DocModelRule)tnRule.Tag;
            tnRule.Text = docRule.Name;

            DocTemplateDefinition docTemplateParent = this.m_parent as DocTemplateDefinition;
            if (docTemplateParent != null)
            {
                DocModelRule[] objpath = docTemplateParent.GetRulePath(tnRule.FullPath);
                if (objpath != null && objpath[objpath.Length - 1] != null)
                {
                    tnRule.ForeColor = Color.Gray;
                }
            }

            string tooltip = docRule.Name;
            // decorative text doesn't allow treeview path to work -- use tooltip in UI now instead
            //tooltip += docRule.GetCardinalityExpression();
            if (!String.IsNullOrEmpty(docRule.Identification))
            {
                tooltip += " <" + docRule.Identification + ">";
                tnRule.BackColor = Color.LightBlue; // mark parameter
            }
            else
            {
                tnRule.BackColor = Color.Empty;
            }
            tnRule.ToolTipText = tooltip;
        }
CtlProperties