public void AddDefaultValue(String value) { if (base.defaultValueField == null) { this.InitDefaultField(); } MultiInputField defaultField = (MultiInputField)base.defaultValueField; defaultField.AddValue(value); }
public List <String> GetDefaultValues() { if (base.defaultValueField == null) { this.InitDefaultField(); } List <String> result = new List <String>(); MultiInputField defaultField = (MultiInputField)base.defaultValueField; List <Value> vList = defaultField.GetValues(); foreach (Value v in vList) { result.Add(v.PropertyValue); } return(result); }
public void SetDefaultValues(List <String> values) { if (base.defaultValueField == null) { this.InitDefaultField(); } MultiInputField defaultField = (MultiInputField)base.defaultValueField; if (defaultField.GetValues() != null && defaultField.GetValues().Count > 0) { defaultField.GetValues().Clear(); } foreach (String v in values) { defaultField.AddValue(v); } }
public override XmlElement ToDefaultValueElement() { MultiInputField defaultField = (MultiInputField)base.defaultValueField; List <Value> defaultValues = defaultField.GetValues(); if (defaultValues == null || defaultValues.Count == 0) { return(null); } XmlElement valuesNode = XmlUtils.CreateRootElement("default-values"); foreach (Value value in defaultValues) { XmlElement valueNode = XmlUtils.AppendElement(valuesNode, "default-value"); valueNode.InnerText = value.PropertyValue; } return(valuesNode); }
public void SetMultiInputFieldValues(string fieldId, List<string> values) { MultiInputField field = new MultiInputField(); field.Id = fieldId; field.SetValues(values); this.fieldMap[fieldId] = field; }