private void EntityPropertyProviderOnOnLockedLayerEventHandler(object sender, SmartEntityProperty e)
 {
     _hasObjectOnLockedLayer = true;
 }
 /// <summary>
 /// Добавление свойства <see cref="SmartEntityProperty"/> в коллекцию
 /// </summary>
 /// <param name="property">Свойство <see cref="SmartEntityProperty"/></param>
 public void AddProperty(SmartEntityProperty property)
 {
     property.PropertyChanged += Property_PropertyChanged;
     EntityPropertyDataCollection.Add(property);
 }
        private void Create(BlockReference blockReference)
        {
            if (blockReference == null)
            {
                _blkRefObjectId = ObjectId.Null;
                return;
            }

            var intellectualEntity = EntityReaderService.Instance.GetFromEntity(blockReference);

            if (intellectualEntity != null)
            {
                _intellectualEntity = intellectualEntity;

                var entityType = intellectualEntity.GetType();
                EntityType = entityType;
                foreach (var propertyInfo in entityType.GetProperties().Where(x => x.GetCustomAttribute <EntityPropertyAttribute>() != null))
                {
                    var attribute = propertyInfo.GetCustomAttribute <EntityPropertyAttribute>();
                    if (attribute != null)
                    {
                        if (attribute.Name == "Style")
                        {
                            var property = new SmartEntityProperty(
                                attribute,
                                entityType,
                                StyleManager.GetStyleNameByGuid(entityType, _intellectualEntity.StyleGuid),
                                _blkRefObjectId);
                            property.PropertyChanged += Property_PropertyChanged;
                            Properties.Add(property);
                        }
                        else if (attribute.Name == "LayerName")
                        {
                            var property = new SmartEntityProperty(
                                attribute,
                                entityType,
                                blockReference.Layer,
                                _blkRefObjectId);
                            property.PropertyChanged += Property_PropertyChanged;
                            Properties.Add(property);
                        }
                        else if (attribute.Name == "LineType")
                        {
                            var property = new SmartEntityProperty(
                                attribute,
                                entityType,
                                blockReference.Linetype,
                                _blkRefObjectId);
                            property.PropertyChanged += Property_PropertyChanged;
                            Properties.Add(property);
                        }
                        else
                        {
                            var value = propertyInfo.GetValue(intellectualEntity);
                            if (value != null)
                            {
                                var property = new SmartEntityProperty(
                                    attribute,
                                    entityType,
                                    value,
                                    _blkRefObjectId);
                                property.PropertyChanged += Property_PropertyChanged;
                                Properties.Add(property);
                            }
                        }
                    }
                }
            }
        }