using System; using System.Collections.Generic; using System.Text; using System.IO; namespace HH.WMS.Utils.ExcelLibrary.BinaryFileFormat { public partial class MULBLANK : Record { public MULBLANK(Record record) : base(record) { } public MULBLANK() { this.Type = RecordType.MULBLANK; this.XFIndice = new List(); } /// /// Index to row /// public UInt16 RowIndex; /// /// Index to first column (fc) /// public UInt16 FirstColIndex; /// /// List of nc=lc-fc+1 16-bit indexes to XF records /// public List XFIndice; /// /// Index to last column (lc) /// public Int16 LastColIndex; public override void Decode() { MemoryStream stream = new MemoryStream(Data); BinaryReader reader = new BinaryReader(stream); this.RowIndex = reader.ReadUInt16(); this.FirstColIndex = reader.ReadUInt16(); int count = (this.Size - 6) / 2; this.XFIndice = new List(count); for (int i = 0; i < count; i++) { XFIndice.Add(reader.ReadUInt16()); } this.LastColIndex = reader.ReadInt16(); } public override void Encode() { MemoryStream stream = new MemoryStream(); BinaryWriter writer = new BinaryWriter(stream); writer.Write(RowIndex); writer.Write(FirstColIndex); foreach(UInt16 uint16Var in XFIndice) { writer.Write(uint16Var); } writer.Write(LastColIndex); this.Data = stream.ToArray(); this.Size = (UInt16)Data.Length; base.Encode(); } } }