This commit is contained in:
@@ -252,5 +252,44 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
|
||||
}
|
||||
#if DEBUG
|
||||
// The following code generates an XML output for the selected item for print testing.
|
||||
private void btnPageBreak_Click(object sender, EventArgs e)
|
||||
{
|
||||
// This is here temporarily to get a node and all of it's children for print testing.
|
||||
OutputAllChildren(MyStepItem);
|
||||
}
|
||||
private void OutputAllChildren(StepItem myStepItem)
|
||||
{
|
||||
OutputAllChildren(myStepItem.MyBeforeStepItems);
|
||||
OutputStepInfo(myStepItem);
|
||||
OutputAllChildren(myStepItem.MyAfterStepItems);
|
||||
OutputAllChildren(myStepItem.MyRNOStepItems);
|
||||
}
|
||||
private void OutputStepInfo(StepItem myStepItem)
|
||||
{
|
||||
Label lbl = myStepItem.MyLabel;
|
||||
if (lbl.Text.Trim() != "")
|
||||
Console.WriteLine("<text x='{0}In' y='{1}In' font-family='{2}' font-size='{3}Pt'>{4}</text>",
|
||||
ToInches(myStepItem.Left + lbl.Left), ToInches(myStepItem.Top + lbl.Top),
|
||||
lbl.Font.FontFamily.Name,lbl.Font.SizeInPoints,lbl.Text);
|
||||
StepRTB rtb = myStepItem.MyStepRTB;
|
||||
Console.WriteLine("<foreignObject x='{0}In' y='{1}In' width='{2}In' " +
|
||||
"requiredExtensions='http://Volian.Com/EmbeddedRTF'>{3}</foreignObject>",
|
||||
ToInches(myStepItem.Left + rtb.Left), ToInches(myStepItem.Top + rtb.Top), ToInches(rtb.Width), myStepItem.MyItemInfo.MyContent.Text);
|
||||
// ToInches(myStepItem.Left + rtb.Left), ToInches(myStepItem.Top + rtb.Top), ToInches(rtb.Width), rtb.Rtf);
|
||||
}
|
||||
private float ToInches(int val)
|
||||
{
|
||||
return Convert.ToSingle(val)/96F;
|
||||
}
|
||||
|
||||
private void OutputAllChildren(List<StepItem> list)
|
||||
{
|
||||
if(list != null)
|
||||
foreach (StepItem itm in list)
|
||||
OutputAllChildren(itm);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user