From 5d21567ab9bf9cb91cc934068f5c375c5709f528 Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 14 Oct 2011 10:16:24 +0000 Subject: [PATCH] --- PROMS/fmtxml/AppendPlantSpecific.cs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/PROMS/fmtxml/AppendPlantSpecific.cs b/PROMS/fmtxml/AppendPlantSpecific.cs index f5a4b840..a697895d 100644 --- a/PROMS/fmtxml/AppendPlantSpecific.cs +++ b/PROMS/fmtxml/AppendPlantSpecific.cs @@ -5,6 +5,29 @@ 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; + } + } + + private void AddTPFmt(ref FormatData fmtdata) + { + // 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"; + } + } public partial class RtfToSvg { public void AppendPlantSpecific(string genFileName, XmlDocument myDoc)