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;
        }
Ejemplo n.º 2
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;
        }
Ejemplo n.º 3
0
 public Question(QLMemory memory, string name, string label, QType type)
 {
     Memory = memory;
     Name   = name;
     Label  = label;
     Type   = type;
 }
 public Question(QLMemory memory, string name, string label, QType type)
 {
     Memory = memory;
     Name = name;
     Label = label;
     Type = type;
 }
        public void BuildQuestion(QLMemory memory, string name, string label, bool isComputed = false)
        {
            GUIQuestion guiQuestion = new GUIQuestion(memory, name, label, isComputed, _currentShowCondition, _guiQuestionnaire.Refresh);

            //set hide conditions
            _currentHideConditions.ForEach(guiQuestion.AppendHideCondition);

            _guiQuestionnaire.AddQuestion(guiQuestion);
        }
Ejemplo n.º 6
0
        public void BuildQuestion(QLMemory memory, string name, string label, bool isComputed = false)
        {
            GUIQuestion guiQuestion = new GUIQuestion(memory, name, label, isComputed, _currentShowCondition, _guiQuestionnaire.Refresh);

            //set hide conditions
            _currentHideConditions.ForEach(guiQuestion.AppendHideCondition);

            _guiQuestionnaire.AddQuestion(guiQuestion);
        }
        public CheckBoxControl(string idName, QLMemory memory, bool isComputed = false)
            : base(idName, memory, isComputed)
        {
            _checkBox = new CheckBox {IsEnabled = !isComputed};

            _checkBox.Checked += _checkBox_Checked;
            _checkBox.Unchecked += _checkBox_Checked;

            Children.Add(_checkBox);
        }
        protected InputControl(string idName, QLMemory memory, bool isComputed = false)
        {
            Memory = memory;
            IdName = idName;
            IsComputed = isComputed;

            //ui properties
            Width = 325;
            Height = 20;
            Margin = new Thickness(25, 0, 0, 0);
        }
Ejemplo n.º 9
0
        protected InputControl(string idName, QLMemory memory, bool isComputed = false)
        {
            Memory     = memory;
            IdName     = idName;
            IsComputed = isComputed;

            //ui properties
            Width  = 325;
            Height = 20;
            Margin = new Thickness(25, 0, 0, 0);
        }
Ejemplo n.º 10
0
        public CheckBoxControl(string idName, QLMemory memory, bool isComputed = false)
            : base(idName, memory, isComputed)
        {
            _checkBox = new CheckBox {
                IsEnabled = !isComputed
            };

            _checkBox.Checked   += _checkBox_Checked;
            _checkBox.Unchecked += _checkBox_Checked;

            Children.Add(_checkBox);
        }
        public IntTextBoxControl(string idName, QLMemory memory, bool isComputed = false)
            : base(idName, memory, isComputed)
        {
            _textBox = new TextBox
                {
                    Width = 150,
                    IsEnabled = !IsComputed,
                    HorizontalAlignment = HorizontalAlignment.Left
                };

            _textBox.LostFocus += _textBox_LostFocus;
            _textBox.LostKeyboardFocus += _textBox_LostFocus;
            _textBox.KeyUp += _textBox_LostFocus;

            Children.Add(_textBox);
        }
Ejemplo n.º 12
0
        public StringTextBoxControl(string idName, QLMemory memory, bool isComputed = false)
            : base(idName, memory, isComputed)
        {
            _textBox = new TextBox
            {
                Width               = 150,
                IsEnabled           = !IsComputed,
                HorizontalAlignment = HorizontalAlignment.Left
            };

            _textBox.LostFocus         += _textBox_LostFocus;
            _textBox.LostKeyboardFocus += _textBox_LostFocus;
            _textBox.KeyUp             += _textBox_LostFocus;

            Children.Add(_textBox);
        }
 public ComputedQuestion(QLMemory memory, string name, string label, QType type, ExpressionBase expression)
     : base(memory, name, label, type)
 {
     _value = expression;
 }
 public QIdentifier(QLMemory memory, string name)
 {
     _memory = memory;
     _name = name;
 }
Ejemplo n.º 15
0
 public QIdentifier(QLMemory memory, string name)
 {
     _memory = memory;
     _name   = name;
 }
Ejemplo n.º 16
0
 public abstract InputControl CreateInputControl(string name, QLMemory memory, bool isComputed);
 public override InputControl CreateInputControl(string name, QLMemory memory, bool isComputed)
 {
     return new IntTextBoxControl(name, memory, isComputed);
 }
 public abstract InputControl CreateInputControl(string name, QLMemory memory, bool isComputed);
Ejemplo n.º 19
0
 public override InputControl CreateInputControl(string name, QLMemory memory, bool isComputed)
 {
     return(new CheckBoxControl(name, memory, isComputed));
 }
Ejemplo n.º 20
0
 public ComputedQuestion(QLMemory memory, string name, string label, QType type, ExpressionBase expression)
     : base(memory, name, label, type)
 {
     _value = expression;
 }