Esempio n. 1
0
        public void AddDefaultValue(String value)
        {
            if (base.defaultValueField == null)
            {
                this.InitDefaultField();
            }
            MultiInputField defaultField = (MultiInputField)base.defaultValueField;

            defaultField.AddValue(value);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
 public void SetMultiInputFieldValues(string fieldId, List<string> values)
 {
     MultiInputField field = new MultiInputField();
     field.Id = fieldId;
     field.SetValues(values);
     this.fieldMap[fieldId] = field;
 }