123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- 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 RecordWindows1
- {
- public ushort opcode;
- public ushort length;
- public ushort h_hold;
- public ushort v_hold;
- public ushort width;
- public ushort height;
- public ushort options;
- public ushort selectedtab;
- public ushort displayedtab;
- public ushort numselectedtabs;
- public ushort tabwidthratio;
- }
- internal class Windows1 : IRecords
- {
- RecordWindows1 windows1;
- public Windows1()
- {
- windows1.opcode = 0x3D;
- windows1.length = 0x12;
- windows1.options = 0x0;
- windows1.h_hold = 0x0;
- windows1.v_hold = 0x0;
- windows1.width = 0x3C00;
- windows1.height = 0x2D00;
- windows1.selectedtab = 0x0;
- windows1.displayedtab = 0x0;
- windows1.numselectedtabs = 0x1;
- windows1.tabwidthratio = 0x258;
- }
- public ushort ID
- {
- get { return windows1.opcode; }
- }
- public ushort RecordSize
- {
- get { return 22; }
- }
- public ushort HorizontalPosition
- {
- set { windows1.h_hold = value; }
- }
- public ushort VerticalPosition
- {
- set { windows1.v_hold = value; }
- }
- public ushort Width
- {
- set { windows1.width = value; }
- }
- public ushort Height
- {
- set { windows1.height = value; }
- }
- public ushort ActivewWorksheet
- {
- set { windows1.selectedtab = value; }
- }
- public ushort FirstVisibleWorksheet
- {
- set { windows1.displayedtab = value; }
- }
- public ushort SelectedWorksheets
- {
- set { windows1.numselectedtabs = value; }
- }
- public ushort TabWidth
- {
- set { windows1.tabwidthratio = value; }
- }
- public bool WindowsHidden
- {
- set { if (value) windows1.options = (ushort)(windows1.options | 0x1); }
- }
- internal bool Iconic
- {
- set { if (value) windows1.options = (ushort)(windows1.options | 0x2); }
- }
- public bool HorizontalScrollBar
- {
- set { if (value) windows1.options = (ushort)(windows1.options | 0x8); }
- }
- public bool VerticalScrollBar
- {
- set { if (value) windows1.options = (ushort)(windows1.options | 0x10); }
- }
- public bool DisplayTabsAtBottom
- {
- set { if (value) windows1.options = (ushort)(windows1.options | 0x20); }
- }
- #region IRecords ³ÉÔ±
- public byte[] GetByte()
- {
- return Globals.GetStructToBytes(windows1);
- }
- #endregion
- }
- }
|