private void AddDropDownOptions(PythonModel pe) { if (pe.DataHas("DropdownOption")) { return; } if (option == null) { return; } var options = new DynamicData(); pe.DictionaryAdd("DropdownOption", options); foreach (var o in option) { options.AddValue(o, true); } }
private void AddCheckboxes(PythonModel pe) { if (pe.DataHas("Checkbox")) { return; } if (Checkbox == null) { return; } var checkboxes = new DynamicData(); pe.DictionaryAdd("Checkbox", checkboxes); foreach (var c in Checkbox) { checkboxes.AddValue(c, true); } }
private void AddYesNo(PythonModel pe) { if (pe.DataHas("YesNoQuestion")) { return; } if (YesNoQuestion == null || YesNoQuestion.Count == 0) { return; } var yesnoquestions = new DynamicData(); pe.DictionaryAdd("YesNoQuestion", yesnoquestions); foreach (var dict in YesNoQuestion) { yesnoquestions.AddValue(dict.Key, dict.Value ?? false); } }
private void AddQuestions(PythonModel pe) { if (pe.DataHas("ExtraQuestion")) { return; } if (ExtraQuestion == null || ExtraQuestion.Count == 0) { return; } var questions = new DynamicData(); pe.DictionaryAdd("ExtraQuestion", questions); foreach (var dict in ExtraQuestion) { foreach (var q in dict) { questions.AddValue(q.Key, q.Value); } } }
private void AddMenuItems(PythonModel pe) { if (pe.DataHas("MenuItem")) { return; } if (MenuItem == null) { return; } var menuitems = new DynamicData(); pe.DictionaryAdd("MenuItem", menuitems); foreach (var dict in MenuItem) { foreach (var q in dict) { menuitems.AddValue(q.Key, q.Value ?? 0); } } }
private void AddText(PythonModel pe) { if (pe.DataHas("TextQuestion")) { return; } if (Text == null || Text.Count == 0) { return; } var textquestions = new DynamicData(); pe.DictionaryAdd("TextQuestion", textquestions); foreach (var dict in Text) { foreach (var q in dict) { textquestions.AddValue(q.Key, q.Value); } } }