Esempio n. 1
0
        // Answer values
        private ExpressionValue ParseIdentifyerNode(IdentifierNode identifierNode)
        {
            switch (identifierNode.GetQValueType())
            {
            case QValueType.BOOLEAN:
                return(new ExpressionBool(new string[] { identifierNode.ID }, () => { return (_widgetController.GetElementManager(identifierNode.ID) as BoolQuestionManager).Answer.Value; }));

            case QValueType.INTEGER:
                return(new ExpressionInt(new string[] { identifierNode.ID }, () => { return (_widgetController.GetElementManager(identifierNode.ID) as IntQuestionManager).Answer.Value; }));

            case QValueType.MONEY:
                return(new ExpressionDouble(new string[] { identifierNode.ID }, () => { return (_widgetController.GetElementManager(identifierNode.ID) as MoneyQuestionManager).Answer.Value; }));

            default:
                throw new NotImplementedException();
            }
        }
        private ExpressionValue ParseidentifierNode(IdentifierNode identifierNode)
        {
            switch (identifierNode.GetQValueType())
            {
            case QValueType.Boolean:
                return(new ExpressionBool(new LazyElementExpressionLink <bool>(_elementManagerController, identifierNode.ID)));

            case QValueType.Integer:
                return(new ExpressionInt(new LazyElementExpressionLink <int>(_elementManagerController, identifierNode.ID)));

            case QValueType.Double:
            case QValueType.Money:
                return(new ExpressionDouble(new LazyElementExpressionLink <double>(_elementManagerController, identifierNode.ID)));

            case QValueType.Text:
                return(new ExpressionText(new LazyElementExpressionLink <string>(_elementManagerController, identifierNode.ID)));

            case QValueType.Hex:
                return(new ExpressionHex(new LazyElementExpressionLink <Hexadecimal>(_elementManagerController, identifierNode.ID)));

            default:
                throw new NotImplementedException();
            }
        }