248 lines
12 KiB
C#
248 lines
12 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Xml;
|
|
|
|
namespace fmtxml
|
|
{
|
|
public partial class FmtFileToXml
|
|
{
|
|
private void AddVCSDEVfmt(ref FormatData fmtdata)
|
|
{
|
|
}
|
|
|
|
private void AddSUMfmt(ref FormatData fmtdata)
|
|
{
|
|
fmtdata.ProcData.ChangeBarData.FixedChangeColumn = 91;
|
|
fmtdata.ProcData.TitleLength = 53;
|
|
fmtdata.ProcData.CheckOffData.RelXLocation = 5;
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.SingleColumnRNOIndent = 30;
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.DoSTExtraAtTop = "False";
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.RNOWidthSameAsHighParent = true;
|
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColRTable = "0,258,138";
|
|
fmtdata.SectData.StepSectionData.StpSectEditData.ColRScreen = "0,0,0";
|
|
fmtdata.StepData[2].StepLayoutData.STExtraSpace = "12";
|
|
fmtdata.StepData[3].TabData.RNOIdent = " {numeric}";
|
|
fmtdata.StepData[3].TabData.RNOExcludeMacros = true;
|
|
fmtdata.StepData[3].TabData.MacroTabAdjust = -6;
|
|
fmtdata.StepData[8].StepLayoutData.STBoxindex = null;
|
|
fmtdata.StepData[21].TabData.IsTransition = true;
|
|
fmtdata.StepData[23].TabData.IsTransition = true;
|
|
fmtdata.StepData[3].StepLayoutData.STExtraSpace = "-12345"; //this will put in a null
|
|
fmtdata.StepData[9].StepLayoutData.STExtraSpace = "-12345"; //this will put in a null
|
|
fmtdata.StepData[18].StepLayoutData.STExtraSpace = "-12345"; //this will put in a null
|
|
fmtdata.StepData[41].StepLayoutData.STExtraSpace = "-12345"; //this will put in a null
|
|
fmtdata.BoxData[1].TxtWidth = 420;
|
|
fmtdata.BoxData[2].TxtWidth = 420;
|
|
fmtdata.TransData.AdjustStepTransitionText = true;
|
|
fmtdata.TransData.BoldTransitionExceptHLS = true;
|
|
//fmtdata.TransData.TransTypeData[6].Index = 6;
|
|
//fmtdata.TransData.TransTypeData[6].TransType = 6;
|
|
//fmtdata.TransData.TransTypeData[6].TransFormat = "Step {First Step} of this procedure";
|
|
//fmtdata.TransData.TransTypeData[6].TransMenu = "Step {First Step} of this procedure";
|
|
//fmtdata.TransData.TransTypeData[6].TransUI = "ProcCur, SectMenuAny, StepFirst";
|
|
}
|
|
private void AddSUMOverridefmt(ref FormatData fmtdata)
|
|
{
|
|
fmtdata.StepData[2].StepLayoutData.STExtraSpace = "12";
|
|
fmtdata.StepData[40].StepLayoutData.STExtraSpace = "0";
|
|
}
|
|
|
|
}
|
|
public partial class FmtToXml
|
|
{
|
|
private void AddVCSDEVfmt(ref PageStyles pgstyles)
|
|
{
|
|
}
|
|
private void AddSUMfmt(ref PageStyles pgstyles)
|
|
{
|
|
pgstyles.PgStyles[4].Items[1].Style.FontSize = "14";
|
|
pgstyles.PgStyles[4].Items[2].Style.FontSize = "14";
|
|
Array.Resize<PageStyle>(ref pgstyles.PgStyles, pgstyles.PgStyles.Length + 1);
|
|
pgstyles.PgStyles[12].Name = "Purpose/Symptom";
|
|
pgstyles.PgStyles[12].Index = 12;
|
|
if (pgstyles.PgStyles[12].Items == null)
|
|
Array.Resize<PSItem>(ref pgstyles.PgStyles[12].Items, 7);
|
|
pgstyles.PgStyles[12].Items[0].Col = 3F;
|
|
pgstyles.PgStyles[12].Items[0].Justify = "PSCenter";
|
|
pgstyles.PgStyles[12].Items[0].Row = 12F;
|
|
pgstyles.PgStyles[12].Items[0].Style = new VE_Font();
|
|
pgstyles.PgStyles[12].Items[0].Style.CPI = "12";
|
|
pgstyles.PgStyles[12].Items[0].Style.FontFamily = "Prestige Elite Tall";
|
|
pgstyles.PgStyles[12].Items[0].Style.FontSize = "10";
|
|
pgstyles.PgStyles[12].Items[0].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[12].Items[0].Token = "{DRAFTPAGE}{REFERENCEPAGE}{MASTERPAGE}{SAMPLEPAGE}";
|
|
|
|
pgstyles.PgStyles[12].Items[1].Col = 426.24F;
|
|
pgstyles.PgStyles[12].Items[1].Justify = "PSLeft";
|
|
pgstyles.PgStyles[12].Items[1].Row = 12F;
|
|
pgstyles.PgStyles[12].Items[1].Style = new VE_Font();
|
|
pgstyles.PgStyles[12].Items[1].Style.CPI = "12.5";
|
|
pgstyles.PgStyles[12].Items[1].Style.FontFamily = "Letter Gothic Tall";
|
|
pgstyles.PgStyles[12].Items[1].Style.FontSize = "10";
|
|
pgstyles.PgStyles[12].Items[1].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[12].Items[1].Token = "{EOPNUM}";
|
|
|
|
pgstyles.PgStyles[12].Items[2].Col = 426.24F;
|
|
pgstyles.PgStyles[12].Items[2].Justify = "PSLeft";
|
|
pgstyles.PgStyles[12].Items[2].Row = 24F;
|
|
pgstyles.PgStyles[12].Items[2].Style = new VE_Font();
|
|
pgstyles.PgStyles[12].Items[2].Style.CPI = "12.5";
|
|
pgstyles.PgStyles[12].Items[2].Style.FontFamily = "Letter Gothic Tall";
|
|
pgstyles.PgStyles[12].Items[2].Style.FontSize = "10";
|
|
pgstyles.PgStyles[12].Items[2].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[12].Items[2].Token = "REVISION {REV}";
|
|
|
|
pgstyles.PgStyles[12].Items[3].Col = 426.24F;
|
|
pgstyles.PgStyles[12].Items[3].Justify = "PSLeft";
|
|
pgstyles.PgStyles[12].Items[3].Row = 36F;
|
|
pgstyles.PgStyles[12].Items[3].Style = new VE_Font();
|
|
pgstyles.PgStyles[12].Items[3].Style.CPI = "12.5";
|
|
pgstyles.PgStyles[12].Items[3].Style.FontFamily = "Letter Gothic Tall";
|
|
pgstyles.PgStyles[12].Items[3].Style.FontSize = "10";
|
|
pgstyles.PgStyles[12].Items[3].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[12].Items[3].Token = "{PS-DRAFT}";
|
|
|
|
pgstyles.PgStyles[12].Items[4].Col = 250.56F;
|
|
pgstyles.PgStyles[12].Items[4].Justify = "PSCenter";
|
|
pgstyles.PgStyles[12].Items[4].Row = 48F;
|
|
pgstyles.PgStyles[12].Items[4].Style = new VE_Font();
|
|
pgstyles.PgStyles[12].Items[4].Style.CPI = "12.5";
|
|
pgstyles.PgStyles[12].Items[4].Style.FontFamily = "Letter Gothic Tall";
|
|
pgstyles.PgStyles[12].Items[4].Style.FontSize = "10";
|
|
pgstyles.PgStyles[12].Items[4].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[12].Items[4].Token = "{PROCTITLE}";
|
|
|
|
pgstyles.PgStyles[12].Items[5].Col = -23.04F;
|
|
pgstyles.PgStyles[12].Items[5].Justify = "PSLeft";
|
|
pgstyles.PgStyles[12].Items[5].Row = 60F;
|
|
pgstyles.PgStyles[12].Items[5].Style = new VE_Font();
|
|
pgstyles.PgStyles[12].Items[5].Style.CPI = "12.5";
|
|
pgstyles.PgStyles[12].Items[5].Style.FontFamily = "Letter Gothic Tall";
|
|
pgstyles.PgStyles[12].Items[5].Style.FontSize = "10";
|
|
pgstyles.PgStyles[12].Items[5].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[12].Items[5].Token = "{BOX3}";
|
|
|
|
pgstyles.PgStyles[12].Items[6].Col = 250.56F;
|
|
pgstyles.PgStyles[12].Items[6].Justify = "PSCenter";
|
|
pgstyles.PgStyles[12].Items[6].Row = 756F;
|
|
pgstyles.PgStyles[12].Items[6].Style = new VE_Font();
|
|
pgstyles.PgStyles[12].Items[6].Style.CPI = "12.5";
|
|
pgstyles.PgStyles[12].Items[6].Style.FontFamily = "Letter Gothic Tall";
|
|
pgstyles.PgStyles[12].Items[6].Style.FontSize = "10";
|
|
pgstyles.PgStyles[12].Items[6].Style.FontStyle = "None";
|
|
pgstyles.PgStyles[12].Items[6].Token = "PAGE {PAGE} OF {OF}";
|
|
}
|
|
private void AddVCSDEVDOC(ref DocStyles dcstyles)
|
|
{
|
|
/*
|
|
<Item Token="{SECTIONLEVELNUMBER}" Row="36" Col="426.24" Justify="PSLeft">
|
|
<Font Family="Letter Gothic Tall" Size="10" Style="None" CPI="12.5" />
|
|
</Item>
|
|
*/
|
|
}
|
|
private void AddSUMDOC(ref DocStyles dcstyles)
|
|
{
|
|
dcstyles.DcStyles[0].CenterLineX = 261.9F;
|
|
dcstyles.DcStyles[0].CenterLineYTop = 642.2F;
|
|
//dcstyles.DcStyles[0].CenterLineYBottom = 49.2F;
|
|
dcstyles.DcStyles[0].CenterLineYBottom = 40.2F;
|
|
dcstyles.DcStyles[0].EndString = " - - - - - - - - - - - - - - - - \n - - - - - - - - - - - - - - | End of %-8s | - - - - - - - - - - - - \n - - - - - - - - - - - - - - - -";
|
|
dcstyles.DcStyles[1].CenterLineX = 261.9F;
|
|
dcstyles.DcStyles[1].CenterLineYTop = 678.2F;
|
|
//dcstyles.DcStyles[1].CenterLineYBottom = 49.2F;
|
|
dcstyles.DcStyles[1].CenterLineYBottom = 40.2F;
|
|
dcstyles.DcStyles[1].EndString = " - - - - - - - - - - - - - - - - \n - - - - - - - - - - - - - - | End of %-8s | - - - - - - - - - - - - \n - - - - - - - - - - - - - - - -";
|
|
dcstyles.DcStyles[2].CenterLineX = 261.9F;
|
|
dcstyles.DcStyles[2].CenterLineYTop = 678.2F;
|
|
//dcstyles.DcStyles[2].CenterLineYBottom = 49.2F;
|
|
dcstyles.DcStyles[2].CenterLineYBottom = 40.2F;
|
|
dcstyles.DcStyles[2].FooterLen = 0;
|
|
dcstyles.DcStyles[3].PageWidth = 612.96F;
|
|
dcstyles.DcStyles[4].PageWidth = 612.96F;
|
|
dcstyles.DcStyles[5].PageWidth = 612.96F;
|
|
dcstyles.DcStyles[7].LandscapePageList = true;
|
|
//adding new single column docstyle for purpose and symptoms and
|
|
//single column procedure steps section and
|
|
// single column step editor attachment section
|
|
Array.Resize<DocStyle>(ref dcstyles.DcStyles, dcstyles.DcStyles.Length + 3);
|
|
//jcb single column docstyle for purpose and symptoms
|
|
dcstyles.DcStyles[12].Name = "Purpose/Symptom";
|
|
dcstyles.DcStyles[12].Index = 12;
|
|
dcstyles.DcStyles[12].pagestyle = 12;
|
|
dcstyles.DcStyles[12].CancelSectTitle = false;
|
|
dcstyles.DcStyles[12].FooterLen = 12F;
|
|
dcstyles.DcStyles[12].IsStepSection = true;
|
|
dcstyles.DcStyles[12].LeftMargin = 51.84F;
|
|
dcstyles.DcStyles[12].numberingsequence = 1;
|
|
dcstyles.DcStyles[12].PageLength = 636;
|
|
dcstyles.DcStyles[12].PageWidth = 547.2F;
|
|
dcstyles.DcStyles[12].ShowSectionTitles = true;
|
|
dcstyles.DcStyles[12].SpecialStepsFoldout = false;
|
|
dcstyles.DcStyles[12].TopMargin = 108F;
|
|
dcstyles.DcStyles[12].UseCheckOffs = false;
|
|
dcstyles.DcStyles[12].dstyle = new VE_Font();
|
|
dcstyles.DcStyles[12].dstyle.FontFamily = "Letter Gothic Tall";
|
|
dcstyles.DcStyles[12].dstyle.FontSize = "10";
|
|
dcstyles.DcStyles[12].dstyle.FontStyle = "None";
|
|
dcstyles.DcStyles[12].dstyle.CPI = "12.5";
|
|
//jsj single column Procedure Steps section
|
|
dcstyles.DcStyles[13].Name = "Single Column Procedure Steps";
|
|
dcstyles.DcStyles[13].Index = 13;
|
|
dcstyles.DcStyles[13].pagestyle = 12;
|
|
dcstyles.DcStyles[13].CancelSectTitle = false;
|
|
dcstyles.DcStyles[13].FooterLen = 12F;
|
|
dcstyles.DcStyles[13].IsStepSection = true;
|
|
dcstyles.DcStyles[13].LeftMargin = 51.84F;
|
|
dcstyles.DcStyles[13].numberingsequence = 1;
|
|
dcstyles.DcStyles[13].PageLength = 636;
|
|
dcstyles.DcStyles[13].PageWidth = 547.2F;
|
|
dcstyles.DcStyles[13].SpecialStepsFoldout = false;
|
|
dcstyles.DcStyles[13].TopMargin = 108F;
|
|
dcstyles.DcStyles[13].UseCheckOffs = false;
|
|
dcstyles.DcStyles[13].dstyle = new VE_Font();
|
|
dcstyles.DcStyles[13].dstyle.FontFamily = "Letter Gothic Tall";
|
|
dcstyles.DcStyles[13].dstyle.FontSize = "10";
|
|
dcstyles.DcStyles[13].dstyle.FontStyle = "None";
|
|
dcstyles.DcStyles[13].dstyle.CPI = "12.5";
|
|
//jsj Attachment Steps- Two Column
|
|
dcstyles.DcStyles[14].Name = "Attachment Steps- One Column";
|
|
dcstyles.DcStyles[14].Index = 14;
|
|
dcstyles.DcStyles[14].pagestyle = 5;
|
|
dcstyles.DcStyles[14].CancelSectTitle = false;
|
|
dcstyles.DcStyles[14].FooterLen = 12F;
|
|
dcstyles.DcStyles[14].IsStepSection = true;
|
|
dcstyles.DcStyles[14].LeftMargin = 51.84F;
|
|
dcstyles.DcStyles[14].numberingsequence = 1;
|
|
dcstyles.DcStyles[14].PageLength = 636;
|
|
dcstyles.DcStyles[14].PageWidth = 547.2F;
|
|
dcstyles.DcStyles[14].SpecialStepsFoldout = false;
|
|
dcstyles.DcStyles[14].TopMargin = 108F;
|
|
dcstyles.DcStyles[14].UseCheckOffs = false;
|
|
dcstyles.DcStyles[14].dstyle = new VE_Font();
|
|
dcstyles.DcStyles[14].dstyle.FontFamily = "Letter Gothic Tall";
|
|
dcstyles.DcStyles[14].dstyle.FontSize = "10";
|
|
dcstyles.DcStyles[14].dstyle.FontStyle = "None";
|
|
dcstyles.DcStyles[14].dstyle.CPI = "12.5";
|
|
}
|
|
}
|
|
public partial class RtfToSvg
|
|
{
|
|
private void AddSUM(XmlDocument myDoc)
|
|
{
|
|
XmlDocument xdNew = new XmlDocument();
|
|
// B2
|
|
xdNew.LoadXml("<svg xmlns=\"http://www.w3.org/2000/svg\"> <g id=\"B2\">" +
|
|
"<rect x=\"0\" y=\"4.25\" width=\"519.3\" height=\"677.45\" fill=\"none\" stroke=\"black\" stroke-width=\"0.95\" />" +
|
|
"<line x1=\"0\" y1=\"29.75\" x2=\"519.3\" y2=\"29.75\" stroke=\"black\" stroke-width=\"0.95\" />" +
|
|
"<text x=\"56.65\" y=\"21.25\" font-family=\"Letter Gothic Tall\" font-size=\"10\">ACTION/EXPECTED{sp}RESPONSE</text>" +
|
|
"<line x1=\"261.9\" y1=\"4.25\" x2=\"261.9\" y2=\"44.2\" stroke=\"black\" stroke-width=\"0.95\" />" +
|
|
//<!--line x1="261.9" y1="673.2" x2="261.9" y2="680.85" stroke="black" stroke-width="0.95" /-->
|
|
//<!--line x1="261.9" y1="677.85" x2="261.9" y2="680.85" stroke="black" stroke-width="0.95" /-->
|
|
"<text x=\"339.85\" y=\"21.25\" font-family=\"Letter Gothic Tall\" font-size=\"10\">ALTERNATIVE{sp}ACTION</text>" +
|
|
"</g></svg>");
|
|
myDoc.DocumentElement.ReplaceChild(myDoc.ImportNode(xdNew.DocumentElement.ChildNodes[0], true), myDoc.DocumentElement.ChildNodes[2]);
|
|
}
|
|
}
|
|
}
|