Use vlnParagraph for footnotes so that Change Bars will print (rather than vlnText)
Fixed change bar message writing on top of each other (for ‘ChangeIds’ change bar messages)
This commit is contained in:
parent
f93f1059fb
commit
4ba00691c2
@ -42,7 +42,7 @@ namespace Volian.Print.Library
|
|||||||
// is a single column section.
|
// is a single column section.
|
||||||
//bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
|
//bool _skipEndMessage = MyPageHelper.MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
|
||||||
SectionInfo si = MyItemInfo.MyActiveSection as SectionInfo;
|
SectionInfo si = MyItemInfo.MyActiveSection as SectionInfo;
|
||||||
bool _skipEndMessage = si.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
|
bool _skipEndMessage = si != null && si.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.One && !MyItemInfo.ActiveFormat.MyStepSectionLayoutData.EndForSingle;
|
||||||
|
|
||||||
// TODO: This does not account for a long step as the last step that would exceed more than one page and
|
// TODO: This does not account for a long step as the last step that would exceed more than one page and
|
||||||
// that has an end message that needs to be accounted for in determining pagination. To do that the last
|
// that has an end message that needs to be accounted for in determining pagination. To do that the last
|
||||||
@ -174,9 +174,9 @@ namespace Volian.Print.Library
|
|||||||
bool doSectionTitleContinued = false;
|
bool doSectionTitleContinued = false;
|
||||||
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0)
|
if (MyPageHelper.NotesToFootNotes != null && MyPageHelper.NotesToFootNotes.Count > 0)
|
||||||
{
|
{
|
||||||
float vtnHeight = SixLinesPerInch;
|
float vpHeight = SixLinesPerInch;
|
||||||
foreach (vlnText vtn in MyPageHelper.NotesToFootNotes) vtnHeight += vtn.Height;
|
foreach (vlnParagraph vp in MyPageHelper.NotesToFootNotes) vpHeight += vp.Height;
|
||||||
yEndMsg += vtnHeight; // * vlnPrintObject.SixLinesPerInch);
|
yEndMsg += vpHeight;
|
||||||
}
|
}
|
||||||
if (MyItemInfo.MyPrevious != null && !MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
if (MyItemInfo.MyPrevious != null && !MyItemInfo.IsSection && MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.ContinueSectionHeader)
|
||||||
{
|
{
|
||||||
|
@ -165,11 +165,27 @@ namespace Volian.Print.Library
|
|||||||
cb.Stroke();
|
cb.Stroke();
|
||||||
DebugPdf(cb, XOffset + xAdj - 1.5F, YOffset - yAdj + 4);
|
DebugPdf(cb, XOffset + xAdj - 1.5F, YOffset - yAdj + 4);
|
||||||
DebugPdf(cb, XOffset + xAdj - 1.5F, YChangeBarBottomExtend - yAdj - 1);
|
DebugPdf(cb, XOffset + xAdj - 1.5F, YChangeBarBottomExtend - yAdj - 1);
|
||||||
|
|
||||||
if (Messages != null)
|
if (Messages != null)
|
||||||
{
|
{
|
||||||
|
// if doing messages at top, then remove duplicates if they are next to each other.
|
||||||
|
// If this was not done, the location of messages was not correct.
|
||||||
|
if (_MsgAtTop && Messages.Count > 1)
|
||||||
|
{
|
||||||
|
string lastNoDup = "";
|
||||||
|
SortedDictionary<float, vlnChangeBarMessage> tmpNoDup = new SortedDictionary<float, vlnChangeBarMessage>();
|
||||||
|
foreach (KeyValuePair<float, vlnChangeBarMessage> nodupM in Messages)
|
||||||
|
{
|
||||||
|
vlnChangeBarMessage noDupCmb = (vlnChangeBarMessage)nodupM.Value;
|
||||||
|
if (lastNoDup != noDupCmb.Message) tmpNoDup.Add(nodupM.Key, noDupCmb);
|
||||||
|
lastNoDup = noDupCmb.Message;
|
||||||
|
}
|
||||||
|
Messages = tmpNoDup;
|
||||||
|
}
|
||||||
// Loop through messages for this change bar. The first message is the bottom-most, which is always put out.
|
// Loop through messages for this change bar. The first message is the bottom-most, which is always put out.
|
||||||
// Working up, if the current message is the same as the one below it, don't put it out.
|
// Working up, if the current message is the same as the one below it, don't put it out.
|
||||||
string lastMsg = null;
|
string lastMsg = null;
|
||||||
|
int incrementMsgAtTop = (Messages == null ? 0 : Messages.Count-1);
|
||||||
foreach (KeyValuePair<float, vlnChangeBarMessage> kvp in Messages)
|
foreach (KeyValuePair<float, vlnChangeBarMessage> kvp in Messages)
|
||||||
{
|
{
|
||||||
float yBottom = (float)System.Convert.ToDouble(kvp.Key);
|
float yBottom = (float)System.Convert.ToDouble(kvp.Key);
|
||||||
@ -194,7 +210,11 @@ namespace Volian.Print.Library
|
|||||||
float h = GetParagraphHeight(cb, myparagraph, w);
|
float h = GetParagraphHeight(cb, myparagraph, w);
|
||||||
cb.SetColorFill(changeBarColor);
|
cb.SetColorFill(changeBarColor);
|
||||||
float yloc = yBottom + h - Rtf2Pdf.Offset.Y + 2.7F;
|
float yloc = yBottom + h - Rtf2Pdf.Offset.Y + 2.7F;
|
||||||
if (_MsgAtTop) yloc = YOffset;
|
if (_MsgAtTop)
|
||||||
|
{
|
||||||
|
yloc = YOffset - ((incrementMsgAtTop * h)); // + 2);
|
||||||
|
incrementMsgAtTop--;
|
||||||
|
}
|
||||||
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yloc, w, h, "", yBottomMargin);
|
Rtf2Pdf.TextAt(cb, myparagraph, XOffset + xAdj - Rtf2Pdf.Offset.X + 3, yloc, w, h, "", yBottomMargin);
|
||||||
lastMsg = vcbm.Message;
|
lastMsg = vcbm.Message;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user