From d944fd635a89ce664794484c73992f37d124ba3e Mon Sep 17 00:00:00 2001 From: Kathy Date: Mon, 26 Apr 2021 13:46:15 +0000 Subject: [PATCH] C2021-024: Wolf Creek Top/Bottom continue message, do not include bullet and bullet or bullet followed by sub-steps in tab C2021-024: Top/Bottom continue message, do not include bullet and bullet or bullet followed by sub-steps in tab --- PROMS/Formats/fmtall/WCN1all.xml | Bin 97298 -> 97526 bytes .../VEPROMS.CSLA.Library/Format/DocStyles.cs | 16 +++++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 25 ++++++++++++------ 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/PROMS/Formats/fmtall/WCN1all.xml b/PROMS/Formats/fmtall/WCN1all.xml index d5a5815493fd6a3a2f7e3129726b97de0ca1e4f9..1cd01cb1d7d67f518f3a751a5e98e975a9d5d2bd 100644 GIT binary patch delta 301 zcmbRAgZ0}_)`l&NTJEYr45)r0}s4 _RemoveBullet; + public bool RemoveBullet // C2021-024: WCN1 if bullet exists in combined tab, stop right before bullet. + { + get + { + return LazyLoad(ref _RemoveBullet, "@RemoveBullet"); + } + } private LazyLoad _Message; [Category("Continue Msg")] [DisplayName("Top Continue Msg")] @@ -921,6 +929,14 @@ namespace VEPROMS.CSLA.Library } #endregion #region Message + private LazyLoad _RemoveBullet; + public bool RemoveBullet // C2021-024: WCN1 if bullet exists in combined tab, stop right before bullet. + { + get + { + return LazyLoad(ref _RemoveBullet, "@RemoveBullet"); + } + } private LazyLoad _Message; [Category("Continue Msg")] [DisplayName("Bottom Continue Msg")] diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 350fdaa8..451fd820 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2727,10 +2727,15 @@ namespace Volian.Print.Library else { // F2020-023: tab includes parent tab and if caution/note don't use its parent, go up another level - if (MyItemInfo.IsCautionOrNotePart) - myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.MyParent.CombinedTab); - else - myMsg = myMsg.Replace(@"%s", MyItemInfo.MyParent.CombinedTab); + string noBullet = MyItemInfo.IsCautionOrNotePart ? MyItemInfo.MyParent.MyParent.CombinedTab : MyItemInfo.MyParent.CombinedTab; + // C2021-024: WCN1 if bullet exists in combined tab, stop right before bullet. + if (docstyle.Continue.Top.RemoveBullet) + { + int ind = noBullet.IndexOf(".o"); + if (ind < 0) ind = noBullet.IndexOf(".*"); + if (ind > -1) noBullet = noBullet.Substring(0, ind); + } + myMsg = myMsg.Replace(@"%s", noBullet); } } if (myMsg.IndexOf(@"%3d") > -1) @@ -3034,10 +3039,14 @@ namespace Volian.Print.Library string tmp = tb.Trim(); if (!MyItemInfo.MyParent.IsHigh) { - if (MyItemInfo.IsCautionOrNotePart) - tmp = MyItemInfo.MyParent.MyParent.CombinedTab.Trim(); - else - tmp = MyItemInfo.MyParent.CombinedTab.Trim(); + tmp = MyItemInfo.IsCautionOrNotePart ? MyItemInfo.MyParent.MyParent.CombinedTab : MyItemInfo.MyParent.CombinedTab; + // C2021-024: WCN1 if bullet exists in combined tab, stop right before bullet. + if (MyItemInfo.MyDocStyle.Continue.Top.RemoveBullet) + { + int ind = tmp.IndexOf(".o"); + if (ind < 0) ind = tmp.IndexOf(".*"); + if (ind > -1) tmp = tmp.Substring(0, ind); + } } myMsg = myMsg.Replace(@"%s", tmp); }