Beispiel #1
0
 public PropItemPropertyDescriptor(string propertyName, Type propertyType, Attribute[] attributes)
     : base(propertyName, attributes)
 {
     _tdConfig = new PropertyDescriptorValues <T>
                 (
         attributes: attributes,
         isReadOnly: false,
         name: propertyName,
         propertyType: propertyType,
         supportsChangeEvents: true
                 );
 }
        public PropItemFixedPropertyDescriptor
        (
            PropertyDescriptorValues <T> tdConfig,
            PSFastAccessServiceInterface psFastAccessService,
            PropModelType propModel,
            PropIdType propId
        )
            : base(tdConfig.Name, tdConfig.Attributes)
        {
            _tdConfig            = tdConfig;
            _psFastAccessService = psFastAccessService;
            _propItemSetKey      = new PropItemSetKeyType(propModel);
            PropId = propId;

            _compKey = new SimpleExKey(10, propId);
        }
Beispiel #3
0
        //public PropItemTypeDescriptor_Typed(string propertyName, Type propertyType, Attribute[] attributes)
        //    : base(propertyName, attributes)
        //{
        //    _propBag = null;
        //    _propItem = null;

        //    _tdConfig = new TypeDescriptorConfig(attributes, typeof(IPropBag), false, propertyName, propertyType, true);

        //    _children = this.GetChildProperties();
        //}

        public PropItemPropertyDescriptor_Typed(string propertyName, BagT propBag, PT propItem)
            : base(propertyName, propItem.TypedPropTemplate.Attributes)
        {
            _propItem = propItem;

            _tdConfig = new PropertyDescriptorValues <BagT>
                        (
                attributes: _propItem.TypedPropTemplate.Attributes,
                isReadOnly: false,
                name: propertyName,
                propertyType: _propItem.TypedPropTemplate.Type,
                supportsChangeEvents: true
                        );

            _children = this.GetChildProperties();
        }
        private static PropertyDescriptorValues <T> GetTdConfig(string componentName, Attribute[] attributes, PropNameType propertyName, Type propertyType)
        {
            bool isReadOnly           = false;
            bool supportsChangeEvents = true;

            //if(componentName == "PersonVM")
            //{
            //    supportsChangeEvents = false;
            //}

            //if(propertyName == "PersonListView")
            //{
            //    supportsChangeEvents = false;
            //}

            PropertyDescriptorValues <T> result = new PropertyDescriptorValues <T>(attributes, isReadOnly, propertyName, propertyType, supportsChangeEvents);

            return(result);
        }