static bool ComputedQuestionRender(Racr.AstNode n) { (n.Widget() as Widget).Set(n.Value()); return true; }
static public void UpdateQuestions(Racr.AstNode n) { switch (n.NodeType()) { case "Form": case "Group": foreach (var c in n.GetBody().Children()) UpdateQuestions(c as Racr.AstNode); break; case "ComputedQuestion": break; default: (n.Widget() as Widget).Set(n.Value()); break; } }
static bool FormRender(Racr.AstNode n) { n.Widget(); foreach (var c in n.GetBody().Children()) { var child = c as Racr.AstNode; var w = child.Widget(); child.Render(); if (child.IsShown()) w.Show(); else w.Hide(); } return true; }