/// <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); } }
/// <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); }
/// <inheritdoc/> public void Deserialize(FRReader reader) { Clear(); while (reader.NextItem()) { CrossViewCellDescriptor d = new CrossViewCellDescriptor(); reader.Read(d); Add(d); } }
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(); }
/// <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; } }
/// <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); } }
/// <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)); }
/// <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)); }
/// <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); }
/// <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)); }