SourceCode/PROMS/fmtxml/PlantSpecific_ComanchePeak.cs
2013-09-25 14:33:37 +00:00

78 lines
2.6 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace fmtxml
{
public partial class FmtFileToXml
{
private void AddTuecfmt(ref FormatData fmtdata) // Comanche Peak
{
// High Level Step
fmtdata.StepData[2].TabData.Ident = " {numeric} ";
// Imediate Action High Level Step
fmtdata.StepData[3].TabData.Ident = "{!C0}{numeric} ";
// Caution
fmtdata.StepData[6].OneLineBeforeTab = "True";
// Note
fmtdata.StepData[7].OneLineBeforeTab = "True";
// Continuous Action High Level Step
fmtdata.StepData[9].TabData.Ident = "*{numeric} ";
// Caution 2
fmtdata.StepData[21].ParentType = "Base";
//fmtdata.SectData.StepSectionData.StpSectLayData.WidSTablePrint = "437,193,114";
//fmtdata.BoxData[1].End = 457; // caution box
}
//private void AddCPLOverridefmt(ref FormatData fmtdata)
//{
// fmtdata.BoxData[1].BXLLC = "-12345"; //this will put in a null string
// fmtdata.BoxData[1].BXULC = "-12345"; //this will put in a null string
// fmtdata.BoxData[1].BXVert = "-12345"; //this will put in a null string
// fmtdata.BoxData[1].BXURC = "-12345"; //this will put in a null string
// fmtdata.BoxData[1].BXULC = "-12345"; //this will put in a null string
//}
}
public partial class FmtToXml
{
private void AddTUECPage(ref PageStyles pgstyles)
{
// Procedure Steps
pgstyles.PgStyles[0].Items[2].Token = "UNIT {UNITNUMBER}";
// Cover Page
pgstyles.PgStyles[1].Items[3].Token = "UNIT {UNITNUMBER}";
// Cover Page with ECC Stamp
pgstyles.PgStyles[2].Items[3].Token = "UNIT {UNITNUMBER}";
// Introduction & Appendix Pages
pgstyles.PgStyles[3].Items[3].Token = "UNIT {UNITNUMBER}";
//Cover Page with Small Stamp
pgstyles.PgStyles[4].Items[3].Token = "UNIT {UNITNUMBER}";
}
private void AddTUCEDOC(ref DocStyles dcstyles)
{
// Cover Page
dcstyles.DcStyles[1].PageLength = 620;
// Cover Page with ECC Stamp
dcstyles.DcStyles[2].PageLength = 620;
// Introduction & Appendix Pages
dcstyles.DcStyles[3].PageLength = 640;
// Cover Page with Small Stamp
dcstyles.DcStyles[4].PageLength = 620;
}
}
public partial class RtfToSvg
{
private void AddTUEC(XmlDocument myDoc)
{
XmlDocument xdNew = new XmlDocument();
xdNew.LoadXml("<svg xmlns=\"http://www.w3.org/2000/svg\"> <g id=\"C0\">" +
"<ellipse cx=\"6\" cy=\"-3.2\" rx=\"11.1\" ry=\"11.1\" fill=\"none\" stroke=\"black\" stroke-width=\"1.9\" />" +
"</g></svg>");
myDoc.DocumentElement.ReplaceChild(myDoc.ImportNode(xdNew.DocumentElement.ChildNodes[0], true), myDoc.DocumentElement.ChildNodes[12]);
}
}
}