Make properties case insensitive
Add unimplemented boxes to Log File.
This commit is contained in:
parent
12a9006816
commit
faf4e1b5d9
@ -54,7 +54,9 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private XmlNode GetGroup(string group)
|
||||
{
|
||||
XmlNodeList xl = _XmlContents.DocumentElement.SelectNodes(string.Format("//{0}", group));
|
||||
//XmlNodeList xl = _XmlContents.DocumentElement.SelectNodes(string.Format("//{0}", group));
|
||||
XmlNodeList xl = _XmlContents.DocumentElement.SelectNodes(
|
||||
string.Format("//*[translate(local-name(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{0}']", group.ToLower()));
|
||||
switch (xl.Count)
|
||||
{
|
||||
case 0: // No nodes found
|
||||
@ -69,7 +71,9 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private XmlAttribute GetItem(XmlNode xx, string item)
|
||||
{
|
||||
XmlNodeList xl = xx.SelectNodes(string.Format("@{0}", item));
|
||||
//XmlNodeList xl = xx.SelectNodes(string.Format("@{0}", item));
|
||||
XmlNodeList xl = xx.SelectNodes(
|
||||
string.Format("//@*[translate(local-name(), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')='{0}']", item.ToLower()));
|
||||
switch (xl.Count)
|
||||
{
|
||||
case 0: // No nodes found
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user