Exemplo n.º 1
0
        /// <summary>
        /// Removes the specified descriptor from the collection.
        /// </summary>
        /// <param name="value">Descriptor to remove.</param>
        internal void Remove(CrossViewCellDescriptor value)
        {
            int i = IndexOf(value);

            if (i != -1)
            {
                List.RemoveAt(i);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Copies the elements of this collection to a new array.
 /// </summary>
 /// <returns>An array containing copies of this collection elements. </returns>
 internal CrossViewCellDescriptor[] ToArray()
 {
     CrossViewCellDescriptor[] result = new CrossViewCellDescriptor[Count];
     for (int i = 0; i < Count; i++)
     {
         result[i] = this[i];
     }
     return(result);
 }
Exemplo n.º 3
0
 /// <inheritdoc/>
 public void Deserialize(FRReader reader)
 {
     Clear();
     while (reader.NextItem())
     {
         CrossViewCellDescriptor d = new CrossViewCellDescriptor();
         reader.Read(d);
         Add(d);
     }
 }
Exemplo n.º 4
0
 internal void CreateOtherDescriptor()
 {
     titleDescriptor               = new CrossViewDescriptor();
     xAxisFieldCaptionDescriptor   = new CrossViewDescriptor();
     yAxisFieldCaptionDescriptor   = new CrossViewDescriptor();
     noColumnsDescriptor           = new CrossViewHeaderDescriptor();
     noColumnsDescriptor.cell      = 0;
     noColumnsDescriptor.cellsize  = 1;
     noColumnsDescriptor.level     = 0;
     noColumnsDescriptor.levelsize = 1;
     noRowsDescriptor              = new CrossViewHeaderDescriptor();
     noRowsDescriptor.cell         = 0;
     noRowsDescriptor.cellsize     = 1;
     noRowsDescriptor.level        = 0;
     noRowsDescriptor.levelsize    = 1;
     noCellsDescriptor             = new CrossViewCellDescriptor();
 }
Exemplo n.º 5
0
        /// <inheritdoc/>
        public override void Assign(CrossViewDescriptor source)
        {
            base.Assign(source);
            CrossViewCellDescriptor src = source as CrossViewCellDescriptor;

            if (src != null)
            {
                isXTotal      = src.isXTotal;
                isYTotal      = src.isYTotal;
                isXGrandTotal = src.isXGrandTotal;
                isYGrandTotal = src.isYGrandTotal;
                xFieldName    = src.xFieldName;
                yFieldName    = src.yFieldName;
                measureName   = src.measureName;
                x             = src.x;
                y             = src.y;
            }
        }
Exemplo n.º 6
0
        /// <inheritdoc/>
        public override void Serialize(FRWriter writer)
        {
            CrossViewCellDescriptor c = writer.DiffObject as CrossViewCellDescriptor;

            base.Serialize(writer);
            writer.ItemName = "Cell";
            if (IsXTotal != c.IsXTotal)
            {
                writer.WriteBool("IsXTotal", IsXTotal);
            }
            if (IsYTotal != c.IsYTotal)
            {
                writer.WriteBool("IsYTotal", IsYTotal);
            }
            if (IsXGrandTotal != c.IsXGrandTotal)
            {
                writer.WriteBool("IsXGrandTotal", IsXGrandTotal);
            }
            if (IsYGrandTotal != c.IsYGrandTotal)
            {
                writer.WriteBool("IsYGrandTotal", IsYGrandTotal);
            }
            if (XFieldName != c.XFieldName)
            {
                writer.WriteStr("XFieldName", XFieldName);
            }
            if (YFieldName != c.YFieldName)
            {
                writer.WriteStr("YFieldName", YFieldName);
            }
            if (MeasureName != c.MeasureName)
            {
                writer.WriteStr("MeasureName", MeasureName);
            }
            if (X != c.X)
            {
                writer.WriteInt("X", X);
            }
            if (Y != c.Y)
            {
                writer.WriteInt("Y", Y);
            }
        }
Exemplo n.º 7
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>
 internal bool Contains(CrossViewCellDescriptor value)
 {
     return(List.Contains(value));
 }
Exemplo n.º 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>
 internal int IndexOf(CrossViewCellDescriptor value)
 {
     return(List.IndexOf(value));
 }
Exemplo n.º 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>
 internal void Insert(int index, CrossViewCellDescriptor value)
 {
     List.Insert(index, value);
 }
Exemplo n.º 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>
 internal int Add(CrossViewCellDescriptor value)
 {
     return(List.Add(value));
 }