Ejemplo n.º 1
0
        /// <summary>
        /// This method provides a convenient way of adding multiple Field objects at once.
        /// </summary>
        /// <param name="fields">Field object(s)</param>
        public void AddFields(params Field[] fields)
        {
            foreach (var field in fields)
            {
                _fields.Add(field);

                /*
                 * if(field is InputField)
                 * {
                 *
                 *  InputField inputField = field as InputField;
                 *  if (_fields.FieldIndex.ContainsKey(inputField.Key))
                 *  {
                 *      _fields[_fields.FieldIndex[inputField.Key]] = field;
                 *  }
                 *  else
                 *  {
                 *      _fields.Add(field);
                 *      _fields.FieldIndex.Add(inputField.Key, _fields.Count - 1);
                 *  }
                 * }
                 * else
                 * {
                 *  _fields.Add(field);
                 * }*/
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// This method provides a convenient way of adding multiple Field objects at once.
 /// </summary>
 /// <param name="fields">Field object(s)</param>
 public void AddFields(params Field[] fields)
 {
     foreach (var field in fields)
     {
         _fields.Add(field);
     }
 }