2170 lines
		
	
	
		
			70 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			2170 lines
		
	
	
		
			70 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
using System.IO;
 | 
						|
using System.Text;
 | 
						|
using System.Collections;
 | 
						|
using System.Windows.Forms;
 | 
						|
using System.Runtime.Serialization.Formatters.Binary;   // read in struct
 | 
						|
using System.Xml;
 | 
						|
using System.Xml.Serialization;
 | 
						|
 | 
						|
 | 
						|
public class fmtDefineAndEnums
 | 
						|
{
 | 
						|
	// values for AccessableTypes
 | 
						|
	public static ushort ADDING_CAUTION = 1;
 | 
						|
	public static ushort ADDING_NOTE = 2;
 | 
						|
	public static ushort ADDING_RNO = 4;
 | 
						|
	public static ushort ADDING_SUB = 8;
 | 
						|
	public static ushort ADDING_TABLE = 16;
 | 
						|
	public static ushort ADDING_NEXT = 32;
 | 
						|
	public static ushort ADDING_PREV = 64;
 | 
						|
 | 
						|
	/* Fonts: index into fonts[NFONTS] array */
 | 
						|
 | 
						|
	public static uint ELITE = 0;
 | 
						|
	public static uint PICA = 1;
 | 
						|
	public static uint LN_PRN = 2;
 | 
						|
	public static uint CONDENSE = 3;
 | 
						|
	public static uint SANSERIF = 4;
 | 
						|
	public static uint PICA12 = 5;
 | 
						|
	public static uint PROPORTIONAL = 6;
 | 
						|
	public static uint PROPT12 = 7;
 | 
						|
	public static uint HVLPT18 = 8;
 | 
						|
	public static uint HVLPT25 = 9;
 | 
						|
	public static uint SPECIALCHARS = 10;
 | 
						|
	public static uint PT14 = 11;
 | 
						|
	public static uint SANSERIF14 = 12;
 | 
						|
	public static uint SANSERIF17 = 13;
 | 
						|
	public static uint HVLPT12 = 14;
 | 
						|
	public static uint NARRATOR = 15;
 | 
						|
	public static uint MEDUPUNIVERS = 16;
 | 
						|
	public static uint LGUPMED16 = 17;
 | 
						|
	public static uint PROPT10 = 18;
 | 
						|
	public static uint LG1275HP4SI = 19;
 | 
						|
	public static uint HVLPT10 = 20;
 | 
						|
	public static uint HVLPT8  = 21;
 | 
						|
	public static uint HVLPT14 = 22;
 | 
						|
	public static uint SANSERIF25 = 23;
 | 
						|
	public static uint EYECHART = 24;
 | 
						|
	public static uint TIMES11 = 25;
 | 
						|
	public static uint SANSCOND = 26;
 | 
						|
 | 
						|
	/* text styles */
 | 
						|
	public static uint UNDERLINE = 64;
 | 
						|
	public static uint BOLD = 128;
 | 
						|
	public static uint LANDSCAPE = 256;
 | 
						|
	public static uint ITALICS = 512;
 | 
						|
	public static uint BOXED = 1024;
 | 
						|
	public static uint BOXELEMENT = 0x00000800;
 | 
						|
	public static uint TBCENTERED = 4096;
 | 
						|
	public static uint RTCHECKOFF = 8192;
 | 
						|
	public static uint LTCHECKOFF = 16384;
 | 
						|
	public static uint BIGSCRIPT = 32768;
 | 
						|
	public static uint HLTEXTHL = 65536;
 | 
						|
	public static uint RTCHECKOFFWITHASTERISK = 131072;	/* 0x00020000L */
 | 
						|
	public static uint DB_UNDERLINE = 262144;
 | 
						|
	public static uint COLDOTS = 524288;		/* 0x00080000L */
 | 
						|
	public static uint MMBOLD = 1048576;
 | 
						|
	public static uint RIGHTJUSTIFY = 2097152;
 | 
						|
	public static uint SUBSCRIPT = 4194304;
 | 
						|
	public static uint SUPERSCRIPT = 8388608;
 | 
						|
	public static uint PAGELISTITEM = 16777216;	/* 0x01000000L */
 | 
						|
	public static uint PRINTONTOPOFLINE = 33554432;	/* 0x02000000L */
 | 
						|
	public static uint HORZCENTER = 67108864;	/* 0x04000000L */
 | 
						|
	public static uint CIRCLESTRING2 = 0x08000000;
 | 
						|
	public static uint ALIGNWITHUP1 = 0x10000000;
 | 
						|
	public static uint ALIGNWSECNUM = 0x20000000;
 | 
						|
	public static uint MATCHCOLUMNMODE = 0x40000000;
 | 
						|
	public static uint KEEPRNOSUBSTYLE = 0x80000000;
 | 
						|
 | 
						|
	/* Replace Words Defines */
 | 
						|
	public static ushort REPLACESIZE  = 60;	// Arrays size for ReplaceWords, **ReplaceWith,
 | 
						|
	// and ReplaceFlags
 | 
						|
	public static uint REPLEVERYTHING = 0x0000007F;	// Turns on the Replace function for
 | 
						|
	//	all classes of structure types
 | 
						|
	/*Highest 4 bits are OFF by Default*/
 | 
						|
	/*REPLBKGD also OFF by default*/
 | 
						|
	/*REPLHLSSETPNT also OFF by default*/
 | 
						|
	/*REPLDIFFUNIT also OFF by default*/
 | 
						|
	/*REPLTOC also OFF by default*/
 | 
						|
	/*REPLPLACKEEP also OFF by default*/
 | 
						|
 | 
						|
	public static uint REPLHIGH = 0x0001;	//Do ReplaceWords in HIGH LEVEL STEPS
 | 
						|
	public static uint REPLRNO	= 0x0002;	//Do ReplaceWords in RNOS
 | 
						|
	public static uint REPLCAUTION = 0x0004;	//Do ReplaceWords in CAUTIONS
 | 
						|
	public static uint REPLNOTE = 0x0008;	//Do ReplaceWords in NOTES
 | 
						|
	public static uint REPLTABLE = 0x0010; //Do ReplaceWords in TABLES
 | 
						|
	public static uint REPLSUBSTEP = 0x0020;	//Do ReplaceWords in SUBSTEPS
 | 
						|
	public static uint REPLATTACH = 0x0040;	//Do ReplaceWords in ATTACHMENTS
 | 
						|
	public static uint REPLBKGD = 0x0080;	//Do ReplaceWords in BACKGROUNDS
 | 
						|
 | 
						|
	public static uint REPLDIFFUNIT = 0x0100;	//Do ReplaceWords ONLY for different UNIT #
 | 
						|
	public static uint REPLTOC = 0x0200;	//Do in auto table-of-contents
 | 
						|
	public static uint REPLSTATTREE = 0x0400;
 | 
						|
	public static uint REPLHLSSETPNT = 0x0800;	//Do ReplaceWords in HighLevelStep SETPoiNTs
 | 
						|
 | 
						|
	/*These bits are used for classes which
 | 
						|
						**are normally OFF, currently these
 | 
						|
						**are SETPOINTS and TRANSITIONS*/
 | 
						|
	public static uint REPLTRAN = 0x1000;	//Do ReplaceWords in TRANSITIONS
 | 
						|
	public static uint REPLSETPOINT = 0x2000;	//Do ReplaceWords in SETPOINTS
 | 
						|
 | 
						|
 | 
						|
	/* Case Sensitivity Flags - default is off (Case Sensitive Replace)*/
 | 
						|
	public static uint REPLCASEINSENS = 0x0000C000;	//Do ReplaceWords for all words that
 | 
						|
	//match, regardless of case, and
 | 
						|
	//replace with the ReplaceWith string
 | 
						|
	//as is
 | 
						|
 | 
						|
	/* Setting either of the following flags individually replaces the ReplaceWord
 | 
						|
		** occurrance with the original matched text surrounded by any special
 | 
						|
		** characters in the ReplaceWith string*/
 | 
						|
	public static uint REPLCASEINSENSFIRST = 0x4000;	//Do ReplaceWords for all words that
 | 
						|
	// exactly match the ReplaceWord, except
 | 
						|
	// the case of the first character may
 | 
						|
	// be different
 | 
						|
 | 
						|
	public static uint REPLCASEINSENSALL = 0x8000;	//Do ReplaceWords for all words that
 | 
						|
	//match the ReplaceWord, regardless of
 | 
						|
	//case
 | 
						|
 | 
						|
	public static uint REPLPARTIALS = 0x10000;	// Do replace even on partial matches
 | 
						|
	public static uint REPLPLACKEEP = 0x20000;	// Do replace in PlaceKeepers
 | 
						|
	public static uint REPLINSECTITLE = 0x40000;	// replace words in section titles
 | 
						|
 | 
						|
	/*
 | 
						|
		** Max number of substep type groups allowed to be made.
 | 
						|
		** for use with TypeGroups
 | 
						|
		*/
 | 
						|
	public static short MAXTYPEGROUPS = 10;
 | 
						|
	public static short ENDGROUP = 99;
 | 
						|
	public static short MAXENHANCEDTYPES = 20;
 | 
						|
 | 
						|
	public static short MAXTRANS = 15;	/* Max # of format defined transitions */
 | 
						|
 | 
						|
	public static short MAXSECLEVELS = 10;
 | 
						|
 | 
						|
	public static short MAXMATCHPROCNUM = 10;
 | 
						|
	public static short MAXBOXES = 24;
 | 
						|
	public static short NUMBOXCHARS = 12;
 | 
						|
	public static short MAXTABS = 20;
 | 
						|
 | 
						|
}
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public struct FormatFlags
 | 
						|
{
 | 
						|
	public ushort XtraFlag_0;
 | 
						|
	public ushort XtraFlag_1;
 | 
						|
	public ushort XtraFlag_2;
 | 
						|
	public ushort XtraFlag_3;
 | 
						|
	public ushort XtraFlag_4;
 | 
						|
	public ushort XtraFlag_5;
 | 
						|
	public ushort XtraFlag_6;
 | 
						|
	public ushort XtraFlag_7;
 | 
						|
	public ushort XtraFlag_8;
 | 
						|
	public ushort XtraFlag_9;
 | 
						|
	public ushort XtraFlag_10;
 | 
						|
	public ushort XtraFlag_11;
 | 
						|
	public ushort XtraFlag_12;
 | 
						|
	public ushort XtraFlag_13;
 | 
						|
	public ushort XtraFlag_14;
 | 
						|
	public ushort XtraFlag_15;
 | 
						|
	public ushort XtraFlag_16;
 | 
						|
	public ushort XtraFlag_17;
 | 
						|
	public ushort VEAIRFlag; // VEAIRFlag
 | 
						|
	public ushort PurchaseOptions;  // PurchaseOption
 | 
						|
}
 | 
						|
 | 
						|
[Serializable]
 | 
						|
//public struct MaxRNOColumns
 | 
						|
public struct ColunmShortValues
 | 
						|
{
 | 
						|
	public short OneColumn;
 | 
						|
	public short TwoColumn;
 | 
						|
	public short ThreeColumn;
 | 
						|
}
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public struct EditPrintShortValues
 | 
						|
{
 | 
						|
	public short Edit;
 | 
						|
	public short Print;
 | 
						|
}
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public struct AlternateRNOWidth
 | 
						|
{
 | 
						|
	public short FirstColumn;
 | 
						|
	public short SecondColumn;
 | 
						|
}
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public struct EditPrintStr
 | 
						|
{
 | 
						|
//	public string ForEdit;
 | 
						|
//	public string ForPrint;
 | 
						|
	public Txt ForEdit;
 | 
						|
	public Txt ForPrint;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public struct SeqTab
 | 
						|
{
 | 
						|
	// Array of 9 substep levels (0-8)
 | 
						|
	// starting ASCII location for sequential substep tabs 
 | 
						|
	//(0 = numbers, ` = lower case letters, @ = upper case letters)
 | 
						|
	// The sequence is recycled beyond the defined ones.
 | 
						|
//	public byte []SeqStart = new byte[9];
 | 
						|
	public byte SeqStart;
 | 
						|
 | 
						|
	// LeftJustSeqTab 
 | 
						|
	// - left justify the tab derived from SeqTab
 | 
						|
	//   (pad tab on the right side with blanks)
 | 
						|
//	public short []LeftJustSeqTab = new short[9];
 | 
						|
	public short LeftJustSeqTab;
 | 
						|
 | 
						|
	// SeqTab - the ". ", ") ", etc. that follows the sequential
 | 
						|
	//          substep number/letter
 | 
						|
//	public string []SeqSubStpTabFmt = new string[9];
 | 
						|
//	public string SeqSubStpTabFmt; // sequential substep tab format
 | 
						|
	public Txt SeqSubStpTabFmt; // sequential substep tab format
 | 
						|
 | 
						|
	//	// PreSeqTab - text to pre-append to the substep's SeqTab
 | 
						|
	//	// ex: "(" or "["
 | 
						|
	//	// [9] levels of seqtab
 | 
						|
	//	// [2] modes: [0] = edit screen, [1] = printed page
 | 
						|
	//	public string [,]PreSeqSubStp = new string[9,2]; 
 | 
						|
//	public EditPrintStr []PreSeqSubStepTab = new EditPrintStr[9];
 | 
						|
	public EditPrintStr PreSeqSubStepTab;
 | 
						|
	
 | 
						|
	//	// PostSeqTab  - (ATA format only)
 | 
						|
	//	// - append this text to end of the substep's SeqTab
 | 
						|
	//	// [9] levels of seqtab
 | 
						|
	//	// [2] modes: [0] = edit screen, [1] = printed page
 | 
						|
	//	public string [,]PostSeqSubStp = new string[9,2];
 | 
						|
//	public EditPrintStr []PostSeqSubStepTab = new EditPrintStr[9];
 | 
						|
	public EditPrintStr PostSeqSubStepTab;
 | 
						|
}
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public struct WidSTable
 | 
						|
{
 | 
						|
	public EditPrintShortValues OneColumn;
 | 
						|
	public EditPrintShortValues TwoColumns;
 | 
						|
	public EditPrintShortValues ThreeColumns;
 | 
						|
}
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public struct fmtTab
 | 
						|
{
 | 
						|
	public uint TbStyle; // TBStyle (font type) - font
 | 
						|
	public bool AlignWithParent; // AlignWithParentTab
 | 
						|
	public EditPrintStr TabFmt; // TBIdent [0]-screen [1]-Print
 | 
						|
	public EditPrintStr RNOTabFmt; // RNOTBIdent
 | 
						|
//	public string AltPrintTabFmt; // AltPrintTBIdent
 | 
						|
	public Txt AltPrintTabFmt; // AltPrintTBIdent
 | 
						|
}
 | 
						|
 | 
						|
//[Serializable]
 | 
						|
public struct NCStr
 | 
						|
{
 | 
						|
	//	[XmlElement]
 | 
						|
	public Txt ForEdit;
 | 
						|
	public Txt ForPrint;
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
//[Serializable]
 | 
						|
//public struct ChkOffItem
 | 
						|
//{
 | 
						|
//[XmlElement]
 | 
						|
//	public string []Item;
 | 
						|
//}
 | 
						|
 | 
						|
//public struct VerId
 | 
						|
//{
 | 
						|
//	[System.Xml.Serialization.XmlAttribute]
 | 
						|
//	public string Text;
 | 
						|
//}
 | 
						|
 | 
						|
public struct ChkOffSytle
 | 
						|
{
 | 
						|
	[System.Xml.Serialization.XmlAttribute]
 | 
						|
	public uint Style;
 | 
						|
}
 | 
						|
 | 
						|
public struct Txt
 | 
						|
{
 | 
						|
//	[System.Xml.Serialization.XmlAttribute]
 | 
						|
	[XmlAttribute]
 | 
						|
	public string Text;
 | 
						|
}
 | 
						|
 | 
						|
[Serializable]
 | 
						|
	public struct fmtChkOff
 | 
						|
	{
 | 
						|
		static int MAXCHECKOFFS = 18;
 | 
						|
		public int maxcheckoffs 
 | 
						|
		{
 | 
						|
			get { return MAXCHECKOFFS;}
 | 
						|
		}
 | 
						|
 | 
						|
		static int MAXCHKHEADINGS = 5;
 | 
						|
		public int MaxCheckoffHeadings
 | 
						|
		{
 | 
						|
			get {return MAXCHKHEADINGS;}
 | 
						|
		}
 | 
						|
 | 
						|
		// RightCheckOffBox 
 | 
						|
		//	[0]AER 
 | 
						|
		//	[1]RNO 
 | 
						|
		//	[2]Commitment for Braidwood
 | 
						|
		//	[3] (no supporting code) tied to value of TwoCheckOffspublic 
 | 
						|
//		public short [] CheckoffBoxPosition;// = new int[4]; 
 | 
						|
		public short AERCheckoffBoxPosition;
 | 
						|
		public short RNOCheckoffBoxPosition;
 | 
						|
		public short CommitmentMarkPosition;
 | 
						|
		public short UserSelectedCheckoffPosition;
 | 
						|
 | 
						|
		// RightCheckOffChars
 | 
						|
		public byte [] ChkOffScreenNotation;// = new byte[MAXCHECKOFFS];
 | 
						|
 | 
						|
		//CheckOffWidAdjust 
 | 
						|
		public byte []WidthAdjustment;// =  new byte[MAXCHECKOFFS];
 | 
						|
 | 
						|
		// CheckOffHeadStyle -font
 | 
						|
//		public uint []ChkOffHeaderStyle;// =  new uint[MAXCHKHEADINGS]; 
 | 
						|
		public ChkOffSytle []ChkOffHeaderStyle;
 | 
						|
 | 
						|
		// UseCheckoffIn
 | 
						|
		public int UseCheckOffsInTheseSections;
 | 
						|
 | 
						|
		//CheckOffAdjustment (not sure why we need this)
 | 
						|
		public byte PosAdjustment; 
 | 
						|
 | 
						|
		//RightCheckOffPrompts
 | 
						|
//	[XmlElement]
 | 
						|
//		public string [] ChkOffMenuItems;// = new string[MAXCHECKOFFS]; 
 | 
						|
//		[XmlArrayAttribute("MenuItems")]
 | 
						|
//		public ChkOffItem ChkOffMenuItems;
 | 
						|
		public Txt []ChkOffMenuItems;
 | 
						|
 | 
						|
		//CheckOffHeadings
 | 
						|
		[XmlArrayAttribute("Headings")]
 | 
						|
//		public string [] ChkOffHeadings;// = new string[MAXCHKHEADINGS]; 
 | 
						|
//		public ChkOffItem []ChkOffHeadings;
 | 
						|
		public Txt []ChkOffHeadings;
 | 
						|
	}
 | 
						|
 | 
						|
	[Serializable]
 | 
						|
	public struct fmtChgBar
 | 
						|
	{
 | 
						|
		public short ChgBarType; // ChangeBarMessage
 | 
						|
		public short FixedChangeColumn;
 | 
						|
		public byte FixAERChangeColumn;
 | 
						|
		public uint ChgBarStyle; // ChangeBarStyle (this is set to font)
 | 
						|
//		public string ChgBar; // SpecialChangeBar or default to vertical line draw char
 | 
						|
		public Txt ChgBar; // SpecialChangeBar or default to vertical line draw char
 | 
						|
	}
 | 
						|
 | 
						|
	[Serializable]
 | 
						|
	public struct fmtBox
 | 
						|
	{
 | 
						|
		static int NUMBOXCHARS = 12;
 | 
						|
		public int NumBoxChars
 | 
						|
		{
 | 
						|
			get {return NUMBOXCHARS;}
 | 
						|
		}
 | 
						|
 | 
						|
		public enum BoxPiece {BXURC, BXHorz, BXULC, BXVert, BXMLS, BXMRS, BXLRC, BXLLC, BXMID, BXLHorz, BXUMID, BXLMID}
 | 
						|
 | 
						|
		public short BoxStart; //BXStart
 | 
						|
		public short BoxEnd; // BXEnd
 | 
						|
		public short BoxTextStart; //BXTxtStart
 | 
						|
		public short BoxTextWidth; //BXTxtWidth
 | 
						|
		public short BoxHeight; //BXHeight
 | 
						|
		public short BoxTabPos; //BXTabPos
 | 
						|
		public uint BoxStyle; //BXStyle - font
 | 
						|
		public byte BoxTextRowAdj; //BXTxtRowAdj
 | 
						|
//		public string []BoxChar;// = new string[NUMBOXCHARS]; // BXChar - index with 
 | 
						|
//														   // BoxPiece value
 | 
						|
		// BXChar - index with BoxPiece value
 | 
						|
		public Txt []BoxChar;// = new string[NUMBOXCHARS];
 | 
						|
	}
 | 
						|
 | 
						|
	// Current Format design has one of these for each step type
 | 
						|
	[Serializable]
 | 
						|
	public struct fmtStep 
 | 
						|
	{
 | 
						|
		public uint TextStyle; // STStyle (fonts)
 | 
						|
		public ushort Color; // Att (color on screen)
 | 
						|
		public short BlankLinesAfter; // STExtralines (# of blank lines after this piece)
 | 
						|
		public short BxInfoIdx; // STBoxindex;
 | 
						|
		public short TabIndex; // STTabsindex
 | 
						|
		public short PrintPosAdjust; // PrintPosAdjust
 | 
						|
		public ushort AccessableTypes; // AcTable
 | 
						|
		public short BlankLineAfterGroupOf; // EveryNLines (blank line after group of x items)
 | 
						|
		public bool UpperCaseTrans; // AlwaysUpperCase (upper case transitions)
 | 
						|
		public bool PageBreakAtTypeChange; // PageBreakAtTypechange
 | 
						|
		public bool AlignWithParentTab; //AlignWithParentTab	
 | 
						|
		public short ChkOffGroups; //RtCheckOffGroups
 | 
						|
		public short WidthOverride; // StepTypeWidthOverride (overide default width)
 | 
						|
		public byte []VertPos;// = new Byte[15]; // VertPos (used for valves and checklist formats)
 | 
						|
		public short ColOverride; // StepTypeColOverride (override default col positon)
 | 
						|
//		public string SeparatorText; // Sep (used for OR step types for example)
 | 
						|
		public Txt SeparatorText; // Sep (used for OR step types for example)
 | 
						|
//		public string PrefixText; // StepPrefix
 | 
						|
		public Txt PrefixText; // StepPrefix
 | 
						|
//		public string SuffixText; // StepSuppfix
 | 
						|
		public Txt SuffixText; // StepSuppfix
 | 
						|
		// UnderlineTheseChar - print will underline these
 | 
						|
		// characters along with the normal characters
 | 
						|
//		public string UnderlineThese; 
 | 
						|
		public Txt UnderlineThese; 
 | 
						|
	}
 | 
						|
 | 
						|
	[Serializable]
 | 
						|
	public struct RplWord
 | 
						|
	{
 | 
						|
		// Used to specify which step types are affected 
 | 
						|
		// by ReplaceWords and ReplaceWith.
 | 
						|
		public uint ReplaceFlag;
 | 
						|
 | 
						|
		// List of words/phrases to replace
 | 
						|
//		public string ReplaceWord;
 | 
						|
		public Txt ReplaceWord;
 | 
						|
	
 | 
						|
		// List of replacement words/phrases
 | 
						|
//		public string ReplaceWith;
 | 
						|
		public Txt ReplaceWith;
 | 
						|
	}
 | 
						|
 | 
						|
	[Serializable]
 | 
						|
	public struct TrnsDef // used to override default transition definitions
 | 
						|
	{
 | 
						|
		public byte TransType; // the true transition type of format defined transitions
 | 
						|
//		public string TransFmt;	// format string for this transition type
 | 
						|
//		public string TransMenu;	// Menu string for this transition type
 | 
						|
		public Txt TransFmt;	// format string for this transition type
 | 
						|
		public Txt TransMenu;	// Menu string for this transition type
 | 
						|
	}
 | 
						|
 | 
						|
	[Serializable]
 | 
						|
	public struct SectLevSettings
 | 
						|
	{
 | 
						|
		// Position of the sub (meta) section number on printed page
 | 
						|
		public byte SecNumPositionAdj;
 | 
						|
 | 
						|
		// Sub (meta) Section Title position on printed page
 | 
						|
		public byte SecTitlePositionAdj; 
 | 
						|
 | 
						|
		// Override ColS and assign HLS a column position based on meta
 | 
						|
		// section level. Overrides automatic indentation supplied by
 | 
						|
		// the TieTabToLevel logic
 | 
						|
		public byte ColSByLevel;	
 | 
						|
	
 | 
						|
		// Adjust the placement of meta sections in the table of contents
 | 
						|
		public byte TofCPositionAdj;
 | 
						|
 | 
						|
		// Adjust the WidS value (print mode) based on the step level
 | 
						|
		public byte WidSAdjByLevel;
 | 
						|
	}
 | 
						|
 | 
						|
	[Serializable]
 | 
						|
	public struct PrcDescript
 | 
						|
	{
 | 
						|
		// Mask to determine which procedures print procedure descriptor text
 | 
						|
//		public string MatchProcNumber;
 | 
						|
		public Txt MatchProcNumber;
 | 
						|
 | 
						|
		// Procedure descriptor text for procs matching the cooresponding 
 | 
						|
		// MatchProcNumber mask.  This is then put into the page list via the 
 | 
						|
		// <PROCDESC> token
 | 
						|
//		public string ProcDescriptor;
 | 
						|
		public Txt ProcDescriptor;
 | 
						|
 | 
						|
		// 2nd procedure descriptor text put into the page list via the <PROCDESC2>
 | 
						|
//		public string ProcDescriptor2;
 | 
						|
		public Txt ProcDescriptor2;
 | 
						|
	}
 | 
						|
 | 
						|
 | 
						|
	[Serializable]
 | 
						|
//	public struct CautNoteTypesOverride
 | 
						|
public struct MenuItem
 | 
						|
	{
 | 
						|
		public short TextTypeValue; // Caution or Note type
 | 
						|
//		public string TextType; // menu entry corresponding to text type
 | 
						|
		public Txt TextType; // menu entry corresponding to text type
 | 
						|
	}
 | 
						|
	
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public struct AutoTableOfContents
 | 
						|
{
 | 
						|
	// Auto Table of Contents formatting
 | 
						|
	public byte SecNumPos; // position of section number on TOC page
 | 
						|
	public byte SecTitlePos; // position of section title on TOC page
 | 
						|
	public byte SecTitleLen; // max length of section title (before it is wrapped)
 | 
						|
	public byte PageNumPos; // position of page number of the corresponding section
 | 
						|
	public byte SpaceChar; // charcter used from end of title to page number (ex "...")
 | 
						|
	public byte LineSpacing; // number of blank lines between TOC entries
 | 
						|
	public byte Font; // Font to used
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
[Serializable]
 | 
						|
public class FmtFileVars : fmtDefineAndEnums
 | 
						|
	{
 | 
						|
	public string Title; // format title
 | 
						|
 | 
						|
	public int MaxNumBoxes
 | 
						|
	{
 | 
						|
		get	{return MAXBOXES;}
 | 
						|
	}
 | 
						|
 | 
						|
	public int MaxTabs
 | 
						|
	{
 | 
						|
		get	{return MAXTABS;}
 | 
						|
	}
 | 
						|
 | 
						|
	static int NUMStepTextTypes = 47;
 | 
						|
	public int NumStepSubStepTypes
 | 
						|
	{
 | 
						|
		get	{return NUMStepTextTypes;}
 | 
						|
	}
 | 
						|
 | 
						|
	// Arrays size for ReplaceWords, **ReplaceWith, and ReplaceFlags
 | 
						|
	public int MaxReplaceItems
 | 
						|
	{
 | 
						|
		get { return REPLACESIZE;}
 | 
						|
	}
 | 
						|
 | 
						|
	public int MaxSectionLevels
 | 
						|
	{
 | 
						|
		get { return MAXSECLEVELS;}
 | 
						|
	}
 | 
						|
 | 
						|
	public int MaxTypeGroups
 | 
						|
	{
 | 
						|
		get {return MAXTYPEGROUPS;}
 | 
						|
	}
 | 
						|
 | 
						|
	public int MaxEnhancedTypes
 | 
						|
	{
 | 
						|
		get {return MAXENHANCEDTYPES;}
 | 
						|
	}
 | 
						|
 | 
						|
	// Max # of format defined transitions
 | 
						|
	public int MaxTrans
 | 
						|
	{
 | 
						|
		get {return MAXTRANS;}
 | 
						|
	}
 | 
						|
 | 
						|
 | 
						|
	enum StepTextTYPES 
 | 
						|
	{
 | 
						|
		STANDARD, HIGH, IMMEDIATE, AND, OR, CAUTION, NOTE, TABLE, CONTINUOUS, AERTABLE,
 | 
						|
		EQUIPMENTLIST, TITLE, PAGENUMBER, EQUIPMENTWBLANK, PROCNUMBER, REVNUMBER,
 | 
						|
		ACCPAGES, LOSSOFAC, EXPLICITAND, CAUTION1, CAUTION2, NOTE1, NOTE2, PARAGRAPH,
 | 
						|
		DEFAULT, NOTE3, CAUTION3, NOTE4, CAUTION4, EQUIPMENTOPT, EQUIPMENTOPTWBLANK,
 | 
						|
		NOTE5, BORDERLESSAERTABLE, BORDERLESSTABLE, IMPLICITOR, FIGURE, AERFIGURE, 
 | 
						|
		BORDERLESSFIGURE, BORDERLESSAERFIGURE, RNOTYPE, HIGH5, TITLEWITHTEXTRIGHT,
 | 
						|
		TITLEWITHTEXTBELOW, CONTACSEQUENTIAL, CONTACAND, CONTACOR, CONTACPARAGRAPH
 | 
						|
	} // a.k.a. STRUCTDEFTYPES in 16bit code
 | 
						|
 | 
						|
//	public ushort []XtraFlag =  new ushort[18]; // XtraFlag[0-17]
 | 
						|
//	public ushort VEAIRFlag; // VEAIRFlag
 | 
						|
//	public ushort PurchaseOptions;  // PurchaseOption
 | 
						|
 | 
						|
	public FormatFlags FmtFlags; // XtraFlag[0-17], VEAIRFlag, PurchaseOption
 | 
						|
	public bool Emode; // default edit mode (0=insert, 1=overstrike)
 | 
						|
	public short TopRow; // Top Row On Sreen  - this is always set to Zero in p_refresh()
 | 
						|
	public bool DoPrintDriverAdjustments; // DoPrnDrvrAdjust
 | 
						|
 | 
						|
	public uint TopOfPageThingStyle; // TopOfPageThingStyle
 | 
						|
	public short TopOfPageThingCol; // TopOfPageThingCol
 | 
						|
 | 
						|
	public uint ModifiedTextSytle; // ModifiedText
 | 
						|
	public uint SeparatorStyle; // SeparatorStyle
 | 
						|
 | 
						|
	/* SeparatorLocation - Location of separator:
 | 
						|
	** 0 - left, 1 - right,
 | 
						|
	** 2+ - positions in the middle */
 | 
						|
	public short SeparatorLocation; 
 | 
						|
 | 
						|
	public short LastLineToStartStep; // LastLineToStartStep
 | 
						|
	public bool LineDrawingOption; // LineDrawingOption - always set to one (true)
 | 
						|
 | 
						|
	public short HLSTextStartPos; // ColS
 | 
						|
	public short HLSTextStartPosScrnAdj; // ColSScreenAdj
 | 
						|
	public short RNOTextStartPosScrnAdj; // ScrnSdjRNOText
 | 
						|
 | 
						|
	public short CautNoteTextStart; // ColT
 | 
						|
 | 
						|
	public short DefaultHLSTextPos; // ColAbs - If not tab, set ptr->Column to this value
 | 
						|
 | 
						|
	public short CautNoteTextWidth; // WidT
 | 
						|
 | 
						|
	public short NumColumns; // Pmode - number of columns - ActualPMode
 | 
						|
 | 
						|
	public short DefaultNumRNOColumns; //MaxRNO - this should be defined at a section level
 | 
						|
 | 
						|
	// MaxRNOTable[3]
 | 
						|
	// Number of RNO columns for sigle, two, and tree column step section formats
 | 
						|
//	public short []MaxRNOTable = new short[3];
 | 
						|
	public ColunmShortValues MaxRNOTable;
 | 
						|
 | 
						|
	// ColRTable 
 | 
						|
	// - starting position of RNO column this should be defined at a section level
 | 
						|
//	public short []StartRNOPosition = new short[3]; 
 | 
						|
	public ColunmShortValues StartRNOPosition;
 | 
						|
 | 
						|
//	// WidSTable - width of HLS [0] - edit [1] - print
 | 
						|
//	public short [,]HLSwidth = new short[3,2];
 | 
						|
	// Array of 3 - for each column mode
 | 
						|
//	public WidsSTable []HLSwidth = new EditPrintShortValues[3];
 | 
						|
	public WidSTable HLSwidth;
 | 
						|
 | 
						|
	// ColRScreen - adjustment to starting of RNO column on screen
 | 
						|
	public ColunmShortValues StartRNOPosScrnAdj;
 | 
						|
 | 
						|
	//AdjRNOCol - adjust position of RNO column
 | 
						|
	public short RNOPositionAdj;
 | 
						|
 | 
						|
	// Change Bar Type and Format settings
 | 
						|
	public fmtChgBar ChangeBarSettings;
 | 
						|
 | 
						|
	// Number representing the font used in the Summary Of Changes report
 | 
						|
	public uint ChangeSummaryStyle;
 | 
						|
 | 
						|
	// TitleLength - Max length of title before it is split
 | 
						|
	public short TitleWidthBeforeSplitting;
 | 
						|
 | 
						|
	//CoverTitleLenth - Max length of title before it is split
 | 
						|
	public short CoverPgTitleWidthBeforeSplit;
 | 
						|
 | 
						|
	public fmtChkOff CheckOffSettings; // check off settings
 | 
						|
		
 | 
						|
	// EndMessagePos - this should be defined at a section level
 | 
						|
	// overrides the default (calculated) center position of
 | 
						|
	// the procedure step section's End Message but only if
 | 
						|
	// a Non-Proportional Font is being used for the End Message
 | 
						|
	public short EndMessageCenterPos;
 | 
						|
 | 
						|
	// Array of 9 substep levels (0-8)
 | 
						|
	// starting ASCII location for sequential substep tabs 
 | 
						|
	//(0 = numbers, ` = lower case letters, @ = upper case letters)
 | 
						|
	// The sequence is recycled beyond the defined ones.
 | 
						|
//	public byte []SeqStart = new byte[9];
 | 
						|
							
 | 
						|
	// Starting ASCII location for High Level Steps
 | 
						|
	// This will override the use default use of numbers for
 | 
						|
	// the High Level Step Tab (ex. setting to @ = upper case letters)
 | 
						|
	public byte HighSeqStart;
 | 
						|
 | 
						|
	// Character used in the ReplaceWith string to start
 | 
						|
	// an indent for text on following lines (IP2, PACA, PAC, SCE formats)
 | 
						|
	public byte IndentToken;
 | 
						|
 | 
						|
	// Column for step header use in Vogtle for the immediate action
 | 
						|
	// step type
 | 
						|
	public short ImmStepHdrCol;	
 | 
						|
	// Style for the header
 | 
						|
	public uint ImmStepHdrStyle;	
 | 
						|
 | 
						|
	// if NOT zero:
 | 
						|
	// [0] will be the width of the first RNO column,
 | 
						|
	// [1] the width of the second.
 | 
						|
	// - KEW OP format
 | 
						|
//	public short []RNOWidthAlt = new short[2];
 | 
						|
	public AlternateRNOWidth RNOWidthAlt;
 | 
						|
 | 
						|
	// High Level Step Width OVerRiDe:
 | 
						|
	// when not zero, specify the width of the HLSs,
 | 
						|
	// overriding the value of WidSTable
 | 
						|
	// - KEW OP format
 | 
						|
	public short HLSWidthOVRD;
 | 
						|
 | 
						|
	// Set to the column format (1,2,3) for which PageList items 
 | 
						|
	// in the range -99 to -1 will be printed with	the section
 | 
						|
	// - either on the line at which the section begins, 
 | 
						|
	//   or if the section is  being continued from a previous page,
 | 
						|
	//   at the row given by the absolute value of PGrow.
 | 
						|
	public short SecColHdrforActPmode;
 | 
						|
 | 
						|
	// Style variables to be applied to section headers and numbering 
 | 
						|
	// that are enabled by the ShowSectionTitles flag
 | 
						|
	public uint SectionNumberingStyle;
 | 
						|
 | 
						|
	// Style variables to be applied to section headers and numbering 
 | 
						|
	//that are enabled by the ShowSectionTitles flag
 | 
						|
	public uint SectionHeaderStyle;
 | 
						|
 | 
						|
	// Style variables to be applied to section headers and numbering 
 | 
						|
	// that are enabled by the ShowSectionTitles flag
 | 
						|
	public short SectionNumPos;
 | 
						|
	public byte SectionNumJust;
 | 
						|
	public short SectionHeaderPos;
 | 
						|
	public byte SectionHeaderJust;
 | 
						|
	public short SectionTitleLength;
 | 
						|
 | 
						|
	// Indicates which substep types will NOT be influenced by the 
 | 
						|
	// print flag DontPaginateOnFirstSubStep3X.
 | 
						|
	// Each bit position maps to the substep menu position where 
 | 
						|
	// 0x01 is sequential, 0x02 is the AND, 0x04 is the OR, etc.
 | 
						|
	public short SubPaginationWght;
 | 
						|
 | 
						|
	// Adjust the column position by this much of the substeps to the
 | 
						|
	// right of the TITLEWITHTEXTRIGHT substep type
 | 
						|
	public short TextTitleAdjustment;
 | 
						|
 | 
						|
//	// Automatic Table of Contents format settings
 | 
						|
	public AutoTableOfContents AutoTOC;
 | 
						|
		
 | 
						|
	// style used with VertPos - used for valve lineups and checklists formats
 | 
						|
	public uint VertStyle;	
 | 
						|
 | 
						|
	// column position of centered table on printed page
 | 
						|
	public byte []TableCenterPos = new byte[3];
 | 
						|
 | 
						|
	// LeftJustSeqTab 
 | 
						|
	// - left justify the tab derived from SeqTab
 | 
						|
	//   (pad tab on the right side with blanks)
 | 
						|
//	public short []LeftJustSeqTab = new short[9];
 | 
						|
 | 
						|
	// Specify the number of HLS's that will appear on the HLS choice menu.
 | 
						|
	// Ex. if set to 2, only the first two HLS menu choices will appear
 | 
						|
	public byte NumberOfHighLevelSteps;
 | 
						|
 | 
						|
	// show only this many sub step types in the sub step menu
 | 
						|
	public short NumberOfSubStepTypes;
 | 
						|
 | 
						|
	// set to the "Old to New Conversion" setting (ex: A1) of the Continuous 
 | 
						|
	// Action Summary section set up in the Doc Style format file
 | 
						|
	public uint AutoContActSummarySection;	
 | 
						|
 | 
						|
	// IdentB - default bullet
 | 
						|
//	public string DefaultBullet; 
 | 
						|
	public Txt DefaultBullet; 
 | 
						|
 | 
						|
	// SeqTab - the ". ", ") ", etc. that follows the sequential
 | 
						|
	//          substep number/letter
 | 
						|
//	public string []SeqSubStpTabFmt = new string[9];
 | 
						|
 | 
						|
	// procedure descriptor text (use in PageList)
 | 
						|
	public PrcDescript []ProcDescriptors = new PrcDescript[10]; 
 | 
						|
 | 
						|
	// For version id text, DRAFT, APPROVED, TEMPORARY, etc.
 | 
						|
	// Used for pagelist token <VERSIONID>
 | 
						|
//	public string []VersionIdText = new string[5];
 | 
						|
//	public VerId []VersionIDText = new VerId[5];
 | 
						|
	public Txt []VersionIDText = new Txt[5];
 | 
						|
 | 
						|
	// String to apprear before and after the procedure title in a transition.
 | 
						|
	// ex. quotes around the title
 | 
						|
//	public string DelimiterForTransitionTitle;
 | 
						|
	public Txt DelimiterForTransitionTitle;
 | 
						|
 | 
						|
	// In transitions, delimit step number from substep letter, (ex 2.a vs 2a)
 | 
						|
//	public string StepSubstepDelimeter;
 | 
						|
	public Txt StepSubstepDelimeter;
 | 
						|
 | 
						|
	// Used in Through Transitions: 3a through 3c. 
 | 
						|
	// others: 3a. Thru 3c, 3a THROUGH 3c
 | 
						|
//	public string ThroughString;
 | 
						|
	public Txt ThroughString;
 | 
						|
 | 
						|
	// char in proc number to flag suffix should be used
 | 
						|
	// - WPB, WPBA formats
 | 
						|
//	public string ProcedureSuffixFlags; 
 | 
						|
	public Txt ProcedureSuffixFlags; 
 | 
						|
 | 
						|
	// text that will appear next to procedure number
 | 
						|
	// used by <PROCSUF> in Page List
 | 
						|
	// - WPB, WPBA formats
 | 
						|
//	public string []ProcedureSuffix = new string[10];	
 | 
						|
	public Txt []ProcedureSuffix = new Txt[10];
 | 
						|
 | 
						|
	// Text that appears at the top of the first page of the procedure steps
 | 
						|
//	public string TopOfPageThing;
 | 
						|
	public Txt TopOfPageThing;
 | 
						|
 | 
						|
//	// PreSeqTab - text to pre-append to the substep's SeqTab
 | 
						|
//	// ex: "(" or "["
 | 
						|
//	// [9] levels of seqtab
 | 
						|
//	// [2] modes: [0] = edit screen, [1] = printed page
 | 
						|
//	public string [,]PreSeqSubStp = new string[9,2]; 
 | 
						|
//	public EditPrintStr []PreSeqSubStepTab = new EditPrintStr[9];
 | 
						|
//
 | 
						|
//	// PostSeqTab  - (ATA format only)
 | 
						|
//	// - append this text to end of the substep's SeqTab
 | 
						|
//	// [9] levels of seqtab
 | 
						|
//	// [2] modes: [0] = edit screen, [1] = printed page
 | 
						|
//	public string [,]PostSeqSubStp = new string[9,2];
 | 
						|
//	public EditPrintStr []PostSeqSubStepTab = new EditPrintStr[9];
 | 
						|
 | 
						|
	// Printed below the last RNO in each step
 | 
						|
	// ex: "---------------------------"
 | 
						|
//	public string RNOSepString;
 | 
						|
	public Txt RNOSepString;
 | 
						|
 | 
						|
	// Terminate underline if matches one of defined strings
 | 
						|
//	public string []UnderlineTerminate = new string[10];
 | 
						|
	public Txt []UnderlineTerminate = new Txt[10];
 | 
						|
 | 
						|
	// printed before and after a group of Immediate actionsteps
 | 
						|
//	public string []ImmStepHdr = new string[2];
 | 
						|
	public Txt []ImmStepHdr = new Txt[2];
 | 
						|
 | 
						|
	// override menu of HLS types (descriptions only)
 | 
						|
//	public string []AlternateStepTypes = new string[5];
 | 
						|
	public Txt []AlternateStepTypes = new Txt[5];
 | 
						|
 | 
						|
	// override menu of substep types (descriptions)
 | 
						|
//	public string []AlternateSubTypes = new string[16];
 | 
						|
	public Txt []AlternateSubTypes = new Txt[16];
 | 
						|
 | 
						|
//	// Holds the string "OBSERVE NOTE|CAUTION PRIOR TO STEP X"
 | 
						|
//	public string [,]ObserveNCString =  new string[4,2];
 | 
						|
//	public EditPrintStr []ObserveNCString = new EditPrintStr[4];
 | 
						|
	public NCStr []ObserveNCString = new NCStr[4];
 | 
						|
 | 
						|
//	public string PSInfFile;	// Proc Specific Information file
 | 
						|
	public Txt PSInfFile;	// Proc Specific Information file
 | 
						|
 | 
						|
	// String  to appear on the line following the high Level step text
 | 
						|
//	public string HLStpSeparatorString;	
 | 
						|
	public Txt HLStpSeparatorString;	
 | 
						|
 | 
						|
	// String to appear on the line following the high level RNO step text
 | 
						|
//	public string HLRNOStpSeparatorString;	
 | 
						|
	public Txt HLRNOStpSeparatorString;	
 | 
						|
 | 
						|
	// Used to tell the pagination logic how far up the lines array to process
 | 
						|
	// while looking for a place to break. The default will divide the max lines
 | 
						|
	// out by "2" to get the lower limit value.
 | 
						|
//	public string LowerLimitDivisor;	
 | 
						|
	public Txt LowerLimitDivisor;	
 | 
						|
 | 
						|
	// used with Enhance Documents, this will be used for the step number when
 | 
						|
	// the user manually creates a new high level Enhanced Document step.
 | 
						|
//	public string NonLinkedStepNumber;
 | 
						|
	public Txt NonLinkedStepNumber;
 | 
						|
 | 
						|
	// used with Enhanced Documents, this will be used for the caution or note
 | 
						|
	// tab when the user manually creates a new Enhanced Caution or Note
 | 
						|
//	public string NonLinkedCautNoteNumber;
 | 
						|
	public Txt NonLinkedCautNoteNumber;
 | 
						|
 | 
						|
	// Name of directory for BG documents that print in duplex
 | 
						|
	// - Point Beach
 | 
						|
//	public string DuplexBGDirectory;
 | 
						|
	public Txt DuplexBGDirectory;
 | 
						|
 | 
						|
	// Name of directory for Dev Documents that print in duplex
 | 
						|
	// - Point Beach
 | 
						|
//	public string DuplexDDDirectory;
 | 
						|
	public Txt DuplexDDDirectory;
 | 
						|
 | 
						|
	// used with Enhanced Deviations, this will be used
 | 
						|
	// when the user does not link to an ERG step.
 | 
						|
//	public string NonLinkedRNONumber;
 | 
						|
	public Txt NonLinkedRNONumber;
 | 
						|
 | 
						|
//	// Format variables based on STRUCTDEFTYPES	(step types)
 | 
						|
	public fmtStep []StepDefinitions = new fmtStep[NUMStepTextTypes];
 | 
						|
//
 | 
						|
//	// Define Note/Caution boxes
 | 
						|
	public fmtBox []BoxInfo = new fmtBox[MAXBOXES];
 | 
						|
//
 | 
						|
//	// Define Step/substep tabs
 | 
						|
	public fmtTab []TabInfo = new fmtTab[MAXTABS];
 | 
						|
 | 
						|
//	// Define override of default Note/Caution type menu
 | 
						|
//	public CautNoteTypesOverride []CautNoteMenuOverride = new CautNoteTypesOverride[10];
 | 
						|
	public MenuItem []CautNoteMenuOverride = new MenuItem[10];
 | 
						|
 | 
						|
	// SeqTab definitions (substep tabs)
 | 
						|
	public SeqTab []SeqTabInfo = new SeqTab[9];
 | 
						|
 | 
						|
//	// Define Replace Words list
 | 
						|
	public RplWord []ReplaceWordList = new RplWord[REPLACESIZE];
 | 
						|
//
 | 
						|
//	// Override of default transition definitions
 | 
						|
	public TrnsDef []TransDefs = new TrnsDef[MAXTRANS];
 | 
						|
//
 | 
						|
//	// Section related format settings
 | 
						|
	public SectLevSettings []SectionLevelSettings = new SectLevSettings[MAXSECLEVELS];
 | 
						|
}
 | 
						|
 | 
						|
namespace procedureformat
 | 
						|
{
 | 
						|
	public class fmtFormat
 | 
						|
	{
 | 
						|
		/// <summary>
 | 
						|
		/// The FMT file variable settings
 | 
						|
		/// </summary>
 | 
						|
		private BinaryReader brFmt;
 | 
						|
		private string fmtName;
 | 
						|
		private byte []AllStrings;
 | 
						|
 | 
						|
		public fmtFormat(string nm)
 | 
						|
		{
 | 
						|
			fmtName = nm;
 | 
						|
			LoadFMTFile(nm);
 | 
						|
		}
 | 
						|
		private string GetStringFromAllStrings(int idx)
 | 
						|
		{
 | 
						|
			StringBuilder sb = new StringBuilder();
 | 
						|
			while (AllStrings[idx] != 0)
 | 
						|
			{
 | 
						|
				sb.Append(Convert.ToChar(AllStrings[idx]));
 | 
						|
				idx++;
 | 
						|
			}
 | 
						|
//			return sb.ToString();
 | 
						|
			return GetXMLElementText(sb.ToString());
 | 
						|
		}
 | 
						|
 | 
						|
		private string GetXMLElementText(string instr)
 | 
						|
		{
 | 
						|
			string rtnstr;
 | 
						|
			XmlTextWriter xmlWriter;
 | 
						|
			StringWriter strWriter = new StringWriter();
 | 
						|
			xmlWriter = new XmlTextWriter(strWriter);
 | 
						|
			xmlWriter.WriteString(instr);
 | 
						|
			xmlWriter.Flush();
 | 
						|
			xmlWriter.Close();
 | 
						|
			rtnstr = strWriter.ToString();
 | 
						|
 | 
						|
			// Replace the single quote because ODBC fails if it's in a string.
 | 
						|
			// The single quote represents the beg/end of a string when the string
 | 
						|
			// is sent to ODBC.
 | 
						|
			// *** COMMENT OUT FOR NOW - NOT SURE IF WE NEED TO DO THIS
 | 
						|
			//rtnstr = rtnstr.Replace("\'","'");
 | 
						|
 | 
						|
			return rtnstr;
 | 
						|
		}
 | 
						|
 | 
						|
		private string GetAsciiStringUntilNull(BinaryReader br)
 | 
						|
		{
 | 
						|
			StringBuilder inpstr = new StringBuilder();
 | 
						|
			byte input = 0;
 | 
						|
			int cnt = 0;
 | 
						|
			bool stillread = true;
 | 
						|
			do
 | 
						|
			{
 | 
						|
				try
 | 
						|
				{
 | 
						|
					input = br.ReadByte();
 | 
						|
					if (input==0) stillread=false;
 | 
						|
					inpstr.Append(Convert.ToChar(input));
 | 
						|
				}
 | 
						|
				catch (System.IO.EndOfStreamException)
 | 
						|
				{
 | 
						|
					stillread=false;
 | 
						|
				}
 | 
						|
				cnt++;
 | 
						|
			}while (stillread);
 | 
						|
 | 
						|
			return (inpstr.ToString());
 | 
						|
		}
 | 
						|
 | 
						|
		private string GetAsciiString(BinaryReader br, int len)
 | 
						|
		{
 | 
						|
			StringBuilder inpstr = new StringBuilder();
 | 
						|
			byte input = 0;
 | 
						|
			int cnt = 0;
 | 
						|
			do
 | 
						|
			{
 | 
						|
				try
 | 
						|
				{
 | 
						|
					input = br.ReadByte();
 | 
						|
					inpstr.Append(Convert.ToChar(input));
 | 
						|
				}
 | 
						|
				catch (System.IO.EndOfStreamException)
 | 
						|
				{
 | 
						|
					input = 0;
 | 
						|
					while (cnt < len)
 | 
						|
					{
 | 
						|
						inpstr.Append(Convert.ToChar(input));
 | 
						|
						cnt++;
 | 
						|
					}
 | 
						|
				}
 | 
						|
				cnt++;
 | 
						|
			}while (cnt < len);
 | 
						|
 | 
						|
			return (inpstr.ToString());
 | 
						|
		}
 | 
						|
 | 
						|
		public void LoadFMTFile(string fname)
 | 
						|
		{
 | 
						|
			FmtFileVars FmtVars = new FmtFileVars();
 | 
						|
			string str = null;
 | 
						|
 | 
						|
			// read in title.
 | 
						|
			brFmt = new BinaryReader(File.Open(fname,System.IO.FileMode.Open,System.IO.FileAccess.ReadWrite,FileShare.ReadWrite));
 | 
						|
			short len = brFmt.ReadInt16();
 | 
						|
			string tstr = GetAsciiString(brFmt,len);
 | 
						|
			char []nulls = {Convert.ToChar(0)};
 | 
						|
			FmtVars.Title = tstr.TrimEnd(nulls);
 | 
						|
 | 
						|
			// read in struct name/def name/page file name
 | 
						|
			// - ignore these.
 | 
						|
			for (int i=0;i<3;i++)
 | 
						|
			{
 | 
						|
				len = brFmt.ReadInt16();
 | 
						|
				str = GetAsciiString(brFmt,len);
 | 
						|
			}
 | 
						|
 | 
						|
			// Get the number of Int's, Long's, Char's (bytes)
 | 
						|
			// - This is the number of bytes to the character strings part
 | 
						|
			//   of the format file.
 | 
						|
			short numIntsLongsBytes = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// Read in all the Int, Long, and Char variable values
 | 
						|
			// for the FMT files.  Get the order of the format variables
 | 
						|
			// from the FORMAT.STR file in the 16-bit code (\PROMSNT\FORMAT)
 | 
						|
			// and maps the old 16-bit variables with the 32-bit structures and classes
 | 
						|
 | 
						|
//			short BytesReadIn = 0;
 | 
						|
 | 
						|
			// the first format value is a place holder, read and ignore it.
 | 
						|
			byte skip_byte;
 | 
						|
			ushort skip_short;
 | 
						|
			uint skip_int;
 | 
						|
			
 | 
						|
			// FirstChar
 | 
						|
			skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// XtraFlag[18]
 | 
						|
//			for (int i=0; i < 18; i++)
 | 
						|
//				FmtVars.XtraFlag[i] = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_0 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_1 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_2 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_3 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_4 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_5 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_6 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_7 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_8 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_9 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_10 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_11 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_12 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_13 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_14 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_15 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_16 = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.XtraFlag_17 = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// VEAIRFlag
 | 
						|
//			FmtVars.VEAIRFlag = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.VEAIRFlag = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// PurchaseOption
 | 
						|
//			FmtVars.PurchaseOptions = brFmt.ReadUInt16();
 | 
						|
			FmtVars.FmtFlags.PurchaseOptions = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// EMode
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
			FmtVars.Emode = (skip_short == 1);
 | 
						|
 | 
						|
			// TopRow
 | 
						|
			FmtVars.TopRow = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// Appendlines (ANO, V.C. Summer)
 | 
						|
			skip_short = brFmt.ReadUInt16(); 
 | 
						|
 | 
						|
			// DoPrnDrvrAdjusts
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
			FmtVars.DoPrintDriverAdjustments = (skip_short == 1);
 | 
						|
 | 
						|
			// STStyle[STRUCTDEFTYPES]
 | 
						|
			for (int i=0; i < FmtVars.NumStepSubStepTypes; i++)
 | 
						|
				FmtVars.StepDefinitions[i].TextStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// Att[STRUCTDEFTYPES] (atribute)
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].Color = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// STExtralines[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].BlankLinesAfter = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// STBoxindex[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].BxInfoIdx = brFmt.ReadInt16();
 | 
						|
 | 
						|
			//STTabsindex[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].TabIndex = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// PrintPosAdjust[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].PrintPosAdjust = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// BXStart[MAXBOXES]
 | 
						|
			for (int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
				FmtVars.BoxInfo[i].BoxStart = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// BXEnd[MAXBOXES]
 | 
						|
			for (int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
				FmtVars.BoxInfo[i].BoxEnd = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// BXTxtStart[MAXBOXES]
 | 
						|
			for (int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
				FmtVars.BoxInfo[i].BoxTextStart = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// BXTxtWidth[MAXBOXES]
 | 
						|
			for (int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
				FmtVars.BoxInfo[i].BoxTextWidth = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// BXHeight[MAXBOXES]
 | 
						|
			for (int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
				FmtVars.BoxInfo[i].BoxHeight = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// BXTabPos[MAXBOXES]
 | 
						|
			for (int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
				FmtVars.BoxInfo[i].BoxTabPos = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// TransitionCautionOffset  - V.C. Summer
 | 
						|
			skip_short = brFmt.ReadUInt16(); 
 | 
						|
 | 
						|
			// BXStyle[MAXBOXES]
 | 
						|
			for (int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
				FmtVars.BoxInfo[i].BoxStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// TBStyle[MAXTABS]
 | 
						|
			for (int i=0;i<FmtVars.MaxTabs;i++)
 | 
						|
				FmtVars.TabInfo[i].TbStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// AcTable[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].AccessableTypes = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// EveryNLines[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				FmtVars.StepDefinitions[i].BlankLineAfterGroupOf = brFmt.ReadInt16();
 | 
						|
			}
 | 
						|
 | 
						|
			// AlwaysUpperCase[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
				FmtVars.StepDefinitions[i].UpperCaseTrans = (skip_short == 1);
 | 
						|
			}
 | 
						|
 | 
						|
			// TopOfPageThingStyle
 | 
						|
			FmtVars.TopOfPageThingStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// TopOfPageThingRow
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// TopOfPageThingCol
 | 
						|
			FmtVars.TopOfPageThingCol = brFmt.ReadInt16();
 | 
						|
 | 
						|
			//ModifiedText
 | 
						|
			FmtVars.ModifiedTextSytle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// SeparatorStyle
 | 
						|
			FmtVars.SeparatorStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// SeparatorLocation
 | 
						|
			FmtVars.SeparatorLocation = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// PageBreakAtTypeChange[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
				FmtVars.StepDefinitions[i].PageBreakAtTypeChange = (skip_short == 1);
 | 
						|
			}
 | 
						|
 | 
						|
			// LastLineToStartStep
 | 
						|
			FmtVars.LastLineToStartStep = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// TextTypeValue[10]
 | 
						|
			for (int i=0;i<10;i++)
 | 
						|
			{
 | 
						|
				FmtVars.CautNoteMenuOverride[i].TextTypeValue = brFmt.ReadInt16();
 | 
						|
			}
 | 
						|
 | 
						|
			// DontPrintInSection[1] 
 | 
						|
			for (int i=0;i<10;i++)
 | 
						|
				skip_int = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// LeftMarginReset
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// OmitErgEopUsage
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// LineDrawingOption
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
			FmtVars.LineDrawingOption = true; // alway set to true
 | 
						|
 | 
						|
			// ColS
 | 
						|
			FmtVars.HLSTextStartPos = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// ColSScreenAdj
 | 
						|
			FmtVars.HLSTextStartPosScrnAdj = brFmt.ReadInt16();
 | 
						|
 | 
						|
			//ScrnAdjRNOText
 | 
						|
			FmtVars.RNOTextStartPosScrnAdj = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// ColT
 | 
						|
			FmtVars.CautNoteTextStart = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// ColTincr
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// ColTab
 | 
						|
			skip_short =brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// ColAbs
 | 
						|
			FmtVars.DefaultHLSTextPos = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// WidT
 | 
						|
			FmtVars.CautNoteTextWidth = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// WidTab
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// PMode
 | 
						|
			FmtVars.NumColumns = brFmt.ReadInt16();
 | 
						|
 | 
						|
			//MaxRNO
 | 
						|
			FmtVars.DefaultNumRNOColumns = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// MaxRNOTable[3]
 | 
						|
//			for (int i=0;i<3;i++)
 | 
						|
//				FmtVars.MaxRNOTable[i] = brFmt.ReadInt16();
 | 
						|
			FmtVars.MaxRNOTable.OneColumn = brFmt.ReadInt16();
 | 
						|
			FmtVars.MaxRNOTable.TwoColumn = brFmt.ReadInt16();
 | 
						|
			FmtVars.MaxRNOTable.ThreeColumn = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// ColrTable[3]
 | 
						|
//			for (int i=0;i<3;i++)
 | 
						|
//				FmtVars.StartRNOPosition[i] = brFmt.ReadInt16();
 | 
						|
			FmtVars.StartRNOPosition.OneColumn = brFmt.ReadInt16();
 | 
						|
			FmtVars.StartRNOPosition.TwoColumn = brFmt.ReadInt16();
 | 
						|
			FmtVars.StartRNOPosition.ThreeColumn = brFmt.ReadInt16();
 | 
						|
 | 
						|
//			// WidSTable[3][2]
 | 
						|
			FmtVars.HLSwidth.OneColumn.Edit = brFmt.ReadInt16();
 | 
						|
			FmtVars.HLSwidth.OneColumn.Print = brFmt.ReadInt16();
 | 
						|
			FmtVars.HLSwidth.TwoColumns.Edit = brFmt.ReadInt16();
 | 
						|
			FmtVars.HLSwidth.TwoColumns.Print = brFmt.ReadInt16();
 | 
						|
			FmtVars.HLSwidth.ThreeColumns.Edit = brFmt.ReadInt16();
 | 
						|
			FmtVars.HLSwidth.ThreeColumns.Print = brFmt.ReadInt16();
 | 
						|
//			for (int i=0;i<3;i++)
 | 
						|
//			{
 | 
						|
//				FmtVars.HLSwidth[i].EditWidth = brFmt.ReadInt16();
 | 
						|
//				FmtVars.HLSwidth[i].PrintWidth = brFmt.ReadInt16();
 | 
						|
//			}
 | 
						|
 | 
						|
//				for (int j=0;j<2;j++)
 | 
						|
//					FmtVars.HLSwidth[i,j] = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// ColRScreen[3]
 | 
						|
//			for (int i=0;i<3;i++)
 | 
						|
//				FmtVars.StartRNOPosScrnAdj = brFmt.ReadInt16();
 | 
						|
			FmtVars.StartRNOPosScrnAdj.OneColumn = brFmt.ReadInt16();
 | 
						|
			FmtVars.StartRNOPosScrnAdj.TwoColumn = brFmt.ReadInt16();
 | 
						|
			FmtVars.StartRNOPosScrnAdj.ThreeColumn = brFmt.ReadInt16();
 | 
						|
 | 
						|
			//AdjRNOCol
 | 
						|
			FmtVars.RNOPositionAdj = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// ChangeBarMessage
 | 
						|
			FmtVars.ChangeBarSettings.ChgBarType = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// FixedChangeColumn
 | 
						|
			FmtVars.ChangeBarSettings.FixedChangeColumn = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// FixedAERChangeColumn
 | 
						|
			FmtVars.ChangeBarSettings.FixAERChangeColumn = brFmt.ReadByte();
 | 
						|
 | 
						|
			// BD_PageNumOnCover[3]
 | 
						|
			for (int i=0; i<3; i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// VeSearchLeftMargin
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// VeStdPrtLeftMarE
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			//VeStdPrtLeftMarP
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			//ImperfectStructureSepStyle
 | 
						|
			skip_int = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			//FormsLPI
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			//FormsStyle
 | 
						|
			skip_int = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			//FormsBoxStyle
 | 
						|
			skip_int = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			//FormsMargin
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			//ChangeSummaryLPI
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// ChangeSummaryStyle
 | 
						|
			FmtVars.ChangeSummaryStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// ChangeBarStyle
 | 
						|
			FmtVars.ChangeBarSettings.ChgBarStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// XPosition[3][10]
 | 
						|
			for (int i=0;i<3;i++)
 | 
						|
				for(int j=0;j<10;j++)
 | 
						|
					skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// TitleLength
 | 
						|
			FmtVars.TitleWidthBeforeSplitting = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// CoverTitleLength
 | 
						|
			FmtVars.CoverPgTitleWidthBeforeSplit = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// RightCheckOffBox[4]
 | 
						|
			FmtVars.CheckOffSettings.AERCheckoffBoxPosition = brFmt.ReadInt16();
 | 
						|
			FmtVars.CheckOffSettings.RNOCheckoffBoxPosition = brFmt.ReadInt16();
 | 
						|
			FmtVars.CheckOffSettings.CommitmentMarkPosition = brFmt.ReadInt16();
 | 
						|
			FmtVars.CheckOffSettings.UserSelectedCheckoffPosition = brFmt.ReadInt16();
 | 
						|
 | 
						|
//			FmtVars.CheckOffSettings.CheckoffBoxPosition = new short[4];
 | 
						|
//			for (int i=0; i < 4; i++)
 | 
						|
//				FmtVars.CheckOffSettings.CheckoffBoxPosition[i] = brFmt.ReadInt16();
 | 
						|
 | 
						|
			//TwoCheckOffs
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// RightCheckOffChars[MAXCHECKOFFS]
 | 
						|
			FmtVars.CheckOffSettings.ChkOffScreenNotation = new byte[FmtVars.CheckOffSettings.maxcheckoffs];
 | 
						|
			for (int i=0;i<FmtVars.CheckOffSettings.maxcheckoffs;i++)
 | 
						|
				FmtVars.CheckOffSettings.ChkOffScreenNotation[i] = brFmt.ReadByte();
 | 
						|
 | 
						|
			// CheckoffXtraLines[MAXCHECKOFFS]
 | 
						|
			for (int i=0;i<FmtVars.CheckOffSettings.maxcheckoffs;i++)
 | 
						|
				skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// CheckOffWidAdjust[MAXCHECKOFFS]
 | 
						|
			FmtVars.CheckOffSettings.WidthAdjustment =  new byte[FmtVars.CheckOffSettings.maxcheckoffs];
 | 
						|
			for (int i=0;i<FmtVars.CheckOffSettings.maxcheckoffs;i++)
 | 
						|
				FmtVars.CheckOffSettings.WidthAdjustment[i] = brFmt.ReadByte();
 | 
						|
 | 
						|
			// CheckoffFeatures[MAXCHECKOFFS]
 | 
						|
			for (int i=0;i<FmtVars.CheckOffSettings.maxcheckoffs;i++)
 | 
						|
				skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// CheckOffHeadStyle[MAXCHKHEADINGS]
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffHeaderStyle_0 = brFmt.ReadUInt32();
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffHeaderStyle_1 = brFmt.ReadUInt32();
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffHeaderStyle_2 = brFmt.ReadUInt32();
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffHeaderStyle_3 = brFmt.ReadUInt32();
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffHeaderStyle_4 = brFmt.ReadUInt32();
 | 
						|
			FmtVars.CheckOffSettings.ChkOffHeaderStyle = new ChkOffSytle[FmtVars.CheckOffSettings.MaxCheckoffHeadings];
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffHeaderStyle = new uint[FmtVars.CheckOffSettings.MaxCheckoffHeadings];
 | 
						|
			for (int i=0;i<FmtVars.CheckOffSettings.MaxCheckoffHeadings;i++)
 | 
						|
//				FmtVars.CheckOffSettings.ChkOffHeaderStyle[i] = brFmt.ReadUInt32();
 | 
						|
				FmtVars.CheckOffSettings.ChkOffHeaderStyle[i].Style=brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// UseCheckOffIn
 | 
						|
			FmtVars.CheckOffSettings.UseCheckOffsInTheseSections = brFmt.ReadInt32();
 | 
						|
 | 
						|
			//SmartSubSection
 | 
						|
			skip_int = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// EndMessagePos
 | 
						|
			FmtVars.EndMessageCenterPos = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// CenterTableAdjustment
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// NumberOfLinesForNoteOrCaution
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			//SeqStart[9]
 | 
						|
			for (int i=0;i<9;i++)
 | 
						|
//				FmtVars.SeqStart[i] = brFmt.ReadByte();
 | 
						|
				FmtVars.SeqTabInfo[i].SeqStart = brFmt.ReadByte();
 | 
						|
 | 
						|
			// HighSeqStart
 | 
						|
			FmtVars.HighSeqStart = brFmt.ReadByte();
 | 
						|
 | 
						|
			// IndentToken
 | 
						|
			FmtVars.IndentToken = brFmt.ReadByte();
 | 
						|
 | 
						|
			// ImmStepHdrCol
 | 
						|
			FmtVars.ImmStepHdrCol = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// ImmStepHdrStyle
 | 
						|
			FmtVars.ImmStepHdrStyle =brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// ReplaceFlag[REPLACESIZE]
 | 
						|
			for (int i=0; i < FmtVars.MaxReplaceItems; i++)
 | 
						|
				FmtVars.ReplaceWordList[i].ReplaceFlag = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// RNOWidthAlt[2]
 | 
						|
//			for (int i=0; i < 2; i++)
 | 
						|
//				FmtVars.RNOWidthAlt[i] = brFmt.ReadInt16();
 | 
						|
			FmtVars.RNOWidthAlt.FirstColumn = brFmt.ReadInt16();
 | 
						|
			FmtVars.RNOWidthAlt.SecondColumn = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// HLSWidthOVRD
 | 
						|
			FmtVars.HLSWidthOVRD = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// SecColHdrforActPMode
 | 
						|
			FmtVars.SecColHdrforActPmode = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// AlignWithParentTab[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				skip_byte = brFmt.ReadByte();
 | 
						|
				FmtVars.StepDefinitions[i].AlignWithParentTab = (skip_byte.Equals(1));
 | 
						|
			}
 | 
						|
 | 
						|
			//SectionNumberingStyle
 | 
						|
			FmtVars.SectionNumberingStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// SectionHeaderStyle
 | 
						|
			FmtVars.SectionHeaderStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// SectionNumPos
 | 
						|
			FmtVars.SectionNumPos = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// SectionNumJust
 | 
						|
			FmtVars.SectionNumJust = brFmt.ReadByte();
 | 
						|
 | 
						|
			//SectionHeaderPos
 | 
						|
			FmtVars.SectionHeaderPos = brFmt.ReadInt16();
 | 
						|
 | 
						|
			//SectionHeaderjust
 | 
						|
			FmtVars.SectionHeaderJust = brFmt.ReadByte();
 | 
						|
 | 
						|
			//SectionLevelDelta[MAXSECLEVELS]
 | 
						|
			for (int i=0;i<FmtVars.MaxSectionLevels;i++)
 | 
						|
				skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// SectionTitleLength
 | 
						|
			FmtVars.SectionTitleLength = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// OffsetPageCount
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// RtCheckOffGroups[STRUCTDEFTYPES]
 | 
						|
			for(int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].ChkOffGroups = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// TypeGroups[MAXTYPEGROUPS][MAXTYPEGROUPS]
 | 
						|
			for(int i=0;i<FmtVars.MaxTypeGroups;i++)
 | 
						|
			{
 | 
						|
				for (int j=0;j<FmtVars.MaxTypeGroups;j++)
 | 
						|
					skip_short = brFmt.ReadUInt16();
 | 
						|
			}
 | 
						|
 | 
						|
			// EnhancedSubType[MAXENHANCEDTYPE]
 | 
						|
			for (int i=0;i<FmtVars.MaxEnhancedTypes;i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// SubPaginationWght
 | 
						|
			FmtVars.SubPaginationWght = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// TextTitleAdjustment
 | 
						|
			FmtVars.TextTitleAdjustment = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// STAfterlines[STRUCTDEFTYPES]
 | 
						|
			for(int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// TransType[MAXTRANS]
 | 
						|
			for(int i=0;i<FmtVars.MaxTrans;i++)
 | 
						|
				FmtVars.TransDefs[i].TransType = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TransMode[MAXTRANS]
 | 
						|
			for(int i=0;i<FmtVars.MaxTrans;i++)
 | 
						|
				skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// OutsideTransType[MAXTRANS]
 | 
						|
			for(int i=0;i<FmtVars.MaxTrans;i++)
 | 
						|
				skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// StepTypeWidthOverride[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].WidthOverride = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// TofCSecNumPos
 | 
						|
			FmtVars.AutoTOC.SecNumPos = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TofCSecTitlePos
 | 
						|
			FmtVars.AutoTOC.SecTitlePos = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TofCSecTitlePos2
 | 
						|
			skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TofCSecTitleLen
 | 
						|
			FmtVars.AutoTOC.SecTitleLen = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TofCPageNumPos
 | 
						|
			FmtVars.AutoTOC.PageNumPos = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TofCSpaceChar
 | 
						|
			FmtVars.AutoTOC.SpaceChar = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TofCLineSpacing
 | 
						|
			FmtVars.AutoTOC.LineSpacing = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TofCFont
 | 
						|
			FmtVars.AutoTOC.Font = brFmt.ReadByte();
 | 
						|
 | 
						|
			// SkipStepType[STRUCTDEFTYPE]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// CheckOffAdjustment
 | 
						|
			FmtVars.CheckOffSettings.PosAdjustment = brFmt.ReadByte();
 | 
						|
 | 
						|
			// ColsAdjustInS2
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// SeriesTitleLength
 | 
						|
			skip_byte =brFmt.ReadByte();
 | 
						|
 | 
						|
			// VertPos[STRUCTDEFTYPES][15]
 | 
						|
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				FmtVars.StepDefinitions[i].VertPos = new byte[15];
 | 
						|
				for(int j=0;j<15;j++)
 | 
						|
					FmtVars.StepDefinitions[i].VertPos[j] = brFmt.ReadByte();
 | 
						|
			}
 | 
						|
 | 
						|
			// VertStyle
 | 
						|
			FmtVars.VertStyle = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// TableCenterPos[3]
 | 
						|
			for(int i=0;i<3;i++)
 | 
						|
				FmtVars.TableCenterPos[i] = brFmt.ReadByte();
 | 
						|
 | 
						|
			// LeftJustSeqTab[9]
 | 
						|
			for(int i=0;i<9;i++)
 | 
						|
//				FmtVars.LeftJustSeqTab[i] = brFmt.ReadInt16();
 | 
						|
				FmtVars.SeqTabInfo[i].LeftJustSeqTab = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// SecNumPositionAdj[MAXSECLEVELS]
 | 
						|
			for(int i=0; i < FmtVars.MaxSectionLevels; i++)
 | 
						|
				FmtVars.SectionLevelSettings[i].SecNumPositionAdj = brFmt.ReadByte();
 | 
						|
 | 
						|
			// SecTitlePositionAdj[MAXSECLEVELS]
 | 
						|
			for(int i=0;i<FmtVars.MaxSectionLevels;i++)
 | 
						|
				FmtVars.SectionLevelSettings[i].SecTitlePositionAdj = brFmt.ReadByte();
 | 
						|
 | 
						|
			// ColSByLevel[MAXSECLEVELS]
 | 
						|
			for(int i=0;i<FmtVars.MaxSectionLevels;i++)
 | 
						|
				FmtVars.SectionLevelSettings[i].ColSByLevel = brFmt.ReadByte();
 | 
						|
 | 
						|
			// TofCPositionAdj[MAXSECLEVELS]
 | 
						|
			for(int i=0;i<FmtVars.MaxSectionLevels;i++)
 | 
						|
				FmtVars.SectionLevelSettings[i].TofCPositionAdj = brFmt.ReadByte();
 | 
						|
 | 
						|
			// WidSAdjByLevel[MAXSECLEVELS]
 | 
						|
			for(int i=0;i<FmtVars.MaxSectionLevels;i++)
 | 
						|
				FmtVars.SectionLevelSettings[i].WidSAdjByLevel = brFmt.ReadByte();
 | 
						|
 | 
						|
			// NumberOfHighLevelSteps
 | 
						|
			FmtVars.NumberOfHighLevelSteps = brFmt.ReadByte();
 | 
						|
 | 
						|
			// BXTxtRowAdj[MAXBOXES]
 | 
						|
			for(int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
				FmtVars.BoxInfo[i].BoxTextRowAdj = brFmt.ReadByte();
 | 
						|
 | 
						|
			// StepTypeColOverride[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
				FmtVars.StepDefinitions[i].ColOverride = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// NumberOfSubStepTypes
 | 
						|
			FmtVars.NumberOfSubStepTypes = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// AutoContActSumSection
 | 
						|
			FmtVars.AutoContActSummarySection = brFmt.ReadUInt32();
 | 
						|
 | 
						|
			// LastChar
 | 
						|
			skip_byte = brFmt.ReadByte();
 | 
						|
 | 
						|
			// FirstString
 | 
						|
//			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			/***
 | 
						|
			** The next part of the compiled format file contains all of the strings
 | 
						|
			** used in this format.  Note that duplicat strings are not repeated.
 | 
						|
			** Instead, duplicat strings reference the same occurence of that string.
 | 
						|
			***/
 | 
						|
 | 
						|
			// Read in the number of strings (we can ignor this)
 | 
						|
			short NumStrings = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// Read in the number of bytes the block of the strings take up in the file
 | 
						|
			short NumBytes = brFmt.ReadInt16();
 | 
						|
 | 
						|
			// Put all of the strings in one big byte array
 | 
						|
			AllStrings = new byte[NumBytes];
 | 
						|
			AllStrings = brFmt.ReadBytes(NumBytes);
 | 
						|
 | 
						|
			/***
 | 
						|
			** The last part of the compiled format file contains references into
 | 
						|
			** the block of strings - for each string (char *) format variable.
 | 
						|
			***/
 | 
						|
 | 
						|
			// Read the offset into the byte array and assign the string at that	
 | 
						|
			// position to the corresponding format variable
 | 
						|
			short offset;
 | 
						|
 | 
						|
			// FirstString
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// BXChar[MAXBOXES][NUMBOXCHARS]
 | 
						|
			for (int i=0;i<FmtVars.MaxNumBoxes;i++)
 | 
						|
			{
 | 
						|
//				FmtVars.BoxInfo[i].BoxChar = new string[FmtVars.BoxInfo[i].NumBoxChars];
 | 
						|
				FmtVars.BoxInfo[i].BoxChar = new Txt[FmtVars.BoxInfo[i].NumBoxChars];
 | 
						|
				for(int j=0;j<FmtVars.BoxInfo[i].NumBoxChars;j++)
 | 
						|
				{
 | 
						|
					offset = brFmt.ReadInt16();
 | 
						|
					if (offset > 0)
 | 
						|
//						FmtVars.BoxInfo[i].BoxChar[j] = GetStringFromAllStrings(offset-1);
 | 
						|
//						FmtVars.BoxInfo[i].BoxChar[j].Item = GetStringFromAllStrings(offset-1);
 | 
						|
						FmtVars.BoxInfo[i].BoxChar[j].Text = GetStringFromAllStrings(offset-1);
 | 
						|
				}
 | 
						|
			}
 | 
						|
 | 
						|
			// TBIdent[MAXTABS][2]
 | 
						|
			for (int i=0; i < FmtVars.MaxTabs; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.TabInfo[i].TabFmt.ForEdit = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.TabInfo[i].TabFmt.ForEdit.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.TabInfo[i].TabFmt.ForEdit.Text = GetStringFromAllStrings(offset-1);
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.TabInfo[i].TabFmt.ForPrint = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.TabInfo[i].TabFmt.ForPrint.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.TabInfo[i].TabFmt.ForPrint.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
//				for (int j=0; j < 2; j++)
 | 
						|
//				{
 | 
						|
//					offset = brFmt.ReadInt16();
 | 
						|
//					if (offset > 0)
 | 
						|
//						FmtVars.TabInfo[i].TabFmt[j] = GetStringFromAllStrings(offset-1);
 | 
						|
//				}
 | 
						|
 | 
						|
			// Sep[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.StepDefinitions[i].SeparatorText = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.StepDefinitions[i].SeparatorText.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.StepDefinitions[i].SeparatorText.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// StepPrefix[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.StepDefinitions[i].PrefixText = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.StepDefinitions[i].PrefixText.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.StepDefinitions[i].PrefixText.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// StepSuffix[STRUCTDEFTYPES]
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.StepDefinitions[i].SuffixText = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.StepDefinitions[i].SuffixText.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.StepDefinitions[i].SuffixText.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// IdentB
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.DefaultBullet = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.DefaultBullet.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// SeqTab[9]
 | 
						|
			for (int i=0; i<9; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.SeqSubStpTabFmt[i] = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].SeqSubStpTabFmt = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].SeqSubStpTabFmt.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.SeqTabInfo[i].SeqSubStpTabFmt.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// ReplaceWord[REPLACESIZE]
 | 
						|
			for (int i=0;i<FmtVars.MaxReplaceItems; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ReplaceWordList[i].ReplaceWord = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ReplaceWordList[i].ReplaceWord.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ReplaceWordList[i].ReplaceWord.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
				// ReplaceWith[REPLACESIZE]
 | 
						|
			for (int i=0;i<FmtVars.MaxReplaceItems; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ReplaceWordList[i].ReplaceWith = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ReplaceWordList[i].ReplaceWith.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ReplaceWordList[i].ReplaceWith.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// MatchProcNumber[10]
 | 
						|
			for (int i=0;i<10;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ProcDescriptors[i].MatchProcNumber = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ProcDescriptors[i].MatchProcNumber.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ProcDescriptors[i].MatchProcNumber.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// ProcDescriptor[10]
 | 
						|
			for (int i=0;i<10;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ProcDescriptors[i].ProcDescriptor = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ProcDescriptors[i].ProcDescriptor.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ProcDescriptors[i].ProcDescriptor.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// ProcDescriptor2[10]
 | 
						|
			for (int i=0;i<10;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ProcDescriptors[i].ProcDescriptor2 = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ProcDescriptors[i].ProcDescriptor2.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ProcDescriptors[i].ProcDescriptor2.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// VersionIdText[5]
 | 
						|
			for (int i=0; i<5; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.VersionIdText[i] = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.VersionIDText[i].Text = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.VersionIDText[i].Item = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// DelimiterForTransitionTitle
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.DelimiterForTransitionTitle = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.DelimiterForTransitionTitle.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// SetpSubstepDelimeter
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.StepSubstepDelimeter = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.StepSubstepDelimeter.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			//ThroughString
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.ThroughString = GetStringFromAllStrings(offset-1);
 | 
						|
//				FmtVars.ThroughString.Item = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.ThroughString.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// ProcedureSuffixFlags
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.ProcedureSuffixFlags = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.ProcedureSuffixFlags.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// ProcedureSuffix[10]
 | 
						|
			for (int i=0;i<10;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ProcedureSuffix[i] = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ProcedureSuffix[i].Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ProcedureSuffix[i].Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// PlantDnLoad
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// TopOfPageThing
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.TopOfPageThing = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.TopOfPageThing.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// XTitle[3][10]
 | 
						|
			for (int i=0; i < 30; i++)
 | 
						|
				skip_short= brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// TextType[10]
 | 
						|
			for(int i=0;i<10;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.CautNoteMenuOverride[i].TextType = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.CautNoteMenuOverride[i].TextType.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.CautNoteMenuOverride[i].TextType.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// SectionsToPrint[10]
 | 
						|
			for (int i=0; i < 10; i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// SectionsNumberMask[10]
 | 
						|
			for (int i=0; i < 10; i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// SectionsToPrintTitle[10]
 | 
						|
			for (int i=0; i < 10; i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// DocumentTitleExtensions[10]
 | 
						|
			for (int i=0; i < 10; i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// DocumentFixFileExtensions[10]
 | 
						|
			for (int i=0; i < 10; i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// PreSeqTab[9][2]
 | 
						|
			for (int i =0; i < 9; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.PreSeqSubStepTab[i].ForEdit = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].PreSeqSubStepTab.ForEdit = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].PreSeqSubStepTab.ForEdit.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.SeqTabInfo[i].PreSeqSubStepTab.ForEdit.Text = GetStringFromAllStrings(offset-1);
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.PreSeqSubStepTab[i].ForPrint = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].PreSeqSubStepTab.ForPrint = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].PreSeqSubStepTab.ForPrint.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.SeqTabInfo[i].PreSeqSubStepTab.ForPrint.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
//				for (int j=0; j < 2; j++)
 | 
						|
//				{
 | 
						|
//					offset = brFmt.ReadInt16();
 | 
						|
//					if (offset > 0)
 | 
						|
//						FmtVars.PreSeqSubStp[i,j] = GetStringFromAllStrings(offset-1);
 | 
						|
//				}
 | 
						|
 | 
						|
			// PostSeqTab[9][2]
 | 
						|
			for (int i =0; i<9;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.PostSeqSubStepTab[i].ForEdit = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].PostSeqSubStepTab.ForEdit = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].PostSeqSubStepTab.ForEdit.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.SeqTabInfo[i].PostSeqSubStepTab.ForEdit.Text = GetStringFromAllStrings(offset-1);
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.PostSeqSubStepTab[i].ForPrint = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].PostSeqSubStepTab.ForPrint = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.SeqTabInfo[i].PostSeqSubStepTab.ForPrint.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.SeqTabInfo[i].PostSeqSubStepTab.ForPrint.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
//				for (int j=0; j < 2; j++)
 | 
						|
//				{
 | 
						|
//					offset = brFmt.ReadInt16();
 | 
						|
//					if (offset > 0)
 | 
						|
//						FmtVars.PostSeqSubStp[i,j] = GetStringFromAllStrings(offset-1);
 | 
						|
//				}
 | 
						|
 | 
						|
			// RNOSepString
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.RNOSepString = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.RNOSepString.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// UnderlineTerminate[10]
 | 
						|
			for (int i=0; i < 10; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.UnderlineTerminate[i] = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.UnderlineTerminate[i].Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.UnderlineTerminate[i].Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// ImmStepHdr[2]
 | 
						|
			for (int i=0; i < 2; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ImmStepHdr[i] = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ImmStepHdr[i].Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ImmStepHdr[i].Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// AlternateStepTypes[5]
 | 
						|
			for (int i=0; i < 5; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.AlternateStepTypes[i] = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.AlternateStepTypes[i].Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.AlternateStepTypes[i].Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// AlternateSubTypes[16]
 | 
						|
			for (int i=0; i < 16; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.AlternateSubTypes[i] = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.AlternateSubTypes[i].Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.AlternateSubTypes[i].Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// SpecialChangeBar
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.ChangeBarSettings.ChgBar = GetStringFromAllStrings(offset-1);
 | 
						|
//				FmtVars.ChangeBarSettings.ChgBar.Item = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.ChangeBarSettings.ChgBar.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// ImperfectStructureSeparator
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// ObserveNCString[4][2]
 | 
						|
			for (int i=0; i < 4; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ObserveNCString[i].ForEdit = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ObserveNCString[i].ForEdit.Item = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ObserveNCString[i].ForEdit.Text = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ObserveNCString[i].ForEdit.Text = GetStringFromAllStrings(offset-1);
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.ObserveNCString[i].ForPrint = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ObserveNCString[i].ForPrint.Item = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.ObserveNCString[i].ForPrint.Text = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.ObserveNCString[i].ForPrint.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
//				for (int j=0; j < 2; j++)
 | 
						|
//				{
 | 
						|
//					offset = brFmt.ReadInt16();
 | 
						|
//					if (offset > 0)
 | 
						|
//						FmtVars.ObserveNCString[i,j] = GetStringFromAllStrings(offset-1);
 | 
						|
//				}
 | 
						|
 | 
						|
			//UnderlineTheseChar
 | 
						|
			for (int i=0;i<FmtVars.NumStepSubStepTypes;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if(offset >0)
 | 
						|
//					FmtVars.StepDefinitions[i].UnderlineThese = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.StepDefinitions[i].UnderlineThese.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.StepDefinitions[i].UnderlineThese.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// SubScriptTheseChar
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// RightCheckoffPrompts[MAXCHECKOFFS]
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffMenuItems = new string[FmtVars.CheckOffSettings.maxcheckoffs];
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffMenuItems = new ChkOffItem[FmtVars.CheckOffSettings.maxcheckoffs];
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffMenuItems.Item = new string[FmtVars.CheckOffSettings.maxcheckoffs];
 | 
						|
						FmtVars.CheckOffSettings.ChkOffMenuItems = new Txt[FmtVars.CheckOffSettings.maxcheckoffs];
 | 
						|
			for (int i=0; i < FmtVars.CheckOffSettings.maxcheckoffs; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
				{
 | 
						|
//										FmtVars.CheckOffSettings.ChkOffMenuItems[i] = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.CheckOffSettings.ChkOffMenuItems[i].Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.CheckOffSettings.ChkOffMenuItems[i].Text = GetStringFromAllStrings(offset-1);
 | 
						|
				}
 | 
						|
			}
 | 
						|
 | 
						|
			// CheckOffHeadings[MAXCHKHEADINGS]
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffHeadings = new string[FmtVars.CheckOffSettings.MaxCheckoffHeadings];
 | 
						|
//			FmtVars.CheckOffSettings.ChkOffHeadings = new ChkOffItem[FmtVars.CheckOffSettings.MaxCheckoffHeadings];
 | 
						|
			FmtVars.CheckOffSettings.ChkOffHeadings = new Txt[FmtVars.CheckOffSettings.MaxCheckoffHeadings];
 | 
						|
			for (int i=0; i < FmtVars.CheckOffSettings.MaxCheckoffHeadings; i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset >0)
 | 
						|
				{
 | 
						|
//					FmtVars.CheckOffSettings.ChkOffHeadings[i] = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.CheckOffSettings.ChkOffHeadings[i].Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.CheckOffSettings.ChkOffHeadings[i].Text = GetStringFromAllStrings(offset-1);
 | 
						|
				}
 | 
						|
			}
 | 
						|
 | 
						|
			// WindEditFile
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// PSInfFile
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.PSInfFile = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.PSInfFile.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// RNOPreSeqTab[9][2]
 | 
						|
			for (int i=0;i<9;i++)
 | 
						|
				for (int j=0; j<2; j++)
 | 
						|
					skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// HLStpSeparatorString
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset >0)
 | 
						|
//				FmtVars.HLStpSeparatorString = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.HLStpSeparatorString.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// HLRNOStpSeparatorString
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset >0)
 | 
						|
//					FmtVars.HLRNOStpSeparatorString = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.HLRNOStpSeparatorString.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// RNOTBIdent[MAXTABS][2]
 | 
						|
			for (int i=0;i<FmtVars.MaxTabs;i++)
 | 
						|
			{
 | 
						|
				offset  = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.TabInfo[i].RNOTabFmt.ForEdit = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.TabInfo[i].RNOTabFmt.ForEdit.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.TabInfo[i].RNOTabFmt.ForEdit.Text = GetStringFromAllStrings(offset-1);
 | 
						|
				offset  = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.TabInfo[i].RNOTabFmt.ForPrint = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.TabInfo[i].RNOTabFmt.ForPrint.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.TabInfo[i].RNOTabFmt.ForPrint.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
//				for (int j=0;j<2;j++)
 | 
						|
//				{
 | 
						|
//					offset = brFmt.ReadInt16();
 | 
						|
//					if (offset > 0)
 | 
						|
//						FmtVars.TabInfo[i].RNOTabFmt[j] = GetStringFromAllStrings(offset-1);
 | 
						|
//				}
 | 
						|
 | 
						|
			// LowserLimitDivisor
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.LowerLimitDivisor=GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.LowerLimitDivisor.Text=GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// TransFmt[MAXTRANS]
 | 
						|
			for (int i=0;i<FmtVars.MaxTrans;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.TransDefs[i].TransFmt = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.TransDefs[i].TransFmt.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.TransDefs[i].TransFmt.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// TransMenu[MAXTRANS]
 | 
						|
			for (int i=0;i<FmtVars.MaxTrans;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.TransDefs[i].TransMenu = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.TransDefs[i].TransMenu.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.TransDefs[i].TransMenu.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// OutsideTransFmt[MAXTRANS]
 | 
						|
			for (int i=0;i<FmtVars.MaxTrans;i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// OutsideTransMenu[MAXTRANS]
 | 
						|
			for (int i=0;i<FmtVars.MaxTrans;i++)
 | 
						|
				skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// NonLinkedStepNumber
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.NonLinkedStepNumber = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.NonLinkedStepNumber.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// BldLstFile
 | 
						|
			skip_short = brFmt.ReadUInt16();
 | 
						|
 | 
						|
			// AltPrintTBIdent[MAXTABS]
 | 
						|
			for (int i=0;i<FmtVars.MaxTabs;i++)
 | 
						|
			{
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.TabInfo[i].AltPrintTabFmt = GetStringFromAllStrings(offset-1);
 | 
						|
//					FmtVars.TabInfo[i].AltPrintTabFmt.Item = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.TabInfo[i].AltPrintTabFmt.Text = GetStringFromAllStrings(offset-1);
 | 
						|
			}
 | 
						|
 | 
						|
			// NonLinkedCautNoteNumber
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.NonLinkedCautNoteNumber = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.NonLinkedCautNoteNumber.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// F_DuplexBGDirectory
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.DuplexBGDirectory = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.DuplexBGDirectory.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// F_DuplexDDDirectory
 | 
						|
			offset = brFmt.ReadInt16();
 | 
						|
			if (offset > 0)
 | 
						|
//				FmtVars.DuplexDDDirectory = GetStringFromAllStrings(offset-1);
 | 
						|
				FmtVars.DuplexDDDirectory.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
			// NonLinkedRNONumber
 | 
						|
				offset = brFmt.ReadInt16();
 | 
						|
				if (offset > 0)
 | 
						|
//					FmtVars.NonLinkedRNONumber = GetStringFromAllStrings(offset-1);
 | 
						|
					FmtVars.NonLinkedRNONumber.Text = GetStringFromAllStrings(offset-1);
 | 
						|
 | 
						|
 | 
						|
			
 | 
						|
/***********************************************/
 | 
						|
 | 
						|
			brFmt.Close();
 | 
						|
 | 
						|
			// Now try to xml it....
 | 
						|
			string XMLFileName = "C:\\" + fname.Substring(fname.LastIndexOf("\\")+1) + ".XML";
 | 
						|
			XmlSerializer serializer = new XmlSerializer(typeof(FmtFileVars));
 | 
						|
			TextWriter writer = new StreamWriter(XMLFileName);
 | 
						|
 | 
						|
			serializer.Serialize(writer, FmtVars);
 | 
						|
			writer.Close();
 | 
						|
			MessageBox.Show(XMLFileName,"Created XML File:");
 | 
						|
		}
 | 
						|
	}
 | 
						|
 | 
						|
}
 |