예제 #1
0
파일: NOT.cs 프로젝트: Kookpot/StockMage
        /// <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);
        }
예제 #2
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);
        }