예제 #1
0
 /// <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, HighlightCondition value)
 {
     if (value != null)
     {
         List.Insert(index, value);
     }
 }
예제 #2
0
 /// <summary>
 /// Removes the specified object from the collection.
 /// </summary>
 /// <param name="value">Object to remove.</param>
 public void Remove(HighlightCondition value)
 {
     if (Contains(value))
     {
         List.Remove(value);
     }
 }
예제 #3
0
        /// <summary>
        /// Creates exact copy of this condition.
        /// </summary>
        /// <returns>A copy of this condition.</returns>
        public HighlightCondition Clone()
        {
            HighlightCondition result = new HighlightCondition();

            result.Assign(this);
            return(result);
        }
예제 #4
0
 /// <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(HighlightCondition value)
 {
     if (value == null)
     {
         return(-1);
     }
     return(List.Add(value));
 }
예제 #5
0
        /// <inheritdoc/>
        public override bool Equals(object obj)
        {
            HighlightCondition c = obj as HighlightCondition;

            return(c != null && Expression == c.Expression && Border.Equals(c.Border) && Fill.Equals(c.Fill) &&
                   TextFill.Equals(c.TextFill) && Font.Equals(c.Font) && Visible == c.Visible &&
                   ApplyBorder == c.ApplyBorder && ApplyFill == c.ApplyFill && ApplyTextFill == c.ApplyTextFill &&
                   ApplyFont == c.ApplyFont);
        }
예제 #6
0
 /// <inheritdoc/>
 public void Deserialize(FRReader reader)
 {
     Clear();
     while (reader.NextItem())
     {
         HighlightCondition c = new HighlightCondition();
         reader.Read(c);
         Add(c);
     }
 }
예제 #7
0
 internal void ApplyCondition(HighlightCondition c)
 {
     if (c.ApplyBorder)
     {
         Border = c.Border.Clone();
     }
     if (c.ApplyFill)
     {
         Fill = c.Fill.Clone();
     }
     if (!c.Visible)
     {
         Visible = false;
     }
 }
예제 #8
0
        /// <inheritdoc/>
        public override void Serialize(FRWriter writer)
        {
            HighlightCondition c = writer.DiffObject as HighlightCondition;

            writer.ItemName = "Condition";

            if (Expression != c.Expression)
            {
                writer.WriteStr("Expression", Expression);
            }
            if (Visible != c.Visible)
            {
                writer.WriteBool("Visible", Visible);
            }

            base.Serialize(writer);
        }
예제 #9
0
 /// <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(HighlightCondition value)
 {
     return(List.Contains(value));
 }
예제 #10
0
 /// <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(HighlightCondition value)
 {
     return(List.IndexOf(value));
 }