/// <summary> /// Removes the specified object from the collection. /// </summary> /// <param name="value">Object to remove.</param> public void Remove(StyleCollection value) { int i = IndexOf(value); if (i != -1) { List.RemoveAt(i); } }
/// <summary> /// Deserializes the collection. /// </summary> /// <param name="reader">Reader object.</param> /// <remarks> /// This method is for internal use only. /// </remarks> public void Deserialize(FRReader reader) { while (reader.NextItem()) { StyleCollection s = new StyleCollection(); reader.Read(s); Add(s); } }
/// <summary> /// Creates exact copy of this collection. /// </summary> /// <returns>The copy of this collection.</returns> public StyleCollection Clone() { StyleCollection result = new StyleCollection(); foreach (Style s in this) { result.Add(s.Clone()); } return(result); }
internal void ApplyStyle(string style) { if (!String.IsNullOrEmpty(style) && Report != null) { StyleCollection styles = Report.Styles; int index = styles.IndexOf(style); if (index != -1) ApplyStyle(styles[index]); } }
/// <summary> /// Returns the zero-based index of the first occurrence of a style collection with specified name. /// </summary> /// <param name="value">The style collection name to locate in the collection.</param> /// <returns>The zero-based index of the first occurrence of value within the entire collection, if found; /// otherwise, -1.</returns> public int IndexOf(string value) { for (int i = 0; i < Count; i++) { StyleCollection s = this[i]; if (String.Compare(s.Name, value, true) == 0) { return(i); } } return(-1); }
internal void ApplyEvenStyle() { if (!String.IsNullOrEmpty(EvenStyle) && Report != null) { StyleCollection styles = Report.Styles; int index = styles.IndexOf(EvenStyle); if (index != -1) { Style style = styles[index]; if (EvenStylePriority == StylePriority.UseFill) Fill = style.Fill.Clone(); else ApplyStyle(style); } } }
/// <summary> /// Returns the zero-based index of the first occurrence of an object. /// </summary> /// <param name="value">The object to locate in the collection.</param> /// <returns>The zero-based index of the first occurrence of value within the entire collection, if found; /// otherwise, -1.</returns> public int IndexOf(StyleCollection value) { return(List.IndexOf(value)); }
/// <summary> /// Inserts an object into this collection at the specified index. /// </summary> /// <param name="index">The zero-based index at which value should be inserted.</param> /// <param name="value">The object to insert.</param> public void Insert(int index, StyleCollection value) { List.Insert(index, value); }
/// <summary> /// Adds an object to the end of this collection. /// </summary> /// <param name="value">Object to add.</param> /// <returns>Index of the added object.</returns> public int Add(StyleCollection value) { return(List.Add(value)); }
/// <summary> /// Determines whether an element is in the collection. /// </summary> /// <param name="value">The object to locate in the collection.</param> /// <returns><b>true</b> if object is found in the collection; otherwise, <b>false</b>.</returns> public bool Contains(StyleCollection value) { return(IndexOf(value) != -1); }