using System; using System.Collections.Generic; using System.Text; namespace Biff8Excel.Excel { public enum Visibility { Visible = 0x0, Hidden = 0x1 } public class BoundSheet : IDisposable { uint m_byteOffset; // Offset in the file stream of this bundlesheet Biff8Excel.Records.BoundSheet m_boundSheet; string m_sheetname; public BoundSheet() { m_boundSheet = new Biff8Excel.Records.BoundSheet(); } /// /// 取得或设定Sheet工作表名称 /// public string SheetName { set { m_sheetname = value; m_boundSheet.StreamName = m_sheetname; } get { return m_sheetname; } } internal uint SheetOffset { set { m_boundSheet.StreamPosition = value; } } internal uint StreamOffset { set { m_byteOffset = value; } get { return m_byteOffset; } } public Visibility Visible { set { if (value == 0) m_boundSheet.Visible = (byte)Visibility.Visible; else m_boundSheet.Visible = (byte)Visibility.Hidden; } } internal byte[] WriteRecord { get { return m_boundSheet.GetByte(); } } #region IDisposable 成员 public void Dispose(bool disposed) { if (disposed) { m_boundSheet = null; m_sheetname = null; } this.Dispose(); } public void Dispose() { //GC.SuppressFinalize(this); } #endregion } }