예제 #1
0
        /// <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);
        }