Exemplo n.º 1
0
        public override StackPanel InsertInUIParent(StackPanel parent)
        {
            Value value;

            try
            {
                value = conditionalNode.Condition.Accept(new Evaluator(symbolTable));
            }
            catch (DivideByZeroException divByZero) //constructivist: false by default
            {
                value = new Bool(false);
            }

            StackPanel customStackPanel = value.Accept(new ValueToStackPanel());

            SubController conditionalController = new SubController(symbolTable, base.EventUpdateValue);

            parent.Children.Add(
                conditionalController.CreateUIBody(conditionalNode, customStackPanel));

            return(parent);
        }