public void DestroyExtendedProperties() { if (this.extendedProperties != null) { this.extendedProperties.OnDestroy(); this.extendedProperties = null; } }
public EntityExtendedProperties CreateExtendedProperties(Type extendedPropertiesClass) { this.DestroyExtendedProperties(); ConstructorInfo constructor = extendedPropertiesClass.GetConstructor(new Type[0]); this.extendedProperties = (EntityExtendedProperties)constructor.Invoke(null); this.extendedProperties.zT = this; return(this.extendedProperties); }
protected internal virtual void OnSave(TextBlock block) { string text = this.Owner.Type.Name; if (this.Owner.Name != "") { text += string.Format(" ({0})", this.Owner.Name); } text = string.Format("Entity: \"{0}\"; ExtendedProperties", text); foreach (EntityExtendedProperties.AT current in EntityExtendedProperties.A(base.GetType())) { if ( /*EntitySystemWorld.Instance.isEntityExtendedPropertiesSerializable(current.supportedSerializationTypes) && */ !EntityHelper.SaveFieldValue(true, this, current.field, block, null, text)) { break; } } }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { Entity ownerEntity = null; EntityCustomTypeDescriptor entityCustomTypeDescriptor = context.Instance as EntityCustomTypeDescriptor; if (entityCustomTypeDescriptor != null) { ownerEntity = entityCustomTypeDescriptor.Entity; } EntityExtendedProperties entityExtendedProperties = context.Instance as EntityExtendedProperties; if (entityExtendedProperties != null) { ownerEntity = entityExtendedProperties.Owner; } Type propertyType = context.PropertyDescriptor.PropertyType; Entity result = (Entity)value; if (DesignerInterface.Instance.EntityUITypeEditorEditValue(ownerEntity, propertyType, ref result)) { return(result); } return(value); }
public void Editor_ReplaceExtendedProperties(EntityExtendedProperties extendedProperties) { this.extendedProperties = extendedProperties; }