public override FormElement Add(int formID, ElementType type, string title, string code, FormMode mode) { FormElement fm = FormElement.Instance(formID, type, title, code, mode); FormElements.Add(fm); return(fm); }
public FormDesignerModule(FormTemplate template) : base() { foreach (FormElement e in template.FormElements) { FormElementWrapper w = new FormElementWrapper(e); FormElements.Add(w); } RowString = template.Rows; ColumnString = template.Columns; _template = template; generateInstance(); }
private void addFormElement() { if ((ChosenFormElementOption == null) || (ChosenFormElementOption == String.Empty)) { return; } if (ChosenFormElementOption == "Label") { LabelFormElement e = new LabelFormElement(); e.Name = "New Label"; e.LabelText = "New Label"; LabelElementWrapper w = new LabelElementWrapper(e); _template.FormElements.Add(e); FormElements.Add(w); generateInstance(); } else if (ChosenFormElementOption == "Text Box") { TextFormElement e = new TextFormElement(); e.Name = "New text box"; FormElementWrapper w = new FormElementWrapper(e); _template.FormElements.Add(e); FormElements.Add(w); generateInstance(); } else if (ChosenFormElementOption == "Numeric Up Down") { NumericFormElement e = new NumericFormElement(); e.Name = "New numeric box"; NumericElementWrapper w = new NumericElementWrapper(e); _template.FormElements.Add(e); FormElements.Add(w); generateInstance(); } }
public override FormElement Add(FormElement formElement) { FormElements.Add(formElement); return(formElement); }