SupBook.cs 907 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Runtime.InteropServices;
  5. using Biff8Excel.Interfaces;
  6. namespace Biff8Excel.Records
  7. {
  8. [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 1)]
  9. struct RecordSupBook
  10. {
  11. public ushort opcode;
  12. public ushort length;
  13. public ushort numsheets;
  14. public ushort field;
  15. }
  16. internal class SupBook : IRecords
  17. {
  18. RecordSupBook supbook;
  19. public SupBook()
  20. {
  21. supbook.opcode = 0x1AE;
  22. supbook.field = 0x401;
  23. supbook.length = 0x4;
  24. }
  25. public ushort TotalSheets
  26. {
  27. set { supbook.numsheets = value; }
  28. }
  29. #region IRecords ³ÉÔ±
  30. public byte[] GetByte()
  31. {
  32. return Globals.GetStructToBytes(supbook);
  33. }
  34. #endregion
  35. }
  36. }