Ejemplo n.º 1
0
        public IPropertyBoolImpl(string caption, string name, string owner,
                                 Constraint <bool> constraint,
                                 eAttributeTarget attributeType             = eAttributeTarget.DataConnection,
                                 eAttributeRequirement attributeRequirement = eAttributeRequirement.User | eAttributeRequirement.Optional,
                                 bool defaultValue = false, string group = "")
            : base(caption, name, owner, attributeType, attributeRequirement)
        {
            _Domain.Constraint = constraint;

            if (constraint != null)
            {
                switch (constraint.ConstraintType)
                {
                case ConstraintTest.InRange:
                    _DomainType = eAttributeDomainType.Numerical | eAttributeDomainType.Enumeration;
                    break;

                case ConstraintTest.MinMax:
                    _DomainType = eAttributeDomainType.Numerical | eAttributeDomainType.Ordinal;
                    break;

                default:
                    _DomainType = eAttributeDomainType.Numerical;
                    break;
                } //switch(constraint.ConstraintType)
            }
            else
            {
                _DomainType = eAttributeDomainType.Numerical;
            }

            Value  = defaultValue.ToString();
            _Group = group;
        } //public IPersoIntAttributeImpl(
Ejemplo n.º 2
0
 public IPropertyImpl(string caption, string name, string owner,
                      eAttributeTarget attributeTarget           = eAttributeTarget.DataConnection,
                      eAttributeRequirement attributeRequirement = eAttributeRequirement.User | eAttributeRequirement.Optional)
 {
     _Caption              = caption;
     _Name                 = name;
     _Owner                = owner;
     _AttributeTarget      = attributeTarget;
     _AttributeRequirement = attributeRequirement;
 }
Ejemplo n.º 3
0
        public IPropertyUriFileOrPathImpl(string caption, string name, string owner,
                                          Constraint <string> constraint,
                                          eAttributeTarget attributeType             = eAttributeTarget.DataConnection,
                                          eAttributeRequirement attributeRequirement = eAttributeRequirement.User | eAttributeRequirement.Optional,
                                          eAttributeDomainType attributeDomainType   = eAttributeDomainType.URI,
                                          string defaultValue = "", string group = "")
            : base(caption, name, owner, constraint, attributeType, attributeRequirement)
        {
            _DomainType = attributeDomainType;

            Value  = defaultValue;
            _Group = group;
        }
Ejemplo n.º 4
0
        public IPropertyStringImpl(string caption, string name, string owner,
                                   Constraint <string> constraint,
                                   eAttributeTarget attributeType             = eAttributeTarget.DataConnection,
                                   eAttributeRequirement attributeRequirement = eAttributeRequirement.User | eAttributeRequirement.Optional,
                                   string defaultValue = "", string group = "")
            : base(caption, name, owner, attributeType, attributeRequirement)
        {
            _Domain.Constraint = constraint;

            if (constraint != null)
            {
                switch (constraint.ConstraintType)
                {
                case ConstraintTest.InRange:
                    _DomainType = eAttributeDomainType.AlfaNumerical | eAttributeDomainType.Enumeration;
                    break;

                case ConstraintTest.MinMax:
                    _DomainType = eAttributeDomainType.AlfaNumerical | eAttributeDomainType.Ordinal;
                    break;

                case ConstraintTest.ValidPath:
                case ConstraintTest.ValidPathFileName:
                    _DomainType = eAttributeDomainType.AlfaNumerical | eAttributeDomainType.URI;
                    break;

                default:
                    _DomainType = eAttributeDomainType.AlfaNumerical;
                    break;
                } //switch(constraint.ConstraintType)
            }
            else
            {
                _DomainType = eAttributeDomainType.AlfaNumerical;
            }

            Value  = defaultValue;
            _Group = group;
        }