Make properties case insensitive

Add unimplemented boxes to Log File.
This commit is contained in:
Rich
2011-10-06 14:43:51 +00:00
parent 12a9006816
commit faf4e1b5d9
2 changed files with 26 additions and 5 deletions

View File

@@ -97,9 +97,13 @@ namespace Volian.Print.Library
cb.Rectangle(left + llxOffset, bottom + (lineThickness / 2), right - left, (Height - lineThickness) * MyPageHelper.YMultiplier);
break;
default:
// For other than thick, thin and double.
//Console.WriteLine("NO BOXES");
_MyLog.WarnFormat("INVALID BOX SYTLE {0} \"{1}\"", MyParent.MyItemInfo.FormatStepData.Type, CharToAsc(MyBox.BoxStyle));
// For other than thick, thin and double.
if (!_UnimplementedBoxStyles.Contains(MyBox.BoxStyle))
{
_UnimplementedBoxStyles.Add(MyBox.BoxStyle);
_MyLog.InfoFormat("Unimplemented Box Style {0} {1}", ShowBoxStyle(MyBox.BoxStyle), MyParent.MyItemInfo.ShortPath);
//Console.WriteLine("Unimplemented Box Style {0} {1}", ShowBoxStyle(MyBox.BoxStyle), MyParent.MyItemInfo.ShortPath);
}
break;
//throw new Exception("Missing vlnBox handler");
}
@@ -110,6 +114,19 @@ namespace Volian.Print.Library
return yPageStart;
}
private string ShowBoxStyle(string str)
{
StringBuilder sb = new StringBuilder();
foreach (Char c in str)
{
if (c >= ' ' && c < 128)
sb.Append(c);
else
sb.Append(string.Format("x{0:X0000}", (int)c));
}
return sb.ToString();
}
private static List<string> _UnimplementedBoxStyles = new List<string>();
private string CharToAsc(string p)
{
StringBuilder sb = new StringBuilder();