Example #1
0
        public DataField(BaseData container, FieldDefinition field, object Object)
        {
            this.Container = container;
            this.ContainerObject = Object;
            this.Field = field;
            if (DynamicTypes.Types.ContainsKey(this.ContainerObject.GetType().FullName))
                this.InitValue = DynamicTypes.Get(this.ContainerObject, field.FieldName);
            else
                this.InitValue = this.ContainerObject.GetType().GetField(field.FieldName).GetValue(this.ContainerObject);
            this._Value = this.InitValue;
            if (field.Extra.ContainsKey("max"))
                this._MaxValue = (double)double.Parse(field.Extra["max"]);
            if (field.Extra.ContainsKey("min"))
                this._MinValue = (double)double.Parse(field.Extra["min"]);

            CheckMinMax();
        }
Example #2
0
 public BaseDataViewModel(BaseData baseData)
 {
     this.Model = baseData;
 }