Window2.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 RecordWindows2
  10. {
  11. public ushort opcode;
  12. public ushort length;
  13. public ushort optionflags;
  14. public ushort firstvisiblerow;
  15. public ushort firstvisiblecol;
  16. public ushort gridlinecolourindex;
  17. public ushort notused;
  18. public ushort cached1;
  19. public ushort cached2;
  20. public uint notused2;
  21. }
  22. internal class Windows2 : IRecords
  23. {
  24. RecordWindows2 windows2;
  25. public Windows2()
  26. {
  27. windows2.opcode = 0x23E;
  28. windows2.length = 0x12;
  29. windows2.notused = 0x0;
  30. windows2.notused2 = 0x0;
  31. windows2.cached1 = 0x0;
  32. windows2.cached2 = 0x0;
  33. }
  34. //public ushort ID
  35. //{
  36. // get { return windows2.opcode; }
  37. //}
  38. //public ushort RecordSize
  39. //{
  40. // get { return 22; }
  41. //}
  42. public ushort OptionalFlags
  43. {
  44. set { windows2.optionflags = value; }
  45. }
  46. public ushort FirstVisibleRow
  47. {
  48. set { windows2.firstvisiblerow = value; }
  49. }
  50. public ushort FirstVisibleColumn
  51. {
  52. set { windows2.firstvisiblecol = value; }
  53. }
  54. public ushort GridLineColour
  55. {
  56. set { windows2.gridlinecolourindex = value; }
  57. }
  58. #region IRecords ³ÉÔ±
  59. public byte[] GetByte()
  60. {
  61. return Globals.GetStructToBytes(windows2);
  62. }
  63. #endregion
  64. }
  65. }