WSBool.cs 825 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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 RecordWSBool
  10. {
  11. public ushort opcode;
  12. public ushort length;
  13. public ushort options;
  14. }
  15. internal class WSBool : IRecords
  16. {
  17. RecordWSBool wsbool;
  18. public WSBool()
  19. {
  20. wsbool.opcode = 0x81;
  21. wsbool.length = 0x2;
  22. }
  23. public ushort Options
  24. {
  25. set { wsbool.options = value; }
  26. }
  27. #region IRecords ³ÉÔ±
  28. public byte[] GetByte()
  29. {
  30. return Globals.GetStructToBytes(wsbool);
  31. }
  32. #endregion
  33. }
  34. }