Change VlnSvgPageHelper TopMessageR(s) to support multiple vlnText items.
Corrected logic so that the tab is properly formatted in the continue message. Prior to this change the Tab incorrectly underlined the space following the tab
This commit is contained in:
parent
dec6a46080
commit
49ffee4bd0
@ -43,11 +43,11 @@ namespace Volian.Print.Library
|
||||
get { return _TopMessage; }
|
||||
set { _TopMessage = value; }
|
||||
}
|
||||
private vlnText _TopMessageR; // Added if there are 2 messages, in AER AND RNO (for BGE)
|
||||
public vlnText TopMessageR
|
||||
private List<vlnText> _TopMessageRs=new List<vlnText>(); // Added if there are 2 messages, in AER AND RNO (for BGE)
|
||||
public List<vlnText> TopMessageRs
|
||||
{
|
||||
get { return _TopMessageR; }
|
||||
set { _TopMessageR = value; }
|
||||
get { return _TopMessageRs; }
|
||||
set { _TopMessageRs = value; }
|
||||
}
|
||||
private vlnText _TopMessageSub1; // BGE Alarms: in CONDITION/RESPONSE if break within substep
|
||||
public vlnText TopMessageSub1
|
||||
@ -557,10 +557,13 @@ namespace Volian.Print.Library
|
||||
TopMessage.ToPdf(cb, 0, ref tmp, ref tmp);
|
||||
TopMessage = null; // Only output it once.
|
||||
}
|
||||
if (TopMessageR != null)
|
||||
if (TopMessageRs != null && TopMessageRs.Count > 0)
|
||||
{
|
||||
TopMessageR.ToPdf(cb, 0, ref tmp, ref tmp);
|
||||
TopMessageR = null; // Only output it once.
|
||||
foreach (vlnText vt in TopMessageRs)
|
||||
{
|
||||
vt.ToPdf(cb, 0, ref tmp, ref tmp);
|
||||
}
|
||||
TopMessageRs = null; // Only output it once.
|
||||
}
|
||||
if (TopMessageSub1 != null)
|
||||
{
|
||||
|
@ -1253,7 +1253,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
bool addExtraLine = false;
|
||||
string myMsg = docstyle.Continue.Top.Message;
|
||||
MyPageHelper.TopMessageR = null;
|
||||
MyPageHelper.TopMessageRs = new List<vlnText>();
|
||||
if (myMsg != null && myMsg != "")
|
||||
{
|
||||
yPageStart -= 2 * SixLinesPerInch;// Allow two lines for top continue message
|
||||
@ -1278,7 +1278,7 @@ namespace Volian.Print.Library
|
||||
else
|
||||
myMsg = myMsg.Replace(@"%sR", MyItemInfo.MyParent.CombinedTab);
|
||||
float xor = MyTopRNO.MyTab.XOffset;
|
||||
MyPageHelper.TopMessageR = new vlnText(cb, this, myMsg, myMsg, xor, yTopMargin + 0.1F, docstyle.Continue.Top.Font);
|
||||
MyPageHelper.TopMessageRs.Add(new vlnText(cb, this, myMsg, myMsg, xor, yTopMargin + 0.1F, docstyle.Continue.Top.Font));
|
||||
// get aer message, go up parent until find aer and use its combined tab:
|
||||
myAer = MyItemInfo;
|
||||
while (myAer.IsInRNO) myAer = myAer.MyParent;
|
||||
@ -1311,10 +1311,17 @@ namespace Volian.Print.Library
|
||||
// NOTE THAT this code is not complete - the positioning & addition of step tab for within table are not working correctly
|
||||
if ((docstyle.Continue.Top.HLS ?? 0) == 3)
|
||||
{
|
||||
string HLSTabTextForContMsg = MyHighLevelParagraph.MyItemInfo.MyTab.CleanText + " " + MyHighLevelParagraph.MyItemInfo.MyContent.Text;
|
||||
int len = (HLSTabTextForContMsg.Length - 10) * 6;
|
||||
HLSTabTextForContMsg = @"\ul\b " + MyHighLevelParagraph.MyItemInfo.MyTab.CleanText.Trim() + @" \b0\ulnone \b " + MyHighLevelParagraph.MyItemInfo.MyContent.Text + @"\b0";
|
||||
MyPageHelper.TopMessageR = new vlnText(cb, this, HLSTabTextForContMsg, HLSTabTextForContMsg, MyHighLevelParagraph.MyTab.XOffset, yTopMargin + 0.1F, docstyle.Continue.Top.Font);
|
||||
//string HLSTabTextForContMsg = MyHighLevelParagraph.MyItemInfo.MyTab.CleanText + " " + MyHighLevelParagraph.MyItemInfo.MyContent.Text;
|
||||
//int len = (HLSTabTextForContMsg.Length - 10) * 6;
|
||||
string tabText = @"\ul\b " + MyHighLevelParagraph.MyItemInfo.MyTab.CleanText.Trim() + @"\b0\ulnone";
|
||||
string stepText = @"\b " + MyHighLevelParagraph.MyItemInfo.MyContent.Text + @"\b0";
|
||||
//HLSTabTextForContMsg = @"\ul\b " + MyHighLevelParagraph.MyItemInfo.MyTab.CleanText.Trim() + @"\b0\ulnone \b " + MyHighLevelParagraph.MyItemInfo.MyContent.Text + @"\b0";
|
||||
vlnText vt1 = new vlnText(cb, this, tabText, tabText, MyHighLevelParagraph.MyTab.XOffset, yTopMargin + 0.1F, docstyle.Continue.Top.Font);
|
||||
vt1.Width = MyHighLevelParagraph.MyTab.Width;
|
||||
MyPageHelper.TopMessageRs.Add(vt1);
|
||||
vlnText vt2 = new vlnText(cb, this, stepText, stepText, MyHighLevelParagraph.XOffset, yTopMargin + 0.1F, docstyle.Continue.Top.Font);
|
||||
vt2.Width = MyHighLevelParagraph.Width;
|
||||
MyPageHelper.TopMessageRs.Add(vt2);
|
||||
if (subTab != null && MyItemInfo.StepLevel > 2)
|
||||
{
|
||||
float ybot = yTopMargin + (4 * SixLinesPerInch);
|
||||
|
Loading…
x
Reference in New Issue
Block a user