コード例 #1
0
ファイル: FormProperty.cs プロジェクト: lulzzz/NetActiviti
        public override BaseElement Clone()
        {
            FormProperty clone = new FormProperty();

            clone.SetValues(this);
            return(clone);
        }
コード例 #2
0
ファイル: FormProperty.cs プロジェクト: lulzzz/NetActiviti
        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());
                }
            }
        }