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 RecordFooter { public ushort opcode; public ushort length; public ushort TextLength; [MarshalAs(UnmanagedType.U1, SizeConst = 1)] public byte zero; } internal class Footer : IRecords { RecordFooter footer; byte[] m_footer; public Footer() { footer.opcode = 0x15; footer.zero = 0x1; } public byte[] Foot { set { m_footer = value; } } public ushort TextLength { set { footer.TextLength = value; } } #region IRecords ³ΙΤ± public byte[] GetByte() { byte[] b; int len = m_footer.Length + 7; b = new byte[len]; footer.length = (ushort)(len - 4); //footer.TextLength = (ushort)(len - 7); Globals.GetStructToBytes(footer).CopyTo(b, 0); m_footer.CopyTo(b, 7); return b; } #endregion } }