Exemple #1
0
        /// <inheritdoc/>
        public override void Serialize(FRWriter writer)
        {
            MatrixHeaderDescriptor c = writer.DiffObject as MatrixHeaderDescriptor;

            base.Serialize(writer);

            writer.ItemName = "Header";
            if (Sort != c.Sort)
            {
                writer.WriteValue("Sort", Sort);
            }
            if (Totals != c.Totals)
            {
                writer.WriteBool("Totals", Totals);
            }
            if (TotalsFirst != c.TotalsFirst)
            {
                writer.WriteBool("TotalsFirst", TotalsFirst);
            }
            if (PageBreak != c.PageBreak)
            {
                writer.WriteBool("PageBreak", PageBreak);
            }
            if (SuppressTotals != c.SuppressTotals)
            {
                writer.WriteBool("SuppressTotals", SuppressTotals);
            }
        }
Exemple #2
0
        /// <summary>
        /// Removes the specified descriptor from the collection.
        /// </summary>
        /// <param name="value">Descriptor to remove.</param>
        public void Remove(MatrixHeaderDescriptor value)
        {
            int i = IndexOf(value);

            if (i != -1)
            {
                List.RemoveAt(i);
            }
        }
Exemple #3
0
 /// <summary>
 /// Copies the elements of this collection to a new array.
 /// </summary>
 /// <returns>An array containing copies of this collection elements. </returns>
 public MatrixHeaderDescriptor[] ToArray()
 {
     MatrixHeaderDescriptor[] result = new MatrixHeaderDescriptor[Count];
     for (int i = 0; i < Count; i++)
     {
         result[i] = this[i];
     }
     return(result);
 }
Exemple #4
0
 /// <inheritdoc/>
 public void Deserialize(FRReader reader)
 {
     Clear();
     while (reader.NextItem())
     {
         MatrixHeaderDescriptor d = new MatrixHeaderDescriptor();
         reader.Read(d);
         Add(d);
     }
 }
Exemple #5
0
 public MatrixHelper(MatrixObject matrix)
 {
     this.matrix                     = matrix;
     titleDescriptor                 = new MatrixDescriptor();
     cellHeaderDescriptor            = new MatrixDescriptor();
     cellHeaderDescriptor.Expression = "Data";
     noColumnsDescriptor             = new MatrixHeaderDescriptor("", false);
     noRowsDescriptor                = new MatrixHeaderDescriptor("", false);
     noCellsDescriptor               = new MatrixCellDescriptor();
 }
Exemple #6
0
 public MatrixHelper(MatrixObject matrix)
 {
     FMatrix                          = matrix;
     FTitleDescriptor                 = new MatrixDescriptor();
     FCellHeaderDescriptor            = new MatrixDescriptor();
     FCellHeaderDescriptor.Expression = "Data";
     FNoColumnsDescriptor             = new MatrixHeaderDescriptor("", false);
     FNoRowsDescriptor                = new MatrixHeaderDescriptor("", false);
     FNoCellsDescriptor               = new MatrixCellDescriptor();
 }
Exemple #7
0
        /// <inheritdoc/>
        public override void Assign(MatrixDescriptor source)
        {
            base.Assign(source);
            MatrixHeaderDescriptor src = source as MatrixHeaderDescriptor;

            if (src != null)
            {
                Sort              = src.Sort;
                Totals            = src.Totals;
                TotalsFirst       = src.TotalsFirst;
                PageBreak         = src.PageBreak;
                SuppressTotals    = src.SuppressTotals;
                TemplateTotalCell = src.TemplateTotalCell;
            }
        }
Exemple #8
0
 /// <summary>
 /// Returns the zero-based index of the first occurrence of a descriptor.
 /// </summary>
 /// <param name="value">The descriptor to locate in the collection.</param>
 /// <returns>The zero-based index of the first occurrence of descriptor within
 /// the entire collection, if found; otherwise, -1.</returns>
 public int IndexOf(MatrixHeaderDescriptor value)
 {
     return(List.IndexOf(value));
 }
Exemple #9
0
 /// <summary>
 /// Inserts a descriptor 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 descriptor to insert.</param>
 public void Insert(int index, MatrixHeaderDescriptor value)
 {
     List.Insert(index, value);
 }
Exemple #10
0
 /// <summary>
 /// Adds a descriptor to the end of this collection.
 /// </summary>
 /// <param name="value">Descriptor to add.</param>
 /// <returns>Index of the added descriptor.</returns>
 public int Add(MatrixHeaderDescriptor value)
 {
     return(List.Add(value));
 }
Exemple #11
0
 /// <summary>
 /// Determines whether a descriptor is in the collection.
 /// </summary>
 /// <param name="value">The descriptor to locate in the collection.</param>
 /// <returns><b>true</b> if descriptor is found in the collection; otherwise, <b>false</b>.</returns>
 public bool Contains(MatrixHeaderDescriptor value)
 {
     return(List.Contains(value));
 }