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; }
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; }
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); }
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); }
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); }
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; }
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 override InputControl CreateInputControl(string name, QLMemory memory, bool isComputed) { return(new CheckBoxControl(name, memory, isComputed)); }