Added a SpecialCaseCalvertAlarm flag to keep code changes isolated. Various print fixes TranslateFMT.XSL
360 lines
14 KiB
C#
360 lines
14 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Xml;
|
|
|
|
namespace fmtxml
|
|
{
|
|
public partial class FmtFileToXml
|
|
{
|
|
private void AddBGEALNfmt(ref FormatData fmtdata)
|
|
{
|
|
fmtdata.TPL = "0, 0, 0, 0, 0, 0, title\n1, 1, 65, 10,-19, -32768,\n2, 42, 0, 26, -1, 0,DEVICE\n2, 42, 27, 31, -1, 0,SETPOINT\n2, 42, 0, 0, 0, 0,POSSIBLE CAUSES\n2, 42, 0, 0, 0, 0,AUTOMATIC ACTIONS\n2, 42, 0, 0, 12294, 5186, CONDITION RESPONSE\n2, 42, 0, 0, 0, 0,ANNUNCIATOR COMPENSATORY ACTIONS\n2, 42, 0, 0, 0, 0,REFERENCES\n\n";
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.CautionNoteOrder = "7,6,22"; // Note,Caution,Warning
|
|
fmtdata.SectData.StepSectionData.CompressHPSub = "False";
|
|
fmtdata.SectData.StepSectionData.CompressPropSubSup = "True";
|
|
fmtdata.PrintData.UnitNumber = "True";
|
|
fmtdata.PrintData.SpecialCaseCalvert = "True"; // do I need this for alarms
|
|
fmtdata.PrintData.SpecialCaseCalvertAlarm = "True";
|
|
fmtdata.ProcData.TitleLength = 37;
|
|
fmtdata.ProcData.CoverTitleLength = 45;
|
|
fmtdata.SectData.StepSectionData.SequentialTabFormat[1].TabFormat = " {seq}. ";
|
|
fmtdata.SectData.StepSectionData.SequentialTabFormat[1].PrintTabFormat = " {seq}. ";
|
|
fmtdata.StepData[2].TabData.IdentEdit = "WINDOW ";
|
|
fmtdata.StepData[2].TabData.Ident = "WINDOW ";
|
|
fmtdata.StepData[2].UseOldTemplate = "True";
|
|
fmtdata.StepData[6].StepLayoutData.EveryNLines = "-99";
|
|
fmtdata.StepData[7].StepLayoutData.EveryNLines = "-99";
|
|
fmtdata.StepData[20].StepLayoutData.EveryNLines = "1";
|
|
fmtdata.StepData[22].StepLayoutData.EveryNLines = "-99";
|
|
fmtdata.StepData[43].UseOldTemplate = "True";
|
|
fmtdata.StepData[14].StepLayoutData.EveryNLines = "-99";
|
|
fmtdata.StepData[31].StepLayoutData.EveryNLines = "-99"; // not sure if I need this - inheritance
|
|
fmtdata.StepData[20].StepPrintData.Justify = "Center";
|
|
fmtdata.StepData[20].OneLineBeforeTab = "True";
|
|
fmtdata.BoxData[1].TxtStart = 356;
|
|
fmtdata.BoxData[1].TxtWidth = 130;
|
|
fmtdata.BoxData[1].BXMLS = null;
|
|
fmtdata.BoxData[1].BXMRS = null;
|
|
}
|
|
private void AddBGEEOPfmt(ref FormatData fmtdata)
|
|
{
|
|
fmtdata.SectData.StepSectionData.CompressHPSub = "False";
|
|
fmtdata.SectData.StepSectionData.CompressPropSubSup = "True";
|
|
fmtdata.PrintData.UnitNumber = "True";
|
|
fmtdata.PrintData.SpecialCaseCalvert = "True";
|
|
fmtdata.SectData.SectionNumber.Level0Big = "True";
|
|
fmtdata.SectData.SectionHeader.Level0Big = "True";
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColS = 30;
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColRTable = "0,192,126";
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColT = -16;
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.WidT = 442;
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.TabPtsPerChar = 6.2f;
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.CautionNoteOrder = "29,7,6,22"; // Message,Note,Caution,Warning
|
|
fmtdata.SectData.StepSectionData.SequentialTabFormat[4].TabFormat = "{seq})";
|
|
fmtdata.SectData.StepSectionData.SequentialTabFormat[4].PrintTabFormat = "{seq})";
|
|
fmtdata.TransData.UseSpecificTransitionModifier = "True";
|
|
fmtdata.TransData.UseSpecificPageNo = "True";
|
|
fmtdata.StepData[2].TabData.Ident = " {numeric}. ";
|
|
fmtdata.StepData[2].TabData.IdentEdit = " {numeric}. ";
|
|
fmtdata.StepData[2].TabData.RNOIdent = " . ";
|
|
fmtdata.StepData[2].TabData.RNOIdentEdit = " . ";
|
|
|
|
fmtdata.StepData[6].SeparateBox = "True";
|
|
//fmtdata.StepData[6].MatchUpRNO = "False";
|
|
fmtdata.StepData[7].SeparateBox = "True";
|
|
|
|
//fmtdata.StepData[7].MatchUpRNO = "False";
|
|
fmtdata.StepData[29].CenterOneLineOnly = "False"; // this is BGE's message type (used as paragraph off section.
|
|
fmtdata.StepData[29].MatchUpRNO = "False";
|
|
fmtdata.StepData[29].AlignNullTabWSectHead = "True";
|
|
|
|
// fix caution/notes starting xlocation:
|
|
fmtdata.StepData[6].ColOverride = "72";
|
|
fmtdata.StepData[7].ColOverride = "72";
|
|
fmtdata.StepData[20].ColOverride = "72";
|
|
fmtdata.StepData[21].ColOverride = "72";
|
|
fmtdata.StepData[22].ColOverride = "72";
|
|
fmtdata.StepData[23].ColOverride = "72";
|
|
fmtdata.StepData[26].ColOverride = "72";
|
|
fmtdata.StepData[27].ColOverride = "72";
|
|
fmtdata.StepData[28].ColOverride = "72";
|
|
fmtdata.StepData[29].ColOverride = "72";
|
|
fmtdata.StepData[32].ColOverride = "72";
|
|
|
|
// equip list - don't override width:
|
|
fmtdata.StepData[31].WidthOverride = null;
|
|
fmtdata.StepData[31].WidthOverrideEdit = null;
|
|
|
|
fmtdata.TransData.TransTypeData[4].TransFormat = @"{Sect Num}, \ul {Sect Title}\ulnone , Step {First Step}";
|
|
fmtdata.TransData.TransTypeData[5].TransFormat = @"{Proc Num}, \ul {Proc Title}\ulnone , {Sect Num}, \ul {Sect Title}\ulnone , Step {First Step}";
|
|
fmtdata.TransData.TransTypeData[6].TransFormat = @"{Sect Num}, \ul {Sect Title}\ulnone , Step {First Step}{Page Num}";
|
|
fmtdata.TransData.TransTypeData[9].TransFormat = @"{Proc Num} {IND}\ul {Proc Title}\ulnone ";
|
|
fmtdata.TransData.TransTypeData[10].TransFormat = @"{First Step}, \ul {Step Text}\ulnone {Page Num}";
|
|
}
|
|
private void AddBGEEOPOverridefmt(ref FormatData fmtdata)
|
|
{
|
|
fmtdata.TransData.TransTypeData[0].TransUI = "ProcMenu, SectDefault, StepAllowNone, StepFirst";
|
|
fmtdata.TransData.TransTypeData[4].TransUI = "ProcCur, SectMenuAny, StepAllowNone, StepFirst";
|
|
fmtdata.TransData.TransTypeData[5].TransUI = "ProcMenu, SectMenuAny, StepAllowNone, StepFirst";
|
|
|
|
}
|
|
}
|
|
public partial class FmtToXml
|
|
{
|
|
private void AddBGEEOPDOC(ref DocStyles dcstyles)
|
|
{
|
|
dcstyles.DcStyles[0].TopMargin = 96;
|
|
dcstyles.DcStyles[0].CBLoc = 6;
|
|
dcstyles.DcStyles[1].PageLength = 600;
|
|
dcstyles.DcStyles[1].PageWidth = 552;
|
|
dcstyles.DcStyles[1].EndMargin = 206;
|
|
dcstyles.DcStyles[2].CBMargin = 96;
|
|
dcstyles.DcStyles[2].CBMarginR = 335;
|
|
dcstyles.DcStyles[2].CBLoc = 6;
|
|
dcstyles.DcStyles[2].EndMargin = 75;
|
|
dcstyles.DcStyles[2].PageWidth = 552;
|
|
dcstyles.DcStyles[2].CenterLineX = 240;
|
|
dcstyles.DcStyles[2].CenterLineYTop = 647;
|
|
dcstyles.DcStyles[2].CenterLineYBottom = 24;
|
|
dcstyles.DcStyles[3].PageWidth = 552;
|
|
dcstyles.DcStyles[3].CenterLineX = 240;
|
|
dcstyles.DcStyles[3].CenterLineYTop = 624;
|
|
dcstyles.DcStyles[3].CenterLineYBottom = 24;
|
|
|
|
// Attachment Step
|
|
dcstyles.DcStyles[4].FooterLen = 0;
|
|
dcstyles.DcStyles[4].PageWidth = 552;
|
|
|
|
|
|
// EOP Placekeeper
|
|
dcstyles.DcStyles[12].TopMargin = 138;
|
|
dcstyles.DcStyles[12].PageLength = 609;
|
|
dcstyles.DcStyles[12].LeftMargin = 106;
|
|
|
|
// AOP Placekeeper
|
|
dcstyles.DcStyles[13].TopMargin = 138;
|
|
dcstyles.DcStyles[13].PageLength = 609;
|
|
dcstyles.DcStyles[13].LeftMargin = 106;
|
|
|
|
// various styles without DONTCOUNTINTOC
|
|
dcstyles.DcStyles[6].DocStructStyle.DocStyle = "DontNumberInTOC"; // Cover page
|
|
dcstyles.DcStyles[10].DocStructStyle.DocStyle = "DontNumberInTOC"; // list of effective pages
|
|
dcstyles.DcStyles[11].DocStructStyle.DocStyle = "TableOfContents"; // Table of Contents
|
|
}
|
|
private void AddBGEEOPDOC_Y00(ref DocStyles dcstyles)
|
|
{
|
|
// AOP PlaceKeeper w/ Initials
|
|
dcstyles.DcStyles[2].TopMargin = 138;
|
|
dcstyles.DcStyles[2].PageLength = 609;
|
|
dcstyles.DcStyles[2].LeftMargin = 76;
|
|
}
|
|
private void AddBGEEOPPage(ref PageStyles pgstyles)
|
|
{
|
|
pgstyles.PgStyles[0].Items[2].Col = 480;
|
|
pgstyles.PgStyles[0].Items[3].Col = 480;
|
|
pgstyles.PgStyles[0].Items[4].Col = 480;
|
|
pgstyles.PgStyles[1].Items[2].Col = 480;
|
|
pgstyles.PgStyles[1].Items[3].Col = 480;
|
|
pgstyles.PgStyles[1].Items[4].Col = 480;
|
|
pgstyles.PgStyles[2].Items[2].Col = 480;
|
|
pgstyles.PgStyles[2].Items[3].Col = 480;
|
|
pgstyles.PgStyles[2].Items[4].Col = 480;
|
|
pgstyles.PgStyles[2].Items[6].Col = 120;
|
|
pgstyles.PgStyles[3].Items[6].Col = 246;
|
|
pgstyles.PgStyles[4].Items[2].Col = 480;
|
|
pgstyles.PgStyles[4].Items[3].Col = 480;
|
|
pgstyles.PgStyles[5].Items[2].Col = 480;
|
|
pgstyles.PgStyles[5].Items[3].Col = 480;
|
|
pgstyles.PgStyles[6].Items[2].Col = 474;
|
|
pgstyles.PgStyles[6].Items[3].Col = 474;
|
|
pgstyles.PgStyles[6].Items[4].Col = 474;
|
|
pgstyles.PgStyles[7].Items[2].Col = 474;
|
|
pgstyles.PgStyles[7].Items[3].Col = 474;
|
|
pgstyles.PgStyles[8].Items[2].Col = 474;
|
|
pgstyles.PgStyles[8].Items[3].Col = 474;
|
|
pgstyles.PgStyles[8].Items[4].Col = 474;
|
|
// EOP Placekeeper
|
|
pgstyles.PgStyles[9].Items[1].Col = -16; // BOX5
|
|
pgstyles.PgStyles[9].Items[2].Col = 464; // EOPNUM
|
|
pgstyles.PgStyles[9].Items[3].Col = 464; // REVUNIT
|
|
pgstyles.PgStyles[9].Items[4].Col = 463; // Page {PAGE} of {OF}
|
|
pgstyles.PgStyles[9].Items[5].Col = 227; // PLACEKEEPER
|
|
|
|
Array.Resize<PSItem>(ref pgstyles.PgStyles[9].Items, 7);
|
|
pgstyles.PgStyles[9].Items[6].Token = "NOTE: Continuously applicable steps are designated with a \"C\" in the DONE column."; // Continuous foot note
|
|
pgstyles.PgStyles[9].Items[6].Row = 750; // Continuous foot note
|
|
pgstyles.PgStyles[9].Items[6].Col = 227; // Continuous foot note
|
|
pgstyles.PgStyles[9].Items[6].Justify = "PSCenter"; // Continuous foot note
|
|
pgstyles.PgStyles[9].Items[6].Style = new VE_Font();
|
|
pgstyles.PgStyles[9].Items[6].Style.FontFamily = "Arial";
|
|
pgstyles.PgStyles[9].Items[6].Style.FontSize = "10";
|
|
pgstyles.PgStyles[9].Items[6].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[9].Items[6].Style.CPI = "12";
|
|
|
|
pgstyles.PgStyles[10].Items[2].Col = 474;
|
|
pgstyles.PgStyles[10].Items[3].Col = 474;
|
|
pgstyles.PgStyles[11].Items[2].Col = 480;
|
|
pgstyles.PgStyles[11].Items[3].Col = 480;
|
|
pgstyles.PgStyles[11].Items[4].Col = 480;
|
|
pgstyles.PgStyles[13].Items[2].Col = 474;
|
|
pgstyles.PgStyles[13].Items[3].Col = 474;
|
|
pgstyles.PgStyles[13].Items[4].Col = 474;
|
|
|
|
// AOP Placekeeper
|
|
pgstyles.PgStyles[14].Items[1].Col = -16; // BOX5
|
|
pgstyles.PgStyles[14].Items[2].Col = 464; // EOPNUM
|
|
pgstyles.PgStyles[14].Items[3].Col = 464; // REVUNIT
|
|
pgstyles.PgStyles[14].Items[4].Col = 227; // SECTIONLEVELNUMBER
|
|
pgstyles.PgStyles[14].Items[5].Col = 227; // Page {PAGE} of {OF}
|
|
pgstyles.PgStyles[14].Items[6].Col = 227; // PLACEKEEPER
|
|
|
|
Array.Resize<PSItem>(ref pgstyles.PgStyles[14].Items, 8);
|
|
pgstyles.PgStyles[14].Items[7].Token = "NOTE: Continuously applicable steps are designated with a \"C\"; in the DONE column."; // Continuous foot note
|
|
pgstyles.PgStyles[14].Items[7].Row = 750; // Continuous foot note
|
|
pgstyles.PgStyles[14].Items[7].Col = 227; // Continuous foot note
|
|
pgstyles.PgStyles[14].Items[7].Justify = "PSCenter"; // Continuous foot note
|
|
pgstyles.PgStyles[14].Items[7].Style = new VE_Font();
|
|
pgstyles.PgStyles[14].Items[7].Style.FontFamily = "Arial";
|
|
pgstyles.PgStyles[14].Items[7].Style.FontSize = "10";
|
|
pgstyles.PgStyles[14].Items[7].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[14].Items[7].Style.CPI = "12";
|
|
|
|
}
|
|
private void AddBGEEOPPage_Z00(ref PageStyles pgstyles)
|
|
{
|
|
// AOP PlaceKeeper w/ Initials
|
|
pgstyles.PgStyles[1].Items[1].Col = -16; // BOX5
|
|
pgstyles.PgStyles[1].Items[2].Col = 458; // EOPNUM
|
|
pgstyles.PgStyles[1].Items[3].Col = 458; // REVUNIT
|
|
pgstyles.PgStyles[1].Items[4].Col = 227; // SECTIONLEVELNUMBER
|
|
pgstyles.PgStyles[1].Items[5].Col = 227; // Page {PAGE} of {OF}
|
|
pgstyles.PgStyles[1].Items[6].Col = 227; // PLACEKEEPER
|
|
|
|
Array.Resize<PSItem>(ref pgstyles.PgStyles[1].Items, 8);
|
|
pgstyles.PgStyles[1].Items[7].Token = "NOTE: Continuously applicable steps are designated with a \"C\"in the DONE column."; // Continuous foot note
|
|
pgstyles.PgStyles[1].Items[7].Row = 750; // Continuous foot note
|
|
pgstyles.PgStyles[1].Items[7].Col = 227; // Continuous foot note
|
|
pgstyles.PgStyles[1].Items[7].Justify = "PSCenter"; // Continuous foot note
|
|
pgstyles.PgStyles[1].Items[7].Style = new VE_Font();
|
|
pgstyles.PgStyles[1].Items[7].Style.FontFamily = "Arial";
|
|
pgstyles.PgStyles[1].Items[7].Style.FontSize = "10";
|
|
pgstyles.PgStyles[1].Items[7].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[1].Items[7].Style.CPI = "12";
|
|
}
|
|
|
|
private void AddBGEALNPage(ref PageStyles pgstyles)
|
|
{
|
|
pgstyles.PgStyles[1].Items[4].Token = "{COVERPROCTITLE}";
|
|
|
|
// remove the INIT item in proc steps:
|
|
int numstyles = pgstyles.PgStyles.Length; // number of current PgStyles
|
|
PageStyle[] pgs = new PageStyle[numstyles];
|
|
PageStyle ps;
|
|
// copy existing page lists except for the one with the INIT
|
|
for (int i = 0; i < numstyles - 1; i++)
|
|
{
|
|
if (i != 4)
|
|
{
|
|
ps = new PageStyle();
|
|
ps = pgstyles.PgStyles[i];
|
|
pgs[i] = ps;
|
|
}
|
|
}
|
|
// now do the proc step pageslists without the INIT
|
|
ps = new PageStyle();
|
|
ps.Name = "Procedure Steps";
|
|
ps.Index = 4;
|
|
|
|
PSItem[] Fpsitms = null;
|
|
Fpsitms = new PSItem[6];
|
|
|
|
PSItem pi = new PSItem();
|
|
pi.Token = "{DRAFTPAGE}{REFERENCEPAGE}{MASTERPAGE}{SAMPLEPAGE}";
|
|
pi.Row = 12;
|
|
pi.Col = -3;
|
|
pi.Justify = "PSCenter";
|
|
pi.Style = new VE_Font();
|
|
pi.Style.FontFamily = "Prestige Elite Tall";
|
|
pi.Style.FontSize = "10";
|
|
pi.Style.FontStyle = "None";
|
|
pi.Style.CPI = "12";
|
|
Fpsitms[0] = pi;
|
|
|
|
pi = new PSItem();
|
|
pi.Token = "{EOPNUM}";
|
|
pi.Row = 24;
|
|
pi.Col = 432;
|
|
pi.Justify = "PSLeft";
|
|
pi.Style = new VE_Font();
|
|
pi.Style.FontFamily = "Arial";
|
|
pi.Style.FontSize = "11";
|
|
pi.Style.FontStyle = "Bold";
|
|
pi.Style.CPI = "12";
|
|
Fpsitms[1] = pi;
|
|
|
|
pi = new PSItem();
|
|
pi.Token = "Rev. {REVUNIT}";
|
|
pi.Row = 36;
|
|
pi.Col = 432;
|
|
pi.Justify = "PSLeft";
|
|
pi.Style = new VE_Font();
|
|
pi.Style.FontFamily = "Arial";
|
|
pi.Style.FontSize = "11";
|
|
pi.Style.FontStyle = "Bold";
|
|
pi.Style.CPI = "12";
|
|
Fpsitms[2] = pi;
|
|
|
|
pi = new PSItem();
|
|
pi.Token = "{PROCTITLE}";
|
|
pi.Row = 36;
|
|
pi.Col = 255;
|
|
pi.Justify = "PSCenter";
|
|
pi.Style = new VE_Font();
|
|
pi.Style.FontFamily = "Arial";
|
|
pi.Style.FontSize = "11";
|
|
pi.Style.FontStyle = "Bold";
|
|
pi.Style.CPI = "12";
|
|
Fpsitms[3] = pi;
|
|
|
|
pi = new PSItem();
|
|
pi.Token = "Page {PAGE} of {OF}";
|
|
pi.Row = 48;
|
|
pi.Col = 432;
|
|
pi.Justify = "PSLeft";
|
|
pi.Style = new VE_Font();
|
|
pi.Style.FontFamily = "Arial";
|
|
pi.Style.FontSize = "11";
|
|
pi.Style.FontStyle = "Bold";
|
|
pi.Style.CPI = "12";
|
|
Fpsitms[4] = pi;
|
|
|
|
pi = new PSItem();
|
|
pi.Token = "{BOX5}";
|
|
pi.Row = 48;
|
|
pi.Col = 6;
|
|
pi.Justify = "PSLeft";
|
|
pi.Style = new VE_Font();
|
|
pi.Style.FontFamily = "Arial";
|
|
pi.Style.FontSize = "11";
|
|
pi.Style.FontStyle = "None";
|
|
pi.Style.CPI = "12";
|
|
Fpsitms[5] = pi;
|
|
|
|
ps.Items = Fpsitms;
|
|
pgs[4] = ps;
|
|
|
|
pgstyles.PgStyles = pgs; // save new pagelist
|
|
}
|
|
|
|
private void AddBGEALNDOC(ref DocStyles dcstyles)
|
|
{
|
|
dcstyles.DcStyles[0].ComponentList = true;
|
|
dcstyles.DcStyles[0].PageWidth = 558;
|
|
dcstyles.DcStyles[0].CBLoc = 4;
|
|
dcstyles.DcStyles[0].CBMargin = 35;
|
|
dcstyles.DcStyles[0].CBMarginR = 287;
|
|
}
|
|
}
|
|
}
|