123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- 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
- }
- }
|