// Construct a property as a copy of another. public Property(Property copy) { name = copy.name; type = copy.type; objectValue = copy.objectValue; nextSibling = null; firstChild = null; documentation = null; action = copy.action; properties = null; baseProperty = null; if (copy.firstChild != null) { firstChild = new Property(copy.firstChild); } if (copy.nextSibling != null) { nextSibling = new Property(copy.nextSibling); } if (copy.documentation != null) { documentation = new PropertyDocumentation(copy.documentation); } }
//----------------------------------------------------------------------------- // Mutators //----------------------------------------------------------------------------- /* * // Set the value of this property by another property. * // NOTE: This won't work with lists. * public void SetValue(Property other) { * if (type == PropertyType.List || other.type == PropertyType.List) { * Console.WriteLine("ERROR: Lists not fully supported in properties yet!"); * return; * } * type = other.type; * ObjectValue = other.objectValue; * } * * // Set the value of the property with an object and a type. * public void SetValue(object value, PropertyType type) { * this.type = type; * this.ObjectValue = value; * } * * // Set the value as a boolean. * public void SetValue(bool value) { * BoolValue = value; * } * * // Set the value as an integer. * public void SetValue(int value) { * IntValue = value; * } * * // Set the value as a float. * public void SetValue(float value) { * FloatValue = value; * } * * // Set the value as a string. * public void SetValue(string value) { * StringValue = value; * } */ // Create the documentation for this property. public Property SetDocumentation(string readableName, string editorType, string editorSubType, string category, string description, bool isEditable = true, bool isHidden = false) { documentation = new PropertyDocumentation(readableName, editorType, editorSubType, category, description, isEditable, isHidden); return(this); }
//----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- public CustomPropertyDescriptor(PropertyDocumentation documentation, UITypeEditor editor, Property property, Properties modifiedProperties) : base(documentation == null ? property.Name : documentation.ReadableName, null) { this.documentation = documentation; this.editor = editor; this.property = property; this.modifiedProperties = modifiedProperties; }
public void SetDocumentation(string name, PropertyDocumentation documentation) { Property p = GetProperty(name, false); if (p != null) { p.Documentation = documentation; } }
public PropertyDocumentation(PropertyDocumentation copy) { readableName = copy.readableName; editorType = copy.editorType; editorSubType = copy.editorSubType; category = copy.category; description = copy.description; isEditable = copy.isEditable; isHidden = copy.isHidden; }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- // Construct a property with the given name and type. public Property(string name, PropertyType type = PropertyType.String) { this.name = name; this.type = type; this.objectValue = 0; this.nextSibling = null; this.firstChild = null; this.documentation = null; this.action = null; this.properties = null; this.baseProperty = null; // Add the property action. if (Resources.ExistsResource<PropertyAction>(name)) this.action = Resources.GetResource<PropertyAction>(name); }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- // Construct a property with the given name and type. public Property(string name, PropertyType type = PropertyType.String) { this.name = name; this.type = type; this.objectValue = 0; this.nextSibling = null; this.firstChild = null; this.documentation = null; this.action = null; this.properties = null; this.baseProperty = null; // Add the property action. if (Resources.ExistsResource <PropertyAction>(name)) { this.action = Resources.GetResource <PropertyAction>(name); } }
// Construct a property as a copy of another. public Property(Property copy) { name = copy.name; type = copy.type; objectValue = copy.objectValue; nextSibling = null; firstChild = null; documentation = null; action = copy.action; properties = null; baseProperty = null; if (copy.firstChild != null) firstChild = new Property(copy.firstChild); if (copy.nextSibling != null) nextSibling = new Property(copy.nextSibling); if (copy.documentation != null) documentation = new PropertyDocumentation(copy.documentation); }
public Property SetDocumentation(string readableName, string category, string description) { documentation = new PropertyDocumentation(readableName, "", "", category, description, true, false); return this; }
//----------------------------------------------------------------------------- // Mutators //----------------------------------------------------------------------------- /* // Set the value of this property by another property. // NOTE: This won't work with lists. public void SetValue(Property other) { if (type == PropertyType.List || other.type == PropertyType.List) { Console.WriteLine("ERROR: Lists not fully supported in properties yet!"); return; } type = other.type; ObjectValue = other.objectValue; } // Set the value of the property with an object and a type. public void SetValue(object value, PropertyType type) { this.type = type; this.ObjectValue = value; } // Set the value as a boolean. public void SetValue(bool value) { BoolValue = value; } // Set the value as an integer. public void SetValue(int value) { IntValue = value; } // Set the value as a float. public void SetValue(float value) { FloatValue = value; } // Set the value as a string. public void SetValue(string value) { StringValue = value; } */ // Create the documentation for this property. public Property SetDocumentation(string readableName, string editorType, string editorSubType, string category, string description, bool isEditable = true, bool isHidden = false) { documentation = new PropertyDocumentation(readableName, editorType, editorSubType, category, description, isEditable, isHidden); return this; }
// Construct a property as a copy of another. public Property(Property copy) { name = copy.name; type = copy.type; intValue = copy.intValue; floatValue = copy.floatValue; stringValue = copy.stringValue; next = null; firstChild = null; documentation = null; action = copy.action; properties = null; if (copy.firstChild != null) firstChild = new Property(copy.firstChild); if (copy.next != null) next = new Property(copy.next); if (copy.documentation != null) documentation = new PropertyDocumentation(copy.documentation); }
//----------------------------------------------------------------------------- // Constructors //----------------------------------------------------------------------------- // Construct a property with the given name and type. public Property(string name, PropertyType type = PropertyType.String) { this.name = name; this.type = type; this.intValue = 0; this.floatValue = 0; this.stringValue = ""; this.next = null; this.firstChild = null; this.documentation = null; this.action = null; this.properties = null; if (Resources.ExistsResource<PropertyAction>(name)) this.action = Resources.GetResource<PropertyAction>(name); }
public Property SetDocumentation(string readableName, string category, string description) { documentation = new PropertyDocumentation(readableName, "", "", category, description, true, false); return(this); }