using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServices; using Biff8Excel.Interfaces; namespace Biff8Excel.Records { [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)] struct RecordDimensions { public ushort opcode ; public ushort length; public uint firstRow; public uint lastRow; public ushort firstCol; public ushort lastCol; public ushort zero; // last 2 bytes not used } internal class Dimensions : IRecords { RecordDimensions dimensions; public Dimensions() { dimensions.opcode = 0x200; dimensions.length = 0xE; dimensions.zero = 0x0; } public ushort ID { get {return dimensions.opcode;} } public uint FirstRow { set { dimensions.firstRow = value; } } public uint LastRow { set { dimensions.lastRow = value; } } public ushort FirstColumn { set {dimensions.firstCol = value;} } public ushort LastColumn { set {dimensions.lastCol = value;} } #region IRecords ³ΙΤ± public byte[] GetByte() { return Globals.GetStructToBytes(dimensions); } #endregion } }