This commit is contained in:
2010-08-04 15:17:19 +00:00
parent 1d5a43627c
commit 935802a57a
13 changed files with 151 additions and 188 deletions

View File

@@ -738,47 +738,47 @@ namespace Volian.Controls.Library
}
#endregion
#region RHM debug
#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;
}
//#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);
}
// private void OutputAllChildren(List<StepItem> list)
// {
// if(list != null)
// foreach (StepItem itm in list)
// OutputAllChildren(itm);
// }
#endif
//#endif
private void btnToggleEditView_Click(object sender, EventArgs e)
{
MyStepRTB.ToggleEditView();