Keep headers with related text

Break a page if the item will not fit on the current page
Created ToString method for vlnParagraph
Created ToString method for ParagraphLocation
Changed Between logic for overlap to exclude exact match
This commit is contained in:
Rich
2012-09-21 15:30:59 +00:00
parent 548ac7fea9
commit 17d0839e6c
2 changed files with 25 additions and 14 deletions

View File

@@ -119,6 +119,10 @@ namespace Volian.Print.Library
}
public partial class vlnParagraph : vlnPrintObject
{
public override string ToString()
{
return string.Format("{0} - {1} - '{2}'", this.YTop, this.YSize, this.MyItemInfo.ShortPath);
}
private vlnTable _MyGrid;
public vlnTable MyGrid
{
@@ -2144,6 +2148,10 @@ namespace Volian.Print.Library
}
public class ParagraphLocation
{
public override string ToString()
{
return string.Format("{0} - {1} - '{2}'", this.StepLevel, this.YTop, this.MyParagraph.MyItemInfo.ShortPath);
}
private float _YTop;
public float YTop
{
@@ -2184,7 +2192,7 @@ namespace Volian.Print.Library
return false;
}
public static bool Between(float x, float lower, float higher)
{ return x >= lower && x <= higher; }
{ return x > lower && x < higher; }
public bool Overlap(ParagraphLocation otherParagraphLocation)
{
if (Between(otherParagraphLocation.YTop, YTop, YBottom)) return true; // The top is within the other