using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace HH.WMS.Utils.ExcelLibrary.BinaryFileFormat
{
public partial class DIMENSIONS : Record
{
public DIMENSIONS(Record record) : base(record) { }
public DIMENSIONS()
{
this.Type = RecordType.DIMENSIONS;
}
///
/// Index to first used row
///
public Int32 FirstRow;
///
/// Index to last used row, increased by 1
///
public Int32 LastRow;
///
/// Index to first used column
///
public Int16 FirstColumn;
///
/// Index to last used column, increased by 1
///
public Int16 LastColumn;
///
/// Not used
///
public Int16 UnUsed;
public override void Decode()
{
MemoryStream stream = new MemoryStream(Data);
BinaryReader reader = new BinaryReader(stream);
this.FirstRow = reader.ReadInt32();
this.LastRow = reader.ReadInt32();
this.FirstColumn = reader.ReadInt16();
this.LastColumn = reader.ReadInt16();
this.UnUsed = reader.ReadInt16();
}
public override void Encode()
{
MemoryStream stream = new MemoryStream();
BinaryWriter writer = new BinaryWriter(stream);
writer.Write(FirstRow);
writer.Write(LastRow);
writer.Write(FirstColumn);
writer.Write(LastColumn);
writer.Write(UnUsed);
this.Data = stream.ToArray();
this.Size = (UInt16)Data.Length;
base.Encode();
}
}
}