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:
Rich
2014-08-18 18:39:36 +00:00
parent dec6a46080
commit 49ffee4bd0
2 changed files with 23 additions and 13 deletions

View File

@@ -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);