F2019-069: Hold Point designator for Barakah (add Step’s DefaultText attribute)

This commit is contained in:
Kathy Ruffing 2021-07-15 13:07:48 +00:00
parent 0dd4889e5c
commit 8899967a8e
5 changed files with 39 additions and 1 deletions

Binary file not shown.

View File

@ -111,6 +111,7 @@ namespace VEPROMS.CSLA.Library
private bool PrintingSmartTemplate = false;
public string StartText;
public string OriginalText; // compare for save to see if change for links.
public bool AddedDefaultTextFromFmt = false;
private FormatInfo _MyFormat;
#endregion
#region Constructors
@ -218,6 +219,12 @@ namespace VEPROMS.CSLA.Library
text = text.Replace(@"\u9586?", @"\\");
}
_MyStaticItemInfo = _MyItemInfo;
// F2019-069: Add format variable to allow format to specify Default Text for a step. Implemented for Barakah's 'Hold Point'
if (_MyItemInfo.MyContent.Text == "" && _MyItemInfo.FormatStepData.DefaultText != null && _MyItemInfo.FormatStepData.DefaultText != "")
{
text= _MyItemInfo.FormatStepData.DefaultText;
AddedDefaultTextFromFmt = true;
}
text = CreateRtf(colorLinks, text, tableShouldBeOutlined, wordsShouldBeReplaced, numbersShouldBeFormated, tableHasBorder, ROsShouldBeAdjusted, underlineAfterDashSpace, epMode);
_MyStaticItemInfo = null;
StartText = text;

View File

@ -4821,6 +4821,15 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _AppendDotZero, "@AppendDotZero");
}
}
// F2019-069: Barakah Hold Point - set xoffset to parent's tab
private LazyLoad<bool> _ColUseParentTab;
public bool ColUseParentTab
{
get
{
return LazyLoad(ref _ColUseParentTab, "@ColUseParentTab");
}
}
private LazyLoad<float?> _ColOverride;
public float? ColOverride
{
@ -4889,6 +4898,15 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _Suffix, "@Suffix");
}
}
// F2019-069: Barakah Hold Point - allow for default text (for Barakah it is 'Hold Point')
private LazyLoad<string> _DefaultText;
public string DefaultText
{
get
{
return LazyLoad(ref _DefaultText, "@DefaultText");
}
}
private LazyLoad<string> _UnderlineTheseChar;
public string UnderlineTheseChar
{

View File

@ -777,7 +777,11 @@ namespace Volian.Controls.Library
if (MyStepRTB.ReadOnly) return;
if (!MyStepRTB.ActiveMode) return;
if (MyStepRTB.IsExperimenting) return;
if (MyStepRTB.MyItemInfo.MyContent.Number != null && !MyStepRTB.IsDirty && MyStepRTB.Text.Contains("(Resolved Transition Text)") == false) return;
// F2019 - 069: Hold Point designator for Barakah, allow for using Default Text from format
if (MyStepRTB.MyItemInfo.MyContent.Number != null && (!MyStepRTB.IsDirty && !MyStepRTB.OrigDisplayText.AddedDefaultTextFromFmt) && MyStepRTB.Text.Contains("(Resolved Transition Text)") == false) return;
MyStepRTB.OrigDisplayText.AddedDefaultTextFromFmt = false;
bool hasChangeBar = MyStepRTB.MyItemInfo.HasChangeBar;
bool success = MyStepRTB.OrigDisplayText.Save((RichTextBox)MyStepRTB);
if (success)

View File

@ -5805,6 +5805,15 @@ namespace Volian.Print.Library
Width = (float)itemInfo.MyDocStyle.Layout.PageWidth - XOffset - (sitabloc / 2);
return;
}
// F2019-069: Hold Point designator for Barakah, use parent's tab for xoffset
if (itemInfo.IsStep && itemInfo.FormatStepData.ColUseParentTab && (myTab == null || myTab.Text == ""))
{
if (MyParent != null)
{
XOffset = (MyParent.MyTab == null || MyParent.MyTab.Text == null || MyParent.MyTab.Text.Trim() == "") ? MyParent.XOffset : MyParent.MyTab.XOffset;
return;
}
}
float tabWidth = (myTab == null) ? 0 : myTab.Width;
if (itemInfo.IsStepSection)
{