From 85c4f9694ddaba51607eca90f5ffda173598325e Mon Sep 17 00:00:00 2001 From: John Date: Thu, 5 Aug 2021 13:23:48 +0000 Subject: [PATCH] C2019-044 Added RowOverride toTop Continue Message to allow us to place the top continue message on the same row as the checkoff header C2019-044 Use the value of RowOverride to place the top continue message on the same row as the checkoff header --- PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs | 16 ++++++++++++++++ PROMS/Volian.Print.Library/vlnParagraph.cs | 17 +++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs index 332bf342..b7ad6149 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs @@ -783,6 +783,22 @@ namespace VEPROMS.CSLA.Library } } #endregion + #region RowOverride + // C2019-044 put in for Barakah Single Column format + // specify the row to put the top continue message + // this allows us to put the Top Continue Message on the same row as the checkoff (initials) header - per their writer's guide + private LazyLoad _RowOverride; + [Category("Continue Msg")] + [DisplayName("Top msg on specific row")] + [Description("Top msg on specific row")] + public float? RowOverride + { + get + { + return LazyLoad(ref _RowOverride, "@RowOverride"); + } + } + #endregion #region UseStepTabs private LazyLoad _UseStepTabs; [Category("Continue Msg")] diff --git a/PROMS/Volian.Print.Library/vlnParagraph.cs b/PROMS/Volian.Print.Library/vlnParagraph.cs index 22c8a711..88427c9c 100644 --- a/PROMS/Volian.Print.Library/vlnParagraph.cs +++ b/PROMS/Volian.Print.Library/vlnParagraph.cs @@ -2673,7 +2673,11 @@ namespace Volian.Print.Library // then DON'T add two lines to the yPageStart (for the top conitnue message) if (myMsg != null && myMsg != "" && !MyItemInfo.IsSection && !MyItemInfo.FormatStepData.PageBreakOnStep) // B2020-123 { - yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message + // C2019-044 for BNPP put the top continue message on the same row as the Checkoff/Signoff header + // This is done by specifing a row positon in the top continue definition in the format. + // If the top continue messsage RowOverride is being used, don't move the yPageStart down (don't need to make room for it) + if (docstyle.Continue.Top.RowOverride == null) + yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message if (myMsg.IndexOf(@"%sR") > -1) { ItemInfo myAer = MyItemInfo.IsHigh ? MyItemInfo : MyItemInfo.MyParent; @@ -2855,7 +2859,16 @@ namespace Volian.Print.Library float colPos = docstyle.Layout.LeftMargin + docstyle.Continue.Top.Margin ?? 0; if (!docstyle.Continue.Top.PlaceAtLeftMargin) //F2019-033 when true position with respect only to the left margin colPos += XOffsetBox; //XOffsetbox get set when the tables, figures & equations were beyond the border and needed repositioned - MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, colPos, yTopMargin + 0.1F, docstyle.Continue.Top.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font); + // C2019-044 for BNPP, put the top continue message on the same row as the checkoff/signoff heading + // RowOverride specifies the position of the top continue message + // For BNPP, RowOverride is set to the same row as the checkoff header is set to in the pagelist + if (docstyle.Continue.Top.RowOverride != null) + { + float adjRowPosition = (float)docstyle.Layout.TopMargin - (float)docstyle.Continue.Top.RowOverride; + MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, colPos, yTopMargin + 0.1F + adjRowPosition, docstyle.Continue.Top.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font); + } + else + MyPageHelper.TopMessage = new vlnText(cb, this, myMsg, myMsg, colPos, yTopMargin + 0.1F, docstyle.Continue.Top.Font);// MyItemInfo.ActiveFormat.PlantFormat.FormatData.Font); } else