Beispiel #1
0
        public Values.Value ProcessComputation(Values.Value value)
        {
            if (questionNode.Computation != null)
            {
                value = Processor.Evaluate(questionNode.Computation);
            }

            return(value);
        }
Beispiel #2
0
        public UIElement ProcessFormObject(UIElement form)
        {
            Widget widget      = new TypeToWidgetVisitor(questionNode.Identifier.Name).VisitValue(questionNode.RetrieveType());
            Widget labelWidget = new LabelVisitor().VisitValue(questionNode.Label);

            Values.Value widgetValue = Processor.GetObjectValue(questionNode.Identifier);

            widgetValue = ProcessComputation(widgetValue);

            AddChildren(labelWidget.CreateUIControl(questionNode.Label.Value), form);
            AddChildren(widget.CreateUIControl(ValueVisitor.Visit((dynamic)widgetValue)), form);

            return(form);
        }