public override BaseElement Clone() { FormProperty clone = new FormProperty(); clone.SetValues(this); return(clone); }
public void SetValues(FormProperty otherProperty) { base.SetValues(otherProperty); name = otherProperty.Name; expression = otherProperty.Expression; variable = otherProperty.Variable; type = otherProperty.Type; defaultExpression = otherProperty.DefaultExpression; datePattern = otherProperty.DatePattern; readable = otherProperty.IsReadable; writeable = otherProperty.IsWriteable; required = otherProperty.IsRequired; formValues = new List <FormValue>(); if (otherProperty.FormValues != null && otherProperty.FormValues.Count > 0) { foreach (FormValue formValue in otherProperty.FormValues) { formValues.Add((FormValue)formValue.Clone()); } } }