Esempio n. 1
0
        /// <summary>
        /// <see cref="IElement.GetNode" />
        /// </summary>
        public override TreeNode GetNode(string prefix)
        {
            var node = new TreeNode(prefix + "NOT  " + ToString())
            {
                Tag = this, Name = "NOTNode"
            };

            if (_condition != null)
            {
                node.Nodes.Add(_condition.GetNode(string.Empty));
            }
            return(node);
        }
        /// <summary>
        /// <see cref="IElement.GetNode" />
        /// </summary>
        public override TreeNode GetNode(string prefix)
        {
            var node = new TreeNode(prefix + ToString())
            {
                Tag = this, Name = "ConditionalInstructionNode"
            };

            if (_ifInstruction != null)
            {
                node.Nodes.Add(_ifInstruction.GetNode("THEN "));
            }
            if (_elseInstruction != null)
            {
                node.Nodes.Add(_elseInstruction.GetNode("ELSE "));
            }
            if (_ifCondition != null)
            {
                node.Nodes.Add(_ifCondition.GetNode(string.Empty));
            }
            return(node);
        }