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 RecordLabel { public ushort opcode; // 0x0204 public ushort length; public ushort row; public ushort col; public ushort xf; // 0xF; public ushort TextLength; } internal class Label : IRecords { RecordLabel label; public Label() { label.opcode = 0x0204; label.xf = 0xf; } public ushort Row { set { label.row = value; } } public ushort Column { set { label.col = value; } } public ushort CellStyle { set { label.xf = value; } } public string LabelCaption { set { if (value == null) return; label.TextLength = (ushort)Globals.GetDefaultBytesLength(value); label.length = (ushort)(8 + label.TextLength); } } #region IRecords ³ΙΤ± public byte[] GetByte() { return Globals.GetStructToBytes(label); } #endregion } }