public void SetResults(ValueTable results) { foreach (var section in _sections) { section.SetResults(results); } }
public ValueTable Interpretet(QuestionForm form, ValueTable context) { _context = context; _results = new ValueTable(); Visit(form); return(_results); }
public ValueTable Interpretet(QuestionForm form, ValueTable context) { if (form == null) { throw new ArgumentNullException("form"); } if (context == null) { throw new ArgumentNullException("context"); } var interpreter = new Interpreter(); return interpreter.Interpretet(form, context); }
private ValueTable CollectAnswers() { var answers = new ValueTable(); foreach (QuestionWidget questionWidget in _questionWidgets) { answers.Add(questionWidget.QuestionName, questionWidget.GetValue()); } return answers; }
private void SetResults(ValueTable results) { foreach (QuestionWidget questionWidget in QuestionFlowLayout.Controls) { questionWidget.Visible = results.HasValue(questionWidget.QuestionName); if (results.HasValue(questionWidget.QuestionName)) { Value result = results.Get(questionWidget.QuestionName); if (!result.IsUndefined) { questionWidget.SetValue(result); } } } }
public void SetResults(ValueTable results) { // We need to set the parent control to 'visible' before we can change the Visible property // of any child controls. Visible = true; foreach (QuestionWidget questionWidget in _questionWidgets) { questionWidget.Visible = results.HasValue(questionWidget.QuestionName); if (results.HasValue(questionWidget.QuestionName)) { Value result = results.Get(questionWidget.QuestionName); if (!result.IsUndefined) { questionWidget.SetValue(result); } } } Visible = _questionWidgets.Any(widget => widget.Visible); }
private void SetResults(ValueTable results) { foreach (var page in _pages) { page.SetResults(results); } }
internal ExpressionInterpreter(ValueTable context) { _context = context; }