Modified font inheritance logic and disable inheritance logic for PageList items – see comment in the code
700 lines
30 KiB
C#
700 lines
30 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Xml;
|
|
|
|
namespace fmtxml
|
|
{
|
|
public partial class FmtFileToXml
|
|
{
|
|
public void AddPlantSpecific(string genFileName, ref FormatData fmtdata)
|
|
{
|
|
string genName = genFileName.Substring(genFileName.LastIndexOf('\\') + 1);
|
|
genName = genName.Substring(0, genName.IndexOf('.'));
|
|
switch (genName.ToUpper())
|
|
{
|
|
case "TP":
|
|
AddTPFmt(ref fmtdata);
|
|
break;
|
|
case "RGE":
|
|
case "RGESAM1":
|
|
case "RGESAM2":
|
|
case "RGESMPE":
|
|
AddRGEFmt(ref fmtdata);
|
|
break;
|
|
case "WCN2":
|
|
AddWCN2Fmt(ref fmtdata);
|
|
break;
|
|
case "WCNCKL":
|
|
AddWCNCKLFmt(ref fmtdata);
|
|
break;
|
|
case "NSP":
|
|
AddNSPFMT(ref fmtdata);
|
|
break;
|
|
case "NSPARP":
|
|
AddNSPARPfmt(ref fmtdata);
|
|
break;
|
|
}
|
|
}
|
|
|
|
private void AddWCNCKLFmt(ref FormatData fmtdata)
|
|
{
|
|
fmtdata.BoxData[3].End = 518;
|
|
fmtdata.BoxData[4].End = 518;
|
|
fmtdata.StepData[30].StepLayoutData.AlignWithParentTab = "True";
|
|
fmtdata.StepData[2].StepPrintData.Justify = "Center";
|
|
fmtdata.StepData[9].StepPrintData.Justify = "Center";
|
|
}
|
|
|
|
private void AddTPFmt(ref FormatData fmtdata)
|
|
{
|
|
/* Under development
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.TableCenterPos = "146,0,0";
|
|
* */
|
|
// When a plant does not have the TextSubFollowsTextStyle, the 16bit code was adding two characters
|
|
// before the tab if the parent of this step is a Caution or Note. But the two characters was related
|
|
// to the spaces on the parents tab. The code was very hard to follow. This format variable was
|
|
// introduced to allow setting of the number of spaces before the tab.
|
|
fmtdata.StepData[1].CautionOrNoteSubstepIndent = "2";
|
|
}
|
|
private void AddRGEFmt(ref FormatData fmtdata)
|
|
{
|
|
// The RGE formats had a PrintPosAdjust in 16 bit on the High, Immediate, LossocAC & continuous step
|
|
// types with a value of -1 (move back one character). However, on the printed output, it printed
|
|
// as about a 1/4 of a character. This value will be set in the 32bit format file to a -2.4 in
|
|
// these step types.
|
|
fmtdata.StepData[2].StepPrintData.PosAdjust = "-2.4";
|
|
fmtdata.StepData[3].StepPrintData.PosAdjust = "-2.4";
|
|
fmtdata.StepData[9].StepPrintData.PosAdjust = "-2.4";
|
|
fmtdata.StepData[18].StepPrintData.PosAdjust = "-2.4";
|
|
// The RGE formats tabs for HLS were printing one character over to the left in 32 bit, except for
|
|
// immediate (index = 3). Adjust format tab data to make it match 16bit.
|
|
fmtdata.StepData[2].TabData.Ident = " {numeric} ";
|
|
fmtdata.StepData[2].TabData.IdentEdit = " {numeric} ";
|
|
fmtdata.StepData[2].TabData.RNOIdentEdit="";
|
|
fmtdata.StepData[2].TabData.RNOIdent="";
|
|
//fmtdata.StepData[2].TabData.IdentEditWid="";
|
|
//fmtdata.StepData[2].TabData.IdentWid="18";
|
|
//fmtdata.StepData[2].TabData.RNOIdentEditWid="18";
|
|
//fmtdata.StepData[2].TabData.RNOIdentWid = "18";
|
|
fmtdata.StepData[9].TabData.IdentEdit="*{numeric} ";
|
|
fmtdata.StepData[9].TabData.Ident="*{numeric} ";
|
|
fmtdata.StepData[9].TabData.RNOIdentEdit="* ";
|
|
fmtdata.StepData[9].TabData.RNOIdent = "* ";
|
|
}
|
|
private void AddWCN2Fmt(ref FormatData fmtdata)
|
|
{
|
|
// the WCN2 tab for continuous HLS type had only 1 space after the period ('.'). The other
|
|
// tabs had two spaces. This tab type also uses the C0 macro to draw the lines above/below
|
|
// the number. Because it only had 1 space, the tab and lines were not matching the
|
|
// 16bit output. A space is added here to make the continuous HLS type match the number
|
|
// of spaces as other HLS tabs, and to make the printed output match that of 16bit.
|
|
fmtdata.StepData[9].TabData.Ident = fmtdata.StepData[9].TabData.Ident + " ";
|
|
fmtdata.StepData[9].TabData.IdentEdit = fmtdata.StepData[9].TabData.IdentEdit + " ";
|
|
fmtdata.StepData[9].TabData.RNOIdent = fmtdata.StepData[9].TabData.RNOIdent + " ";
|
|
fmtdata.StepData[9].TabData.RNOIdentEdit = fmtdata.StepData[9].TabData.RNOIdentEdit + " ";
|
|
}
|
|
private void AddNSPFMT(ref FormatData fmtdata)
|
|
{
|
|
// Script Caution (original 16-bit font)
|
|
fmtdata.StepData[6].Font.FontFamily = "Prestige Elite Tall";
|
|
fmtdata.StepData[6].Font.FontSize = "10";
|
|
fmtdata.StepData[6].Font.FontStyle = "Italics";
|
|
fmtdata.StepData[6].TabData.Font.FontFamily = "VolianScript";
|
|
fmtdata.StepData[6].TabData.Font.FontSize = "32";
|
|
fmtdata.StepData[6].TabData.Font.FontStyle = "None";
|
|
fmtdata.StepData[6].TabData.Bullet.Separate = "True";
|
|
fmtdata.StepData[6].TabData.Bullet.Font = new VE_Font();
|
|
fmtdata.StepData[6].TabData.Bullet.Font.FontFamily = "Prestige Elite Tall";
|
|
fmtdata.StepData[6].TabData.Bullet.Font.FontSize = "10";
|
|
fmtdata.StepData[6].TabData.Bullet.Font.FontStyle = "None";
|
|
fmtdata.StepData[6].WidthOverride = "421";
|
|
|
|
// Note (original 16-bit font)
|
|
fmtdata.StepData[7].Font.FontFamily = "Prestige Elite Tall";
|
|
fmtdata.StepData[7].Font.FontSize = "10";
|
|
fmtdata.StepData[7].Font.FontStyle = "Italics";
|
|
fmtdata.StepData[7].TabData.Font.FontFamily = "Prestige Elite Tall";
|
|
fmtdata.StepData[7].TabData.Font.FontSize = "10";
|
|
fmtdata.StepData[7].TabData.Font.FontStyle = "None";
|
|
fmtdata.StepData[7].TabData.Bullet.Separate = "True";
|
|
fmtdata.StepData[7].TabData.Bullet.Font = new VE_Font();
|
|
fmtdata.StepData[7].TabData.Bullet.Font.FontFamily = "Prestige Elite Tall";
|
|
fmtdata.StepData[7].TabData.Bullet.Font.FontSize = "10";
|
|
fmtdata.StepData[7].TabData.Bullet.Font.FontStyle = "None";
|
|
fmtdata.StepData[7].WidthOverride = "401";
|
|
|
|
//// Cautions use Arial Font for Tab (instead of Script) and
|
|
//// any bullets following the tab are at a different point size
|
|
//fmtdata.StepData[6].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[6].Font.FontSize = "10";
|
|
//fmtdata.StepData[6].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[6].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[6].TabData.Font.FontSize = "14";
|
|
//fmtdata.StepData[6].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[6].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[6].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[6].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[6].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[6].TabData.Bullet.Font.FontStyle = "Bold";
|
|
//fmtdata.StepData[6].WidthOverride = 421;
|
|
|
|
////fmtdata.StepData[20] = fmtdata.StepData[6];
|
|
////fmtdata.StepData[20].Type = "Caution1";
|
|
////fmtdata.StepData[20].ParentType = "Caution";
|
|
//fmtdata.StepData[20].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[20].Font.FontSize = "10";
|
|
//fmtdata.StepData[20].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[20].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[20].TabData.Font.FontSize = "14";
|
|
//fmtdata.StepData[20].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[20].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[20].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[20].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[20].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[20].TabData.Bullet.Font.FontStyle = "Bold";
|
|
|
|
////fmtdata.StepData[21] = fmtdata.StepData[6];
|
|
////fmtdata.StepData[21].Type = "Caution2";
|
|
////fmtdata.StepData[21].ParentType = "Caution";
|
|
//fmtdata.StepData[21].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[21].Font.FontSize = "10";
|
|
//fmtdata.StepData[21].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[21].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[21].TabData.Font.FontSize = "14";
|
|
//fmtdata.StepData[21].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[21].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[21].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[21].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[21].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[21].TabData.Bullet.Font.FontStyle = "Bold";
|
|
|
|
////fmtdata.StepData[27] = fmtdata.StepData[6];
|
|
////fmtdata.StepData[27].Type = "Caution3";
|
|
////fmtdata.StepData[27].ParentType = "Caution";
|
|
//fmtdata.StepData[27].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[27].Font.FontSize = "10";
|
|
//fmtdata.StepData[27].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[27].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[27].TabData.Font.FontSize = "14";
|
|
//fmtdata.StepData[27].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[27].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[27].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[27].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[27].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[27].TabData.Bullet.Font.FontStyle = "Bold";
|
|
|
|
////fmtdata.StepData[29] = fmtdata.StepData[6];
|
|
////fmtdata.StepData[29].Type = "Caution4";
|
|
////fmtdata.StepData[29].ParentType = "Caution";
|
|
//fmtdata.StepData[29].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[29].Font.FontSize = "10";
|
|
//fmtdata.StepData[29].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[29].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[29].TabData.Font.FontSize = "14";
|
|
//fmtdata.StepData[29].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[29].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[29].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[29].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[29].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[29].TabData.Bullet.Font.FontStyle = "Bold";
|
|
|
|
//// Notes used Arial font and any bullets following the tab are at
|
|
//// a different point size
|
|
//fmtdata.StepData[7].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[7].Font.FontSize = "10";
|
|
//fmtdata.StepData[7].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[7].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[7].TabData.Font.FontSize = "10";
|
|
//fmtdata.StepData[7].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[7].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[7].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[7].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[7].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[7].TabData.Bullet.Font.FontStyle = "Bold";
|
|
//fmtdata.StepData[7].TabData.Ident = "Note ";
|
|
//fmtdata.StepData[7].TabData.RNOIdent = "Note ";
|
|
////fmtdata.StepData[7].TabData.IdentWid = "65.4";
|
|
//fmtdata.StepData[7].WidthOverride = 401;
|
|
|
|
////fmtdata.StepData[22] = fmtdata.StepData[7];
|
|
////fmtdata.StepData[22].Type = "Note1";
|
|
////fmtdata.StepData[22].ParentType = "Note";
|
|
//fmtdata.StepData[22].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[22].Font.FontSize = "10";
|
|
//fmtdata.StepData[22].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[22].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[22].TabData.Font.FontSize = "10";
|
|
//fmtdata.StepData[22].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[22].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[22].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[22].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[22].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[22].TabData.Bullet.Font.FontStyle = "Bold";
|
|
//fmtdata.StepData[22].TabData.Ident = "Note ";
|
|
//fmtdata.StepData[22].TabData.RNOIdent = "Note ";
|
|
////fmtdata.StepData[22].TabData.IdentWid = "65.4";
|
|
|
|
////fmtdata.StepData[23] = fmtdata.StepData[7];
|
|
////fmtdata.StepData[23].Type = "Note2";
|
|
////fmtdata.StepData[23].ParentType = "Note";
|
|
//fmtdata.StepData[23].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[23].Font.FontSize = "10";
|
|
//fmtdata.StepData[23].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[23].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[23].TabData.Font.FontSize = "10";
|
|
//fmtdata.StepData[23].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[23].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[23].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[23].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[23].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[23].TabData.Bullet.Font.FontStyle = "Bold";
|
|
//fmtdata.StepData[23].TabData.Ident = "Note ";
|
|
//fmtdata.StepData[23].TabData.RNOIdent = "Note ";
|
|
////fmtdata.StepData[23].TabData.IdentWid = "65.4";
|
|
|
|
////fmtdata.StepData[26] = fmtdata.StepData[7];
|
|
////fmtdata.StepData[26].Type = "Note3";
|
|
////fmtdata.StepData[26].ParentType = "Note";
|
|
//fmtdata.StepData[26].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[26].Font.FontSize = "10";
|
|
//fmtdata.StepData[26].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[26].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[26].TabData.Font.FontSize = "10";
|
|
//fmtdata.StepData[26].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[26].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[26].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[26].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[26].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[26].TabData.Bullet.Font.FontStyle = "Bold";
|
|
//fmtdata.StepData[26].TabData.Ident = "Note ";
|
|
//fmtdata.StepData[26].TabData.RNOIdent = "Note ";
|
|
////fmtdata.StepData[26].TabData.IdentWid = "65.4";
|
|
|
|
////fmtdata.StepData[28] = fmtdata.StepData[7];
|
|
////fmtdata.StepData[28].Type = "Note4";
|
|
////fmtdata.StepData[28].ParentType = "Note";
|
|
//fmtdata.StepData[28].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[28].Font.FontSize = "10";
|
|
//fmtdata.StepData[28].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[28].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[28].TabData.Font.FontSize = "10";
|
|
//fmtdata.StepData[28].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[28].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[28].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[28].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[28].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[28].TabData.Bullet.Font.FontStyle = "Bold";
|
|
//fmtdata.StepData[28].TabData.Ident = "Note ";
|
|
//fmtdata.StepData[28].TabData.RNOIdent = "Note ";
|
|
////fmtdata.StepData[28].TabData.IdentWid = "65.4";
|
|
|
|
////fmtdata.StepData[32] = fmtdata.StepData[7];
|
|
////fmtdata.StepData[32].Type = "Note5";
|
|
////fmtdata.StepData[32].ParentType = "Note";
|
|
//fmtdata.StepData[32].Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[32].Font.FontSize = "10";
|
|
//fmtdata.StepData[32].Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[32].TabData.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[32].TabData.Font.FontSize = "10";
|
|
//fmtdata.StepData[32].TabData.Font.FontStyle = "Italics, Bold";
|
|
//fmtdata.StepData[32].TabData.Bullet.Separate = "True";
|
|
//fmtdata.StepData[32].TabData.Bullet.Font = new VE_Font();
|
|
//fmtdata.StepData[32].TabData.Bullet.Font.FontFamily = "Arial";
|
|
//fmtdata.StepData[32].TabData.Bullet.Font.FontSize = "10";
|
|
//fmtdata.StepData[32].TabData.Bullet.Font.FontStyle = "Bold";
|
|
//fmtdata.StepData[32].TabData.Ident = "Note ";
|
|
//fmtdata.StepData[32].TabData.RNOIdent = "Note ";
|
|
////fmtdata.StepData[32].TabData.IdentWid = "65.4";
|
|
|
|
}
|
|
private void AddNSPARPfmt(ref FormatData fmtdata)
|
|
{
|
|
fmtdata.StepData[1].TabData.RNOIdentEdit = "";
|
|
fmtdata.StepData[1].TabData.RNOIdent = "";
|
|
}
|
|
|
|
}
|
|
public partial class FmtToXml
|
|
{
|
|
public void AddPlantSpecific(string genFileName, ref PageStyles pgstyles)
|
|
{
|
|
//string genName = genFileName.Substring(genFileName.LastIndexOf('\\') + 1);
|
|
//genName = genName.Substring(0, genName.IndexOf('.'));
|
|
//switch (genName.ToUpper())
|
|
switch (genFileName.ToUpper())
|
|
{
|
|
case "NSP.PAG":
|
|
AddNSPPage(ref pgstyles);
|
|
break;
|
|
case "NSPAB.PAG":
|
|
AddNSPABPage(ref pgstyles);
|
|
break;
|
|
case "NSPAB.Z01":
|
|
AddNSPABPage_Z01(ref pgstyles);
|
|
break;
|
|
case "SHE.PAG":
|
|
AddSHEPage(ref pgstyles);
|
|
break;
|
|
case "RGESAM1.PAG":
|
|
AddRGESam1Page(ref pgstyles);
|
|
break;
|
|
/* Under Development
|
|
case "TP.PAG":
|
|
AddTPPage(ref pgstyles);
|
|
break;
|
|
case "TP.Z00":
|
|
AddTP00Page(ref pgstyles);
|
|
break;
|
|
* */
|
|
}
|
|
}
|
|
|
|
private void AddSHEPage(ref PageStyles pgstyles)
|
|
{
|
|
// Procedure Steps
|
|
pgstyles.PgStyles[0].Items[1].Col = 78; // Column for BOX5 needed adjusted to match 16bit
|
|
}
|
|
// NSP_ALL
|
|
private void AddNSPPage(ref PageStyles pgstyles)
|
|
{
|
|
// Procedure Steps
|
|
pgstyles.PgStyles[0].Items[1].Col = -16; // {HEADER1}
|
|
pgstyles.PgStyles[0].Items[2].Col = 249; // {PROCTITLE} made positioning consistant - will not match 16-bit
|
|
pgstyles.PgStyles[0].Items[5].Col = -16; // {BOX2}
|
|
// Figure Included in Page Count
|
|
pgstyles.PgStyles[1].Items[1].Col = -16; // {HEADER1}
|
|
pgstyles.PgStyles[1].Items[3].Col = 453; // {REV} made positioning consistant - will not match 16-bit
|
|
pgstyles.PgStyles[1].Items[4].Col = 24; // {EOPNUM} made positioning consistant - will not match 16-bit
|
|
pgstyles.PgStyles[1].Items[5].Col = -16; // {BOX1}
|
|
// Cover Sheet 2004 With no Retention
|
|
pgstyles.PgStyles[3].Items[1].Col = -16; // {HEADER1}
|
|
pgstyles.PgStyles[3].Items[3].Col = 453; // {REV} made positioning consistant - will not match 16-bit
|
|
pgstyles.PgStyles[3].Items[4].Col = 24; // {EOPNUM} made positioning consistant - will not match 16-bit
|
|
// Purpose And Entry Conditions with Header Box
|
|
pgstyles.PgStyles[6].Items[1].Col = -16; // {HEADER1}
|
|
pgstyles.PgStyles[6].Items[3].Col = 453; // {REV} made positioning consistant - will not match 16-bit
|
|
pgstyles.PgStyles[6].Items[4].Col = 24; // {EOPNUM} made positioning consistant - will not match 16-bit
|
|
// Two Column Auto Action Pages
|
|
pgstyles.PgStyles[7].Items[1].Col = 505; // {REV} made positioning consistant - will not match 16-bit
|
|
pgstyles.PgStyles[7].Items[2].Col = 505; // {EOPNUM} made positioning consistant - will not match 16-bit
|
|
pgstyles.PgStyles[7].Items[4].Col = -16; // {BOX2}
|
|
// Auto Continuous Action Summary
|
|
pgstyles.PgStyles[8].Items[1].Col = -16; // {HEADER1}
|
|
pgstyles.PgStyles[8].Items[5].Col = -16; // {BOX4}
|
|
}
|
|
private void AddNSPABPage(ref PageStyles pgstyles)
|
|
{
|
|
//Procedure Steps
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[0].Items[1].Col = 294;
|
|
//{COVERPROCTITLE}
|
|
pgstyles.PgStyles[0].Items[6].Col = 293;
|
|
//{EOPNUM}
|
|
pgstyles.PgStyles[0].Items[7].Col = 505;
|
|
//{REV}
|
|
pgstyles.PgStyles[0].Items[8].Col = 513;
|
|
//Page {PAGE} of {OF}
|
|
pgstyles.PgStyles[0].Items[9].Col = 513;
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[0].Items[10].Col = 287;
|
|
|
|
//Purpose and Entry
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[1].Items[1].Col = 287;
|
|
//{COVERPROCTITLE}
|
|
pgstyles.PgStyles[1].Items[5].Col = 293;
|
|
//{EOPNUM}
|
|
pgstyles.PgStyles[1].Items[6].Col = 505;
|
|
//{REV}
|
|
pgstyles.PgStyles[1].Items[7].Col = 513;
|
|
//Page {PAGE} of {OF}
|
|
pgstyles.PgStyles[1].Items[8].Col = 513;
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[1].Items[9].Col = 287;
|
|
|
|
//Cover Page
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[2].Items[1].Col = 250;
|
|
//{COVERPROCTITLE}
|
|
pgstyles.PgStyles[2].Items[6].Col = 249;
|
|
//{EOPNUM}
|
|
pgstyles.PgStyles[2].Items[7].Col = 511;
|
|
//{REV}
|
|
pgstyles.PgStyles[2].Items[8].Col = 513;
|
|
//Page {PAGE} of {OF}
|
|
pgstyles.PgStyles[2].Items[9].Col = 507;
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[2].Items[13].Col = 250;
|
|
}
|
|
private void AddNSPABPage_Z01(ref PageStyles pgstyles)
|
|
{
|
|
//Background Text - First Page
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[0].Items[1].Col = 294;
|
|
//{COVERPROCTITLE}
|
|
pgstyles.PgStyles[0].Items[5].Col = 292;
|
|
//{EOPNUM}
|
|
pgstyles.PgStyles[0].Items[6].Col = 505;
|
|
//{REV}
|
|
pgstyles.PgStyles[0].Items[7].Col = 513;
|
|
//Page {PAGE} of {OF}
|
|
pgstyles.PgStyles[0].Items[8].Col = 512;
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[0].Items[12].Col = 287; // 294;
|
|
|
|
//Background Text - Blank Page
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[1].Items[1].Col = 294;
|
|
//{COVERPROCTITLE}
|
|
pgstyles.PgStyles[1].Items[5].Col = 292;
|
|
//{EOPNUM}
|
|
pgstyles.PgStyles[1].Items[6].Col = 505;
|
|
//{REV}
|
|
pgstyles.PgStyles[1].Items[7].Col = 513;
|
|
//Page {PAGE} of {OF}
|
|
pgstyles.PgStyles[1].Items[8].Col = 512;
|
|
//{PS-CONFSTATE}
|
|
pgstyles.PgStyles[1].Items[10].Col = 287; // 294;
|
|
}
|
|
private void AddRGESam1Page(ref PageStyles pgstyles)
|
|
{
|
|
// CoverPage - add the Revision to the pagelist
|
|
int cnt = pgstyles.PgStyles.Length+1;
|
|
PSItem[] Fpsitms = null;
|
|
PSItem pi = new PSItem();
|
|
pi.Style = new VE_Font();
|
|
|
|
pi.Token = "REVISION {REV}";
|
|
pi.Row = 382;
|
|
pi.Col = 242;
|
|
pi.Justify = "PSCenter";
|
|
pi.Style.FontFamily = "Courier New";
|
|
pi.Style.FontSize = "12";
|
|
pi.Style.CPI = "10";
|
|
Fpsitms = new PSItem[cnt];
|
|
pgstyles.PgStyles[3].Items.CopyTo(Fpsitms, 0);
|
|
Fpsitms[cnt - 1] = pi;
|
|
pgstyles.PgStyles[3].Items = Fpsitms;
|
|
}
|
|
|
|
/* Under Development
|
|
// TP_ALL
|
|
private void AddTPPage(ref PageStyles pgstyles)
|
|
{
|
|
// Procedure Steps
|
|
pgstyles.PgStyles[0].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
|
pgstyles.PgStyles[0].Items[1].Col = -54; // {HEADER1}
|
|
pgstyles.PgStyles[0].Items[1].Row = -13; //{HEADER1}
|
|
pgstyles.PgStyles[0].Items[2].Col = 465; //{PAGE}
|
|
pgstyles.PgStyles[0].Items[3].Col = 45; //{EOPNUM}
|
|
pgstyles.PgStyles[0].Items[4].Col = 249; //{PROCTITLE}
|
|
pgstyles.PgStyles[0].Items[5].Col = 471; //{REV}
|
|
pgstyles.PgStyles[0].Items[6].Col = -54; //{BOX1}
|
|
pgstyles.PgStyles[0].Items[6].Row = -13; //{BOX1}
|
|
pgstyles.PgStyles[0].Items[7].Col = 255; //{FINALPAGE}
|
|
|
|
// cover page
|
|
pgstyles.PgStyles[1].Items[2].Row = 186; //{UnitText}
|
|
pgstyles.PgStyles[1].Items[3].Row = 330; //{EOPNUM}
|
|
pgstyles.PgStyles[1].Items[3].Col = 309; //{EOPNUM}
|
|
pgstyles.PgStyles[1].Items[4].Row = 576; //{COVERTITLE1}
|
|
pgstyles.PgStyles[1].Items[4].Col = 309; //{COVERTITEL1}
|
|
pgstyles.PgStyles[1].Items[5].Row = 594; //{COVERTITLE2}
|
|
pgstyles.PgStyles[1].Items[5].Col = 309; //{COVERTITEL2}
|
|
pgstyles.PgStyles[1].Items[6].Row = 636; //"Continuous Use"
|
|
pgstyles.PgStyles[1].Items[6].Col = 309; //"Continuous Use"
|
|
pgstyles.PgStyles[1].Items[7].Row = 660; //{Box6}
|
|
pgstyles.PgStyles[1].Items[7].Col = 57; //{Box6}
|
|
pgstyles.PgStyles[1].Items[8].Row = 672; //{PS-PROCTYPE}
|
|
pgstyles.PgStyles[1].Items[8].Col = 291; //{PS-PROCTYPE}
|
|
pgstyles.PgStyles[1].Items[9].Row = 696; //{PS-RESPDEPT}
|
|
pgstyles.PgStyles[1].Items[10].Row = 708; //{PS-RESPAPP}
|
|
|
|
//unused - Purpose, Symptoms, Reference
|
|
pgstyles.PgStyles[2].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
|
pgstyles.PgStyles[2].Items[1].Col = -54; // {HEADER1}
|
|
pgstyles.PgStyles[2].Items[1].Row = -13; //{HEADER1}
|
|
pgstyles.PgStyles[2].Items[2].Col = 447; //{PAGE}
|
|
pgstyles.PgStyles[2].Items[3].Col = 33; //{EOPNUM}
|
|
pgstyles.PgStyles[2].Items[4].Col = 249; //{PROCTITLE}
|
|
pgstyles.PgStyles[2].Items[5].Col = 459; //{REV}
|
|
pgstyles.PgStyles[2].Items[6].Col = -54; //{BOX3}
|
|
pgstyles.PgStyles[2].Items[6].Row = -13; //{BOX3}
|
|
pgstyles.PgStyles[2].Items[7].Col = 243; //{FINALPAGE}
|
|
|
|
// Single Column Attachments
|
|
pgstyles.PgStyles[3].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
|
pgstyles.PgStyles[3].Items[1].Col = -54; // {HEADER1}
|
|
pgstyles.PgStyles[3].Items[1].Row = -13; //{HEADER1}
|
|
pgstyles.PgStyles[3].Items[2].Col = 459; //{PAGE}
|
|
pgstyles.PgStyles[3].Items[3].Col = 39; //{EOPNUM}
|
|
pgstyles.PgStyles[3].Items[4].Col = 249; //{PROCTITLE}
|
|
pgstyles.PgStyles[3].Items[5].Col = 459; //{REV}
|
|
pgstyles.PgStyles[3].Items[6].Col = -54; //{BOX3}
|
|
pgstyles.PgStyles[3].Items[6].Row = -13; //{BOX3}
|
|
pgstyles.PgStyles[3].Items[7].Col = 255; //{SECTIONLEVELNUMBER}
|
|
pgstyles.PgStyles[3].Items[8].Col = 255; //{DOCCURPAGE}
|
|
pgstyles.PgStyles[3].Items[10].Col = 243; //{FINALPAGE}
|
|
|
|
//Two Column Attachments
|
|
pgstyles.PgStyles[4].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
|
pgstyles.PgStyles[4].Items[1].Col = -54; // {HEADER1}
|
|
pgstyles.PgStyles[4].Items[1].Row = -13; //{HEADER1}
|
|
pgstyles.PgStyles[4].Items[2].Col = 459; //{PAGE}
|
|
pgstyles.PgStyles[4].Items[3].Col = 39; //{EOPNUM}
|
|
pgstyles.PgStyles[4].Items[4].Col = 249; //{PROCTITLE}
|
|
pgstyles.PgStyles[4].Items[5].Col = 459; //{REV}
|
|
pgstyles.PgStyles[4].Items[6].Col = -54; //{BOX1}
|
|
pgstyles.PgStyles[4].Items[6].Row = -13; //{BOX1}
|
|
pgstyles.PgStyles[4].Items[7].Col = 255; //{SECTIONLEVELNUMBER}
|
|
pgstyles.PgStyles[4].Items[8].Col = 255; //{DOCCURPAGE}
|
|
pgstyles.PgStyles[4].Items[10].Col = 243; //{FINALPAGE}
|
|
|
|
//Ter Editor Attachments
|
|
pgstyles.PgStyles[5].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
|
pgstyles.PgStyles[5].Items[1].Col = -54; // {HEADER1}
|
|
pgstyles.PgStyles[5].Items[1].Row = -13; //{HEADER1}
|
|
pgstyles.PgStyles[5].Items[2].Col = 447; //{PAGE}
|
|
pgstyles.PgStyles[5].Items[3].Col = 33; //{EOPNUM}
|
|
pgstyles.PgStyles[5].Items[4].Col = 237; //{PROCTITLE}
|
|
pgstyles.PgStyles[5].Items[5].Col = 459; //{REV}
|
|
pgstyles.PgStyles[5].Items[6].Col = -54; //{BOX3}
|
|
pgstyles.PgStyles[5].Items[6].Row = -13; //{BOX3}
|
|
pgstyles.PgStyles[5].Items[7].Col = 237; //{SECTIONLEVELNUMBER}
|
|
pgstyles.PgStyles[5].Items[8].Col = 237; //{DOCCURPAGE}
|
|
pgstyles.PgStyles[5].Items[10].Col = 243; //{FINALPAGE}
|
|
|
|
//Duplex Foldout Page
|
|
pgstyles.PgStyles[6].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
|
pgstyles.PgStyles[6].Items[1].Col = -54; // {HEADER1}
|
|
pgstyles.PgStyles[6].Items[1].Row = -13; //{HEADER1}
|
|
pgstyles.PgStyles[6].Items[2].Col = 465; //{PAGE}
|
|
pgstyles.PgStyles[6].Items[4].Col = 39; //{EOPNUM}
|
|
pgstyles.PgStyles[6].Items[5].Col = 471; //{REV}
|
|
pgstyles.PgStyles[6].Items[6].Col = -54; //{BOX3}
|
|
pgstyles.PgStyles[6].Items[6].Row = -13; //{BOX3}
|
|
|
|
//Figures (Ter Editor)
|
|
pgstyles.PgStyles[7].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
|
pgstyles.PgStyles[7].Items[1].Col = -54; // {HEADER1}
|
|
pgstyles.PgStyles[7].Items[1].Row = -13; //{HEADER1}
|
|
pgstyles.PgStyles[7].Items[2].Col = 447; //{PAGE}
|
|
pgstyles.PgStyles[7].Items[3].Col = 27; //{EOPNUM}
|
|
pgstyles.PgStyles[7].Items[4].Col = 237; //{PROCTITLE}
|
|
pgstyles.PgStyles[7].Items[5].Col = 453; //{REV}
|
|
pgstyles.PgStyles[7].Items[6].Col = -54; //{BOX3}
|
|
pgstyles.PgStyles[7].Items[6].Row = -13; //{BOX3}
|
|
pgstyles.PgStyles[7].Items[7].Col = 243; //{SECTIONLEVELNUMBER}
|
|
pgstyles.PgStyles[7].Items[8].Col = 243; //{DOCCURPAGE}
|
|
pgstyles.PgStyles[7].Items[10].Col = 243; //{FINALPAGE}
|
|
}
|
|
|
|
private void AddTP00Page(ref PageStyles pgstyles)
|
|
{
|
|
//Purpose, Symptoms, Reference
|
|
pgstyles.PgStyles[0].Items[0].Col = -3; // {DRAFT}{MASTER}....
|
|
pgstyles.PgStyles[0].Items[1].Col = -66; // {HEADER1}
|
|
pgstyles.PgStyles[0].Items[1].Row = -13; //{HEADER1}
|
|
pgstyles.PgStyles[0].Items[2].Col = 447; //{PAGE}
|
|
pgstyles.PgStyles[0].Items[3].Col = 33; //{EOPNUM}
|
|
pgstyles.PgStyles[0].Items[4].Col = 249; //{PROCTITLE}
|
|
pgstyles.PgStyles[0].Items[5].Col = 459; //{REV}
|
|
pgstyles.PgStyles[0].Items[6].Col = -66; //{BOX3}
|
|
pgstyles.PgStyles[0].Items[6].Row = -13; //{BOX3}
|
|
|
|
}
|
|
* */
|
|
#region DocStyles
|
|
public void AddPlantSpecific(string genFileName, ref DocStyles dcstyles)
|
|
{
|
|
switch (genFileName.ToUpper())
|
|
{
|
|
case "RGESAM1.DOC":
|
|
AddREGSam1DOC(ref dcstyles);
|
|
break;
|
|
case "RGESAM2.DOC":
|
|
AddREGSam2DOC(ref dcstyles);
|
|
break;
|
|
// in shearon harris format, the fonts were set to 0 in the 16bit docstyle.
|
|
// we want them to inherit from plant format, not use the Prestige Elite (font 0)
|
|
// from 16bit, so delete those nodes:
|
|
case "SHE.DOC":
|
|
AddSheDOC(ref dcstyles);
|
|
break;
|
|
// in Wolf Creek single column, the Table Of Contents document style was not included in the
|
|
// count of pages for the automatic Table Of Contents. This page should be counted in the
|
|
// page count when doing the automatic ToC so that page numbers in Toc Match page numbers
|
|
// in the document:
|
|
case "WCN1.DOC":
|
|
AddWCN1Doc(ref dcstyles);
|
|
break;
|
|
}
|
|
}
|
|
|
|
private void AddSheDOC(ref DocStyles dcstyles)
|
|
{
|
|
// fonts (dstyle) in DocStyles that had a '0' in the 16bit format file (she.doc), should
|
|
// inherit from the plant level in 32 bit rather than use Prestige Elite (0 -> Prestige Elite)
|
|
dcstyles.DcStyles[1].dstyle = null;
|
|
dcstyles.DcStyles[2].dstyle = null;
|
|
dcstyles.DcStyles[3].dstyle = null;
|
|
dcstyles.DcStyles[4].dstyle = null;
|
|
dcstyles.DcStyles[5].dstyle = null;
|
|
dcstyles.DcStyles[6].dstyle = null;
|
|
dcstyles.DcStyles[7].dstyle = null;
|
|
dcstyles.DcStyles[8].dstyle = null;
|
|
}
|
|
|
|
public void AddREGSam1DOC(ref DocStyles dcstyles)
|
|
{
|
|
dcstyles.DcStyles[4].numberingsequence = 1; // count this section with total document page count
|
|
}
|
|
|
|
public void AddREGSam2DOC(ref DocStyles dcstyles)
|
|
{
|
|
dcstyles.DcStyles[2].numberingsequence = 1; // count this section with total document page count
|
|
}
|
|
|
|
public void AddWCN1Doc(ref DocStyles dcstyles)
|
|
{
|
|
// remove the 'DontCountInTabOfCont' flag on the cover page so that page counts in the
|
|
// auto table of contents will be correct.
|
|
dcstyles.DcStyles[3].DocStructStyle.DocStyle = dcstyles.DcStyles[3].DocStructStyle.DocStyle.Replace(", DontCountInTabOfCont","");
|
|
}
|
|
#endregion
|
|
}
|
|
public partial class RtfToSvg
|
|
{
|
|
public void AppendPlantSpecific(string genFileName, XmlDocument myDoc)
|
|
{
|
|
string genName = genFileName.Substring(genFileName.LastIndexOf('\\') + 1);
|
|
genName = genName.Substring(0, genName.IndexOf('.'));
|
|
switch (genName.ToUpper())
|
|
{
|
|
case "WCN2":
|
|
AddWCN2(myDoc);
|
|
break;
|
|
case "WCN1":
|
|
AddWCN2(myDoc); // same cover page box as wcn2
|
|
break;
|
|
}
|
|
}
|
|
|
|
private void AddWCN2(XmlDocument myDoc)
|
|
{
|
|
XmlDocument xd = new XmlDocument();
|
|
// include the svg level so that the xmlns can be set to be the same as the generated document.
|
|
xd.LoadXml("<svg xmlns=\"http://www.w3.org/2000/svg\"><g id=\"B9\">\r\n" +
|
|
"<rect x=\"4\" y=\"-3\" width=\"352.5\" height=\"120\" fill=\"none\" stroke=\"black\" stroke-width=\"1.2\" />\r\n" +
|
|
"<line x1=\"4\" y1=\"21\" x2=\"355.5\" y2=\"21\" stroke-width=\"1.2\" />\r\n" +
|
|
"<line x1=\"4\" y1=\"45\" x2=\"355.5\" y2=\"45\" stroke-width=\"1.2\" />\r\n" +
|
|
"<line x1=\"4\" y1=\"69\" x2=\"355.5\" y2=\"69\" stroke-width=\"1.2\" />\r\n" +
|
|
"<line x1=\"4\" y1=\"93\" x2=\"355.5\" y2=\"93\" stroke-width=\"1.2\" />\r\n" +
|
|
"<line x1=\"263\" y1=\"-3\" x2=\"263\" y2=\"118\" stroke-width=\"1.2\" />\r\n" +
|
|
"</g></svg>");
|
|
myDoc.DocumentElement.AppendChild(myDoc.ImportNode(xd.DocumentElement.ChildNodes[0], true));
|
|
}
|
|
}
|
|
}
|