123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- 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 RecordSetup
- {
- public ushort opcode;
- public ushort length;
- public ushort pagesize;
- public ushort scalefactor;
- public ushort startpage;
- public ushort fitwide;
- public ushort fithigh;
- public ushort options;
- public ushort horizdpi;
- public ushort vertdpi;
- public double headermargin;
- public double footermargin;
- public ushort copies;
- }
- internal class Setup : IRecords
- {
- RecordSetup setup;
- public Setup()
- {
- setup.opcode = 0xA1;
- setup.length = 34;
- }
- public ushort PaperSize
- {
- set { setup.pagesize = value; }
- }
- public ushort ScaleFactor
- {
- set { setup.scalefactor = value; }
- }
- public ushort StartPage
- {
- set { setup.startpage = value; }
- }
- public ushort FitPagesWide
- {
- set { setup.fitwide = value; }
- }
- public ushort FitPagesHigh
- {
- set { setup.fithigh = value; }
- }
- public ushort OptionFlags
- {
- set { setup.options = value; }
- }
- public ushort HorizontalDpi
- {
- set { setup.horizdpi = value; }
- }
- public ushort VerticalDpi
- {
- set { setup.vertdpi = value; }
- }
- public double HeaderMargin
- {
- set { setup.headermargin = value; }
- }
- public double FooterMargin
- {
- set { setup.footermargin = value; }
- }
- public ushort Copies
- {
- set { setup.copies = value; }
- }
- #region IRecords ³ÉÔ±
- public byte[] GetByte()
- {
- return Globals.GetStructToBytes(setup);
- }
- #endregion
- }
- }
|