コード例 #1
0
        public GUIQuestion(QLMemory memory, string identifier, string label, bool isComputed, ExpressionBase showCondition, ChangedEventHandler changeHandler)
        {
            _hideConditions = new List<ExpressionBase>();
            _showCondition = showCondition;

            _memory = memory;
            _identifier = identifier;
            _isComputed = isComputed;

            _label = new Label
                {
                    Content = label,
                    Width = 300,
                    Margin = new Thickness(0, 0, 25, 0),
                    HorizontalContentAlignment = HorizontalAlignment.Right
                };

            _input = _memory.GetDeclaredValue(_identifier).CreateInputControl(_identifier, _memory, _isComputed);
            _input.OnChanged = changeHandler;

            //ui properties
            Width = 600;
            Margin = new Thickness(0, 10, 0 , 0);
            Orientation = Orientation.Horizontal;
        }
コード例 #2
0
 public void DeclareComputedValue(string name, ExpressionBase value)
 {
     _idsComputedValues[name] = value;
 }
コード例 #3
0
 public ComputedQuestion(QLMemory memory, string name, string label, QType type, ExpressionBase expression)
     : base(memory, name, label, type)
 {
     _value = expression;
 }
コード例 #4
0
 public void SetShowCondition(ExpressionBase showCondition)
 {
     _showCondition = showCondition;
 }
コード例 #5
0
 public void AppendHideCondition(ExpressionBase condition)
 {
     _hideConditions.Add(condition);
 }
コード例 #6
0
 public void SetShowCondition(ExpressionBase condition)
 {
     _currentShowCondition = condition;
 }
コード例 #7
0
 public void RemoveShowCondition()
 {
     _currentShowCondition = null;
 }
コード例 #8
0
 public StatementIf(ExpressionBase condition, List<StatementBase> body, List<StatementBase> elseBody)
 {
     _condition = condition;
     _body = body;
     _elseBody = elseBody;
 }