This commit is contained in:
parent
c6821188c5
commit
4405463e8e
@ -196,11 +196,11 @@ namespace VEPROMS.CSLA.Library
|
||||
public Layout(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public Layout() : base() { }
|
||||
#region TopRow
|
||||
private LazyLoad<int?> _TopRow;
|
||||
private LazyLoad<float?> _TopRow;
|
||||
[Category("Layout")]
|
||||
[DisplayName("Top Row on Printed Page")]
|
||||
[Description("Top Row on Printed Page")]
|
||||
public int? TopRow
|
||||
public float? TopRow
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -209,11 +209,11 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion
|
||||
#region FooterLength
|
||||
private LazyLoad<int?> _FooterLength;
|
||||
private LazyLoad<float?> _FooterLength;
|
||||
[Category("Location")]
|
||||
[DisplayName("Number of lines required for footer")]
|
||||
[Description("Number of lines required for footer")]
|
||||
public int? FooterLength
|
||||
public float? FooterLength
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -222,11 +222,11 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion
|
||||
#region LeftMargin
|
||||
private LazyLoad<int?> _LeftMargin;
|
||||
private LazyLoad<float?> _LeftMargin;
|
||||
[Category("Location")]
|
||||
[DisplayName("Size of left margin")]
|
||||
[Description("Size of left margin")]
|
||||
public int? LeftMargin
|
||||
public float? LeftMargin
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -235,11 +235,11 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion
|
||||
#region PageLength
|
||||
private LazyLoad<int?> _PageLength;
|
||||
private LazyLoad<float?> _PageLength;
|
||||
[Category("Location")]
|
||||
[DisplayName("Length of Page")]
|
||||
[Description("Length of Page")]
|
||||
public int? PageLength
|
||||
public float? PageLength
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -248,11 +248,11 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion
|
||||
#region PageWidth
|
||||
private LazyLoad<int?> _PageWidth;
|
||||
private LazyLoad<float?> _PageWidth;
|
||||
[Category("Location")]
|
||||
[DisplayName("Width of Page")]
|
||||
[Description("Width of Page")]
|
||||
public int? PageWidth
|
||||
public float? PageWidth
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -309,11 +309,11 @@ namespace VEPROMS.CSLA.Library
|
||||
public Top(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public Top() : base() { }
|
||||
#region Margin
|
||||
private LazyLoad<int?> _Margin;
|
||||
private LazyLoad<float?> _Margin;
|
||||
[Category("Continue Msg")]
|
||||
[DisplayName("Margin for top msg")]
|
||||
[Description("Margin for top msg")]
|
||||
public int? Margin
|
||||
public float? Margin
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -356,11 +356,11 @@ namespace VEPROMS.CSLA.Library
|
||||
public Bottom(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public Bottom() : base() { }
|
||||
#region Margin
|
||||
private LazyLoad<int?> _Margin;
|
||||
private LazyLoad<float?> _Margin;
|
||||
[Category("Continue Msg")]
|
||||
[DisplayName("Margin for bottom msg")]
|
||||
[Description("Margin for bottom msg")]
|
||||
public int? Margin
|
||||
public float? Margin
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -95,22 +95,22 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _Token, "@Token");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _Row;
|
||||
private LazyLoad<float?> _Row;
|
||||
[Category("Location")]
|
||||
[DisplayName("Vertical Position")]
|
||||
[Description("Vertical Position")]
|
||||
public int? Row
|
||||
public float? Row
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Row, "@Row");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _Col;
|
||||
private LazyLoad<float?> _Col;
|
||||
[Category("Location")]
|
||||
[DisplayName("Horizontal Position")]
|
||||
[Description("Horizontal Position")]
|
||||
public int? Col
|
||||
public float? Col
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -71,11 +71,12 @@ namespace VEPROMS.CSLA.Library
|
||||
public class VE_Font : vlnFormatItem
|
||||
{
|
||||
public VE_Font(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public VE_Font(string family, int size, E_Style style)
|
||||
public VE_Font(string family, int size, E_Style style, float CPI)
|
||||
{
|
||||
_Family = new LazyLoad<string>(family);
|
||||
_Size = new LazyLoad<int?>(size);
|
||||
_Style = new LazyLoad<E_Style?>(style);
|
||||
_CPI = new LazyLoad<float?>(CPI);
|
||||
}
|
||||
private LazyLoad<string> _Family;
|
||||
private Font _WindowsFont;
|
||||
@ -134,6 +135,22 @@ namespace VEPROMS.CSLA.Library
|
||||
// _Style.Value = value;
|
||||
//}
|
||||
}
|
||||
private LazyLoad<float?> _CPI;
|
||||
public float? CPI
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _CPI, "Font/@CPI");
|
||||
}
|
||||
}
|
||||
public float CharsToTwips
|
||||
{
|
||||
get
|
||||
{
|
||||
return (72 / (CPI ?? 12));
|
||||
}
|
||||
|
||||
}
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0}, {1} pt, {2}", Family, Size, Style);
|
||||
@ -1143,8 +1160,8 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _UIMark, "@UIMark");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _CheckOffWidAdjust;
|
||||
public int? CheckOffWidAdjust
|
||||
private LazyLoad<float?> _CheckOffWidAdjust;
|
||||
public float? CheckOffWidAdjust
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -1565,8 +1582,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public SectionNumber(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public SectionNumber() : base() { }
|
||||
private LazyLoad<int?> _Pos;
|
||||
public int? Pos
|
||||
private LazyLoad<float?> _Pos;
|
||||
public float? Pos
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -1597,8 +1614,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public SectionHeader(XmlNode xmlNode) : base(xmlNode) { }
|
||||
public SectionHeader() : base() { }
|
||||
private LazyLoad<int?> _Pos;
|
||||
public int? Pos
|
||||
private LazyLoad<float?> _Pos;
|
||||
public float? Pos
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -2365,8 +2382,8 @@ namespace VEPROMS.CSLA.Library
|
||||
return (_Separator == null) ?_Separator = new Separator(SelectSingleNode("Separator")):_Separator;
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _LastLineToStartStep;
|
||||
public int? LastLineToStartStep
|
||||
private LazyLoad<float?> _LastLineToStartStep;
|
||||
public float? LastLineToStartStep
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -2381,32 +2398,32 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _LineDrawingOption, "@LineDrawingOption");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _ColS;
|
||||
public int? ColS
|
||||
private LazyLoad<float?> _ColS;
|
||||
public float? ColS
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _ColS, "@ColS");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _ColT;
|
||||
public int? ColT
|
||||
private LazyLoad<float?> _ColT;
|
||||
public float? ColT
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _ColT, "@ColT");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _ColAbs;
|
||||
public int? ColAbs
|
||||
private LazyLoad<float?> _ColAbs;
|
||||
public float? ColAbs
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _ColAbs, "@ColAbs");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _WidT;
|
||||
public int? WidT
|
||||
private LazyLoad<float?> _WidT;
|
||||
public float? WidT
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -2461,8 +2478,8 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _WidSTablePrint, "@WidSTablePrint");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _AdjRNOCol;
|
||||
public int? AdjRNOCol
|
||||
private LazyLoad<float?> _AdjRNOCol;
|
||||
public float? AdjRNOCol
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -2835,16 +2852,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class TopOfPage : vlnFormatItem
|
||||
{
|
||||
public TopOfPage(XmlNode xmlNode) : base(xmlNode) { }
|
||||
private LazyLoad<int?> _Row;
|
||||
public int? Row
|
||||
private LazyLoad<float?> _Row;
|
||||
public float? Row
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Row, "@Row");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _Col;
|
||||
public int? Col
|
||||
private LazyLoad<float?> _Col;
|
||||
public float? Col
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -2888,16 +2905,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class StepSectionEditData : vlnFormatItem
|
||||
{
|
||||
public StepSectionEditData(XmlNode xmlNode) : base(xmlNode) { }
|
||||
private LazyLoad<int?> _ColSScreenAdj;
|
||||
public int? ColSScreenAdj
|
||||
private LazyLoad<float?> _ColSScreenAdj;
|
||||
public float? ColSScreenAdj
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _ColSScreenAdj, "@ColSScreenAdj");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _ScrnAdjRNOText;
|
||||
public int? ScrnAdjRNOText
|
||||
private LazyLoad<float?> _ScrnAdjRNOText;
|
||||
public float? ScrnAdjRNOText
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -2918,8 +2935,8 @@ namespace VEPROMS.CSLA.Library
|
||||
public class StepSectionPrintData : vlnFormatItem
|
||||
{
|
||||
public StepSectionPrintData(XmlNode xmlNode) : base(xmlNode) { }
|
||||
private LazyLoad<int?> _ImmStepHdrCol;
|
||||
public int? ImmStepHdrCol
|
||||
private LazyLoad<float?> _ImmStepHdrCol;
|
||||
public float? ImmStepHdrCol
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -3140,16 +3157,16 @@ namespace VEPROMS.CSLA.Library
|
||||
public class TableOfContentsData : vlnFormatItem
|
||||
{
|
||||
public TableOfContentsData(XmlNode xmlNode) : base(xmlNode) { }
|
||||
private LazyLoad<int?> _TofCSecNumPos;
|
||||
public int? TofCSecNumPos
|
||||
private LazyLoad<float?> _TofCSecNumPos;
|
||||
public float? TofCSecNumPos
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _TofCSecNumPos, "@TofCSecNumPos");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _TofCSecTitlePos;
|
||||
public int? TofCSecTitlePos
|
||||
private LazyLoad<float?> _TofCSecTitlePos;
|
||||
public float? TofCSecTitlePos
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -3164,8 +3181,8 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _TofCSecTitleLen, "@TofCSecTitleLen");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _TofCPageNumPos;
|
||||
public int? TofCPageNumPos
|
||||
private LazyLoad<float?> _TofCPageNumPos;
|
||||
public float? TofCPageNumPos
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -3214,40 +3231,40 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _Index, "@Index");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _SecNumPositionAdj;
|
||||
public int? SecNumPositionAdj
|
||||
private LazyLoad<float?> _SecNumPositionAdj;
|
||||
public float? SecNumPositionAdj
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _SecNumPositionAdj, "@SecNumPositionAdj");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _SecTitlePositionAdj;
|
||||
public int? SecTitlePositionAdj
|
||||
private LazyLoad<float?> _SecTitlePositionAdj;
|
||||
public float? SecTitlePositionAdj
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _SecTitlePositionAdj, "@SecTitlePositionAdj");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _ColSByLevel;
|
||||
public int? ColSByLevel
|
||||
private LazyLoad<float?> _ColSByLevel;
|
||||
public float? ColSByLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _ColSByLevel, "@ColSByLevel");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _TofCPositionAdj;
|
||||
public int? TofCPositionAdj
|
||||
private LazyLoad<float?> _TofCPositionAdj;
|
||||
public float? TofCPositionAdj
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _TofCPositionAdj, "@TofCPositionAdj");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _WidSAdjByLevel;
|
||||
public int? WidSAdjByLevel
|
||||
private LazyLoad<float?> _WidSAdjByLevel;
|
||||
public float? WidSAdjByLevel
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -4387,48 +4404,48 @@ namespace VEPROMS.CSLA.Library
|
||||
return LazyLoad(ref _Index, "@Index");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _Start;
|
||||
public int? Start
|
||||
private LazyLoad<float?> _Start;
|
||||
public float? Start
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Start, "@Start");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _End;
|
||||
public int? End
|
||||
private LazyLoad<float?> _End;
|
||||
public float? End
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _End, "@End");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _TxtStart;
|
||||
public int? TxtStart
|
||||
private LazyLoad<float?> _TxtStart;
|
||||
public float? TxtStart
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _TxtStart, "@TxtStart");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _TxtWidth;
|
||||
public int? TxtWidth
|
||||
private LazyLoad<float?> _TxtWidth;
|
||||
public float? TxtWidth
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _TxtWidth, "@TxtWidth");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _Height;
|
||||
public int? Height
|
||||
private LazyLoad<float?> _Height;
|
||||
public float? Height
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _Height, "@Height");
|
||||
}
|
||||
}
|
||||
private LazyLoad<int?> _TabPos;
|
||||
public int? TabPos
|
||||
private LazyLoad<float?> _TabPos;
|
||||
public float? TabPos
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -369,6 +369,15 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
return ll.Value;
|
||||
}
|
||||
public float? LazyLoad(ref LazyLoad<float?> ll, string xPath)
|
||||
{
|
||||
if (ll == null)
|
||||
{
|
||||
XmlNode xn = SelectSingleNode(xPath);
|
||||
ll = new LazyLoad<float?>(RetrieveFloat(xPath, xn));
|
||||
}
|
||||
return ll.Value;
|
||||
}
|
||||
protected int? RetrieveInt(string xPath, XmlNode xn)
|
||||
{
|
||||
int? value = null;
|
||||
@ -384,6 +393,21 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
return value;
|
||||
}
|
||||
protected float? RetrieveFloat(string xPath, XmlNode xn)
|
||||
{
|
||||
float? value = null;
|
||||
if (xn != null)
|
||||
{
|
||||
float fValue = 0;
|
||||
if (!float.TryParse(xn.InnerText, out fValue))
|
||||
{
|
||||
Console.WriteLine(string.Format("'{0}'\r\n'{1}'\r\n'{2}' could not be converted to float?", MyFormat.FullName, MyPath + "/" + xPath, xn.InnerText));
|
||||
throw (new Exception(string.Format("{0} = '{1}' could not be converted to float?", xPath, xn.InnerText)));
|
||||
}
|
||||
value = fValue;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
public Nullable<T> LazyLoad<T>(ref LazyLoad<Nullable<T>> ll, string xPath)
|
||||
where T:struct
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user