/// <summary> /// Removes the first occurrence of a specific object from the PropertySpecCollection. /// </summary> /// <param name="obj">The PropertySpec to remove from the PropertySpecCollection.</param> public void Remove(PropertySpec obj) { innerArray.Remove(obj); }
public PropertySpecDescriptor(PropertySpec item, PropertyBag bag, string name, Attribute[] attrs) : base(name, attrs) { this.bag = bag; this.item = item; }
/// <summary> /// Searches for the specified PropertySpec and returns the zero-based index of the first /// occurrence within the entire PropertySpecCollection. /// </summary> /// <param name="value">The PropertySpec to locate in the PropertySpecCollection.</param> /// <returns>The zero-based index of the first occurrence of value within the entire PropertySpecCollection, /// if found; otherwise, -1.</returns> public int IndexOf(PropertySpec value) { return innerArray.IndexOf(value); }
/// <summary> /// Inserts a PropertySpec object into the PropertySpecCollection at the specified index. /// </summary> /// <param name="index">The zero-based index at which value should be inserted.</param> /// <param name="value">The PropertySpec to insert.</param> public void Insert(int index, PropertySpec value) { innerArray.Insert(index, value); }
/// <summary> /// Copies the entire PropertySpecCollection to a compatible one-dimensional Array, starting at the /// beginning of the target array. /// </summary> /// <param name="array">The one-dimensional Array that is the destination of the elements copied /// from PropertySpecCollection. The Array must have zero-based indexing.</param> public void CopyTo(PropertySpec[] array) { innerArray.CopyTo(array); }
/// <summary> /// Copies the PropertySpecCollection or a portion of it to a one-dimensional array. /// </summary> /// <param name="array">The one-dimensional Array that is the destination of the elements copied /// from the collection.</param> /// <param name="index">The zero-based index in array at which copying begins.</param> public void CopyTo(PropertySpec[] array, int index) { innerArray.CopyTo(array, index); }
/// <summary> /// Adds the elements of an array of PropertySpec objects to the end of the PropertySpecCollection. /// </summary> /// <param name="array">The PropertySpec array whose elements should be added to the end of the /// PropertySpecCollection.</param> public void AddRange(PropertySpec[] array) { innerArray.AddRange(array); }
/// <summary> /// Determines whether a PropertySpec is in the PropertySpecCollection. /// </summary> /// <param name="item">The PropertySpec to locate in the PropertySpecCollection. The element to locate /// can be a null reference (Nothing in Visual Basic).</param> /// <returns>true if item is found in the PropertySpecCollection; otherwise, false.</returns> public bool Contains(PropertySpec item) { return(innerArray.Contains(item)); }
/// <summary> /// Adds a PropertySpec to the end of the PropertySpecCollection. /// </summary> /// <param name="value">The PropertySpec to be added to the end of the PropertySpecCollection.</param> /// <returns>The PropertySpecCollection index at which the value has been added.</returns> public int Add(PropertySpec value) { int index = innerArray.Add(value); return index; }
/// <summary> /// Searches for the specified PropertySpec and returns the zero-based index of the first /// occurrence within the entire PropertySpecCollection. /// </summary> /// <param name="value">The PropertySpec to locate in the PropertySpecCollection.</param> /// <returns>The zero-based index of the first occurrence of value within the entire PropertySpecCollection, /// if found; otherwise, -1.</returns> public int IndexOf(PropertySpec value) { return(innerArray.IndexOf(value)); }
/// <summary> /// Adds property grid accessible properties mTo the connection /// </summary> public override void AddProperties() { base.AddProperties (); bag.Properties.Add(new PropertySpec("LineColor",typeof(Color),"Appearance","Gets or sets the backcolor of the label.")); bag.Properties.Add(new PropertySpec("ShowLabel",typeof(bool),"Appearance","Gets or sets whether the label will be shown.")); bag.Properties.Add(new PropertySpec("LineWeight",typeof(ConnectionWeight),"Appearance","Gets or sets the line weight.")); bag.Properties.Add(new PropertySpec("LineStyle",typeof(DashStyle),"Appearance","Gets or sets the line style.")); bag.Properties.Add(new PropertySpec("LineEnd",typeof(ConnectionEnds),"Appearance","Gets or sets the line end type.")); //bag.Properties.Add(new PropertySpec("LinePath",typeof(string),"Appearance","Gets or sets the line shape.","Default",typeof(ConnectionStyleEditor),typeof(TypeConverter))); PropertySpec spec = new PropertySpec("LinePath",typeof(string),"Appearance","Gets or sets the line shape.","Default",typeof(ConnectionStyleEditor),typeof(TypeConverter)); ArrayList list = new ArrayList(); for(int k=0; k<this.Site.Libraries.Count;k++) { for(int m=0; m<this.Site.Libraries[k].ConnectionSummaries.Count; m++) list.Add(Site.Libraries[k].ConnectionSummaries[m].ConnectionName); } spec.Attributes = new Attribute[]{ new ConnectionStyleAttribute(list)}; bag.Properties.Add(spec); }
/// <summary> /// Determines whether a PropertySpec is in the PropertySpecCollection. /// </summary> /// <param name="item">The PropertySpec to locate in the PropertySpecCollection. The element to locate /// can be a null reference (Nothing in Visual Basic).</param> /// <returns>true if item is found in the PropertySpecCollection; otherwise, false.</returns> public bool Contains(PropertySpec item) { return innerArray.Contains(item); }
/// <summary> /// Initializes a new instance of the PropertySpecEventArgs class. /// </summary> /// <param name="property">The PropertySpec that represents the property whose /// value is being requested or set.</param> /// <param name="val">The current value of the property.</param> public PropertySpecEventArgs(PropertySpec property, object val) { this.property = property; this.val = val; }
/// <summary> /// Adds a PropertySpec to the end of the PropertySpecCollection. /// </summary> /// <param name="value">The PropertySpec to be added to the end of the PropertySpecCollection.</param> /// <returns>The PropertySpecCollection index at which the value has been added.</returns> public int Add(PropertySpec value) { int index = innerArray.Add(value); return(index); }