コード例 #1
0
ファイル: StyleSheet.cs プロジェクト: zixing131/LAEACC
        /// <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);
            }
        }
コード例 #2
0
ファイル: StyleSheet.cs プロジェクト: zixing131/LAEACC
 /// <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);
     }
 }
コード例 #3
0
ファイル: StyleCollection.cs プロジェクト: zixing131/LAEACC
        /// <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);
        }
コード例 #4
0
 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]);
     }
 }
コード例 #5
0
ファイル: StyleSheet.cs プロジェクト: zixing131/LAEACC
 /// <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);
 }
コード例 #6
0
 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);
         }
     }
 }
コード例 #7
0
ファイル: StyleSheet.cs プロジェクト: zixing131/LAEACC
 /// <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));
 }
コード例 #8
0
ファイル: StyleSheet.cs プロジェクト: zixing131/LAEACC
 /// <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);
 }
コード例 #9
0
ファイル: StyleSheet.cs プロジェクト: zixing131/LAEACC
 /// <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));
 }
コード例 #10
0
ファイル: StyleSheet.cs プロジェクト: zixing131/LAEACC
 /// <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);
 }