123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- 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 RecordSelection
- {
- public ushort opcode;
- public ushort length;
- public ushort paneid;
- public ushort activeRow;
- public ushort activeCol;
- public ushort index;
- }
- internal class Selection : IRecords
- {
- RecordSelection selection;
- public Selection()
- {
- selection.opcode = 0x1D;
- selection.length = 0xF;
- selection.paneid = 0x3;
- selection.index = 0x0;
- }
- public ushort Row
- {
- set { selection.activeRow = value; }
- }
- public ushort Column
- {
- set { selection.activeCol = value; }
- }
- #region IRecords ³ÉÔ±
- public byte[] GetByte()
- {
- byte[] b = new byte[18];
- Globals.GetStructToBytes(selection).CopyTo(b, 0);
- BitConverter.GetBytes(selection.activeRow).CopyTo(b, 12);
- BitConverter.GetBytes(selection.activeRow).CopyTo(b, 14);
- b[16] = BitConverter.GetBytes(selection.activeCol)[0];
- b[17] = BitConverter.GetBytes(selection.activeCol)[0];
- b[18] = 0;
- return b;
- }
- #endregion
- }
- }
|