diff --git a/PROMS/VEPROMS.CSLA.Library/Format/Comparator.cs b/PROMS/VEPROMS.CSLA.Library/Format/Comparator.cs
index 14e7fc87..e6ff1820 100644
--- a/PROMS/VEPROMS.CSLA.Library/Format/Comparator.cs
+++ b/PROMS/VEPROMS.CSLA.Library/Format/Comparator.cs
@@ -1,40 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Text;
using System.Xml;
-using System.Windows.Forms;
namespace VEPROMS.CSLA.Library
{
public class Comparator
{
- private XmlDocument _ResultsDoc;
- public XmlDocument ResultsDoc
- {
- get { return _ResultsDoc; }
- set { _ResultsDoc = value; }
- }
- private XmlDocument _XDoc1;
- public XmlDocument XDoc1
- {
- get { return _XDoc1; }
- set { _XDoc1 = value; }
- }
- private XmlDocument _XDoc2;
- public XmlDocument XDoc2
- {
- get { return _XDoc2; }
- set { _XDoc2 = value; }
- }
- public Comparator(XmlDocument xdoc1, XmlDocument xdoc2)
+ public XmlDocument ResultsDoc { get; set; }
+ public XmlDocument XDoc1 { get; set; }
+ public XmlDocument XDoc2 { get; set; }
+ public Comparator(XmlDocument xdoc1, XmlDocument xdoc2)
{
XDoc1 = xdoc1;
XDoc2 = xdoc2;
ResultsDoc = new XmlDocument();
ResultsDoc.LoadXml(@"");
}
- public Comparator(string existingFC, string importedFC) //string fName1, string fName2)
+ public Comparator(string existingFC, string importedFC)
{
XDoc1 = new XmlDocument();
XDoc1.LoadXml(existingFC);
@@ -104,12 +87,12 @@ namespace VEPROMS.CSLA.Library
xnss1.Add(GetKey(xc1), xc1);
foreach (XmlNode xc2 in xns2.Values)
if (xnss1.ContainsKey(GetKey(xc2)))
- Compare(xnss1[GetKey(xc2)], xc2, path + "/" + GetKey(xc2));
+ Compare(xnss1[GetKey(xc2)], xc2, $"{path}/{GetKey(xc2)}");
else
xnss2.Add(GetKey(xc2), xc2);
// element differences, if counts are different. xns1 elements are not found in xns2 and xns2 elements are not found in xns1
if (xns1.Count == 0 && xns2.Count == 0) return;
- Console.WriteLine(" {0} {1} {2}", path + "/" + xn1.Name, xns1.Count, xns2.Count);
+ Console.WriteLine($" {path}/{xn1.Name} {xns1.Count} {xns2.Count}");
foreach (string key in xnss1.Keys)
{
if (xnss1[key].Attributes.Count > 0 || xnss1[key].ChildNodes.Count > 0)
@@ -210,18 +193,14 @@ namespace VEPROMS.CSLA.Library
public string GetKey1(XmlNode xn)
{
if (xn.Attributes == null) return xn.Name;
- XmlAttribute xi = xn.Attributes.GetNamedItem("Index") as XmlAttribute;
- if (xi != null)
- {
- XmlAttribute xa = xn.Attributes.GetNamedItem("Name") as XmlAttribute;
- if (xa != null) return string.Format("{0}[{1}]", xn.Name, xa.Value);
- return string.Format("{0}[{1}]", xn.Name, xi.Value);
- }
- XmlAttribute xt = xn.Attributes.GetNamedItem("Token") as XmlAttribute;
- if(xt != null) return string.Format("{0}[{1}]", xn.Name, xt.Value);
- XmlAttribute xw = xn.Attributes.GetNamedItem("ReplaceWord") as XmlAttribute;
- if(xw != null) return string.Format("{0}[{1}]", xn.Name, xw.Value);
- return xn.Name;
+ if (xn.Attributes.GetNamedItem("Index") is XmlAttribute xi)
+ {
+ if (xn.Attributes.GetNamedItem("Name") is XmlAttribute xa) return string.Format("{0}[{1}]", xn.Name, xa.Value);
+ return string.Format("{0}[{1}]", xn.Name, xi.Value);
+ }
+ if (xn.Attributes.GetNamedItem("Token") is XmlAttribute xt) return string.Format("{0}[{1}]", xn.Name, xt.Value);
+ if (xn.Attributes.GetNamedItem("ReplaceWord") is XmlAttribute xw) return string.Format("{0}[{1}]", xn.Name, xw.Value);
+ return xn.Name;
}
static private XmlNode makeXPath(XmlDocument doc, string xpath)
{
@@ -252,7 +231,6 @@ namespace VEPROMS.CSLA.Library
string name = nextNodeInXPath.Substring(indx, nextNodeInXPath.IndexOf("=",indx)-indx);
XmlAttribute xKeyd = doc.CreateAttribute(name);
indx = nextNodeInXPath.IndexOf("='",indx)+2;
- string value = nextNodeInXPath.Substring(indx,nextNodeInXPath.IndexOf("'", indx) - indx);
xKeyd.Value = nextNodeInXPath.Substring(indx,nextNodeInXPath.IndexOf("'",indx)-indx);
node.Attributes.Append(xKeyd);
}
@@ -277,58 +255,56 @@ namespace VEPROMS.CSLA.Library
// go through attributes in first xml document, see if they exist in the 2nd xml document & are identical attribute
foreach (XmlAttribute xa1 in atts1)
{
- XmlAttribute xa2 = atts2.GetNamedItem(xa1.Name) as XmlAttribute;
- if (xa2 == null)
- {
- XmlNode xnr = MakeXPathFormat(path);
- if (xnr != null)
- {
- XmlAttribute xKey = ResultsDoc.CreateAttribute(xa1.Name+"Old");
- xKey.Value = xa1.Value;
- xnr.Attributes.Append(xKey);
- xKey = ResultsDoc.CreateAttribute("OldKey");
- xKey.Value = GetKey(atts1Par);
- if (xKey.Value != null) xnr.Attributes.Append(xKey);
- }
- }
- else if (xa2.Value != xa1.Value)
- {
- XmlNode xnr = MakeXPathFormat(path);
- if (xnr != null)
- {
- XmlAttribute xKey = ResultsDoc.CreateAttribute(xa1.Name + "Old");
- xKey.Value = xa1.Value;
- xnr.Attributes.Append(xKey);
- XmlAttribute xKey2 = ResultsDoc.CreateAttribute(xa2.Name + "New");
- xKey2.Value = xa2.Value;
- xnr.Attributes.Append(xKey2);
- xKey = ResultsDoc.CreateAttribute("OldKey");
- xKey.Value = GetKey(atts1Par);
- if (xKey.Value != null) xnr.Attributes.Append(xKey);
- xKey = ResultsDoc.CreateAttribute("NewKey");
- xKey.Value = GetKey(atts2Par);
- if (xKey.Value != null) xnr.Attributes.Append(xKey);
- }
- }
- }
+ if (!(atts2.GetNamedItem(xa1.Name) is XmlAttribute xa2))
+ {
+ XmlNode xnr = MakeXPathFormat(path);
+ if (xnr != null)
+ {
+ XmlAttribute xKey = ResultsDoc.CreateAttribute(xa1.Name + "Old");
+ xKey.Value = xa1.Value;
+ xnr.Attributes.Append(xKey);
+ xKey = ResultsDoc.CreateAttribute("OldKey");
+ xKey.Value = GetKey(atts1Par);
+ if (xKey.Value != null) xnr.Attributes.Append(xKey);
+ }
+ }
+ else if (xa2.Value != xa1.Value)
+ {
+ XmlNode xnr = MakeXPathFormat(path);
+ if (xnr != null)
+ {
+ XmlAttribute xKey = ResultsDoc.CreateAttribute(xa1.Name + "Old");
+ xKey.Value = xa1.Value;
+ xnr.Attributes.Append(xKey);
+ XmlAttribute xKey2 = ResultsDoc.CreateAttribute(xa2.Name + "New");
+ xKey2.Value = xa2.Value;
+ xnr.Attributes.Append(xKey2);
+ xKey = ResultsDoc.CreateAttribute("OldKey");
+ xKey.Value = GetKey(atts1Par);
+ if (xKey.Value != null) xnr.Attributes.Append(xKey);
+ xKey = ResultsDoc.CreateAttribute("NewKey");
+ xKey.Value = GetKey(atts2Par);
+ if (xKey.Value != null) xnr.Attributes.Append(xKey);
+ }
+ }
+ }
// go through attributes in 2nd xml document to see if they exist in the first xml document & are identical
foreach (XmlAttribute xa2 in atts2)
{
- XmlAttribute xa1 = atts1.GetNamedItem(xa2.Name) as XmlAttribute;
- if (xa1 == null)
- {
- XmlNode xnr = MakeXPathFormat(path);
- if (xnr != null)
- {
- XmlAttribute xKey = ResultsDoc.CreateAttribute(xa2.Name+"New");
- xKey.Value = xa2.Value;
- xnr.Attributes.Append(xKey);
- xKey = ResultsDoc.CreateAttribute("NewKey");
- xKey.Value = GetKey(atts2Par);
- if (xKey.Value != null) xnr.Attributes.Append(xKey);
- }
- }
- }
+ if (!(atts1.GetNamedItem(xa2.Name) is XmlAttribute))
+ {
+ XmlNode xnr = MakeXPathFormat(path);
+ if (xnr != null)
+ {
+ XmlAttribute xKey = ResultsDoc.CreateAttribute(xa2.Name + "New");
+ xKey.Value = xa2.Value;
+ xnr.Attributes.Append(xKey);
+ xKey = ResultsDoc.CreateAttribute("NewKey");
+ xKey.Value = GetKey(atts2Par);
+ if (xKey.Value != null) xnr.Attributes.Append(xKey);
+ }
+ }
+ }
}
#endregion
}
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs
index de3187f2..02ab8036 100644
--- a/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs
+++ b/PROMS/VEPROMS.CSLA.Library/Format/DocStyles.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Text;
using System.ComponentModel;
using System.Xml;
@@ -13,14 +11,8 @@ namespace VEPROMS.CSLA.Library
[Description("Document Styles Name")]
//Not used in the PROMS code. Only used as a title for the DocStyles grouping
private LazyLoad _Name;
- public string Name
- {
- get
- {
- return LazyLoad(ref _Name, "@Name");
- }
- }
- private DocStyleList _DocStyleList;
+ public string Name => LazyLoad(ref _Name, "@Name");
+ private DocStyleList _DocStyleList;
public DocStyleList DocStyleList
{
get
@@ -68,38 +60,20 @@ namespace VEPROMS.CSLA.Library
#region IndexName
// a unuque number that is use in the SQL record to referenced the DocStyle for a seciton
private LazyLoad _Index;
- public int? Index
- {
- get
- {
- return LazyLoad(ref _Index, "@Index");
- }
- }
- [Description("Document Styles Name")]
+ public int? Index => LazyLoad(ref _Index, "@Index");
+ [Description("Document Styles Name")]
// Use in the lists that display the name of a seciton format style (Section Properties)
private LazyLoad _Name;
- public string Name
- {
- get
- {
- return LazyLoad(ref _Name, "@Name");
- }
- }
- #endregion
- #region Font
- // the font to use for the section
- private VE_Font _Font;
- [Category("Font")]
- [DisplayName("Font")]
- [Description("Font")]
- public VE_Font Font
- {
- get
- {
- return(_Font == null) ?_Font = new VE_Font(XmlNode): _Font;
- }
- }
- #endregion
+ public string Name => LazyLoad(ref _Name, "@Name");
+ #endregion
+ #region Font
+ // the font to use for the section
+ private VE_Font _Font;
+ [Category("Font")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font => _Font ?? (_Font = new VE_Font(XmlNode));
+ #endregion
#region AdjustTopMarginOnStepContinuePages
// B2017-267 Put in for Farley who uses the "PSOnlyFirst" in some of their pagelists so that a section title is printed only on the first page of the section.
// This will adjust the top margin when the section title is not printed on the other pages. (CreateStepPDF() in PromsPrinter.cs)
@@ -125,413 +99,245 @@ namespace VEPROMS.CSLA.Library
// count just within this section, don't count, etc).
// - see E_NumberingSequence in Enum.cs
private LazyLoad _NumberingSequence;
- public E_NumberingSequence? NumberingSequence
- {
- get
- {
- return LazyLoad(ref _NumberingSequence, "@NumberingSequence");
- }
- }
- #endregion numberingsequence
+ public E_NumberingSequence? NumberingSequence => LazyLoad(ref _NumberingSequence, "@NumberingSequence");
+ #endregion numberingsequence
- #region IndexOtherThanFirstPage
- [Category("Miscellaneous")]
+ #region IndexOtherThanFirstPage
+ [Category("Miscellaneous")]
[Description("IndexOtherThanFirstPage")]
// references the DocStyle to use for pages two through the last page of the section. this is used along with the "Where" setting "UseOnFirstPage"
private LazyLoad _IndexOtherThanFirstPage;
- public int? IndexOtherThanFirstPage
- {
- get
- {
- return LazyLoad(ref _IndexOtherThanFirstPage, "@IndexOtherThanFirstPage");
- }
- }
- #endregion IndexOtherThanFirstPage
+ public int? IndexOtherThanFirstPage => LazyLoad(ref _IndexOtherThanFirstPage, "@IndexOtherThanFirstPage");
+ #endregion IndexOtherThanFirstPage
- #region SecOvrideSupInfoTabOff
- // This overrides the tab position of the Supplemental Information steps at the section level
- // This will also override the overall supplemental Information tab adjustment set at the format level (SupInfoTabOff)
- [Category("Miscellaneous")]
+ #region SecOvrideSupInfoTabOff
+ // This overrides the tab position of the Supplemental Information steps at the section level
+ // This will also override the overall supplemental Information tab adjustment set at the format level (SupInfoTabOff)
+ [Category("Miscellaneous")]
[Description("SecOvrideSupInfoTabOff")]
private LazyLoad _SecOvrideSupInfoTabOff;
- public int? SecOvrideSupInfoTabOff
- {
- get
- {
- return LazyLoad(ref _SecOvrideSupInfoTabOff, "@SecOvrideSupInfoTabOff");
- }
- }
- #endregion SecOvrideSupInfoTabOff
+ public int? SecOvrideSupInfoTabOff => LazyLoad(ref _SecOvrideSupInfoTabOff, "@SecOvrideSupInfoTabOff");
+ #endregion SecOvrideSupInfoTabOff
- #region IsStepSection
- [Category("Miscellaneous")]
+ #region IsStepSection
+ [Category("Miscellaneous")]
[Description("Is a Step Section")]
// When set to True, the section uses the PROMS Step editor, when set to False, Word is used to edit the section contents
private LazyLoad _IsStepSection;
- public bool IsStepSection
- {
- get
- {
- return LazyLoad(ref _IsStepSection, "@IsStepSection");
- }
- }
- #endregion IsStepSection
+ public bool IsStepSection => LazyLoad(ref _IsStepSection, "@IsStepSection");
+ #endregion IsStepSection
- #region Inactive
- [Category("Miscellaneous")]
+ #region Inactive
+ [Category("Miscellaneous")]
[Description("Is Active Section Type")]
// when set to True, the section type is hidden from the user
// - but this section type could still be used "internally" by PROMS (i.e. when "Where" is set to "UseOnAllButFirstPage")
// - is also used to keep un-used section types around for future use
private LazyLoad _Inactive;
- public bool Inactive
- {
- get
- {
- return LazyLoad(ref _Inactive, "@Inactive");
- }
- }
- #endregion Inactive
+ public bool Inactive => LazyLoad(ref _Inactive, "@Inactive");
+ #endregion Inactive
- #region SupplementalInfo
- [Category("Miscellaneous")]
+ #region SupplementalInfo
+ [Category("Miscellaneous")]
[Description("Supports Supplemental Information")]
// Use in SAMG procedures, flag that tells PROMS this section type can have Supplemental Information.
// This information is entered as an RNO off of a step but is printed on the backside of the previous page
// (like a foldout page) so that it is visable along with the steps that it applies.
private LazyLoad _SupplementalInformation;
- public bool SupplementalInformation
- {
- get
- {
- return LazyLoad(ref _SupplementalInformation, "@SupplementalInformation");
- }
- }
+ public bool SupplementalInformation => LazyLoad(ref _SupplementalInformation, "@SupplementalInformation");
- // B2023-060: Procedures with Supplemental Information will assume that all sections are printed separately.
- // This flag will use the Section's properties/pagination (continuous or separate)
- // rather than always setting to separate
- [Category("Miscellaneous")]
+ // B2023-060: Procedures with Supplemental Information will assume that all sections are printed separately.
+ // This flag will use the Section's properties/pagination (continuous or separate)
+ // rather than always setting to separate
+ [Category("Miscellaneous")]
[Description("Supports Supplemental Information Pagination")]
private LazyLoad _SupInfoNoPaginOverride;
- public bool SupInfoNoPaginOverride
- {
- get
- {
- return LazyLoad(ref _SupInfoNoPaginOverride, "@SupInfoNoPaginOverride");
- }
- }
+ public bool SupInfoNoPaginOverride => LazyLoad(ref _SupInfoNoPaginOverride, "@SupInfoNoPaginOverride");
- // F2023-035: WCN - allow for change in left margin for supplemental information pages by
- // setting a value in the DocStyle for the adjustment. This is used when importing the vlnParagraph page
- // page & when doing pagelist items
- // summary: adjustment to the left margin for the associated supplemental information pages
- private LazyLoad _SupInfoMargAdj;
- public float? SupInfoMargAdj
- {
- get
- {
- return LazyLoad(ref _SupInfoMargAdj, "@SupInfoMargAdj");
- }
- }
+ // F2023-035: WCN - allow for change in left margin for supplemental information pages by
+ // setting a value in the DocStyle for the adjustment. This is used when importing the vlnParagraph page
+ // page & when doing pagelist items
+ // summary: adjustment to the left margin for the associated supplemental information pages
+ private LazyLoad _SupInfoMargAdj;
+ public float? SupInfoMargAdj => LazyLoad(ref _SupInfoMargAdj, "@SupInfoMargAdj");
- #endregion SupplementalInfo
+ #endregion SupplementalInfo
- #region LandscapePageList
- [Category("Miscellaneous")]
+ #region LandscapePageList
+ [Category("Miscellaneous")]
[Description("Should PageList be landscape")]
// this will rotate the associated PageStyle information 180 degrees to the left
private LazyLoad _LandscapePageList;
- public bool LandscapePageList
- {
- get
- {
- return LazyLoad(ref _LandscapePageList, "@LandscapePageList");
- }
- }
- #endregion LandscapePageList
-
- #region ShowSectionTitles
- [Category("Miscellaneous")]
+ public bool LandscapePageList => LazyLoad(ref _LandscapePageList, "@LandscapePageList");
+ #endregion LandscapePageList
+
+ #region ShowSectionTitles
+ [Category("Miscellaneous")]
[Description("Should Section Titles be shown")]
private LazyLoad _ShowSectionTitles;
- // like the ShowSectionTitles at the StepSectionLayData level - turns on printing the section number and title on the first page of the section. This allows it to be controled based on which section type was selected, so long as it's set to false at the StepSectionLayData level.
- public bool ShowSectionTitles
- {
- get
- {
- return LazyLoad(ref _ShowSectionTitles, "@ShowSectionTitles");
- }
- }
- #endregion ShowSectionTitles
+ // like the ShowSectionTitles at the StepSectionLayData level - turns on printing the section number and title on the first page of the section. This allows it to be controled based on which section type was selected, so long as it's set to false at the StepSectionLayData level.
+ public bool ShowSectionTitles => LazyLoad(ref _ShowSectionTitles, "@ShowSectionTitles");
+ #endregion ShowSectionTitles
- #region ResetFirstPageOnSection
- [Category("Miscellaneous")]
+ #region ResetFirstPageOnSection
+ [Category("Miscellaneous")]
[Description("Reset first page of section on Separate pagination section")]
// put in for V.C. Summer
private LazyLoad _ResetFirstPageOnSection;
- public bool ResetFirstPageOnSection
- {
- get
- {
- return LazyLoad(ref _ResetFirstPageOnSection, "@ResetFirstPageOnSection");
- }
- }
- #endregion ResetFirstPageOnSection
+ public bool ResetFirstPageOnSection => LazyLoad(ref _ResetFirstPageOnSection, "@ResetFirstPageOnSection");
+ #endregion ResetFirstPageOnSection
- #region IncludeInTOC
- [Category("Miscellaneous")]
+ #region IncludeInTOC
+ [Category("Miscellaneous")]
[Description("Include in Auto Table Of Contents")]
// this will include the section in the Automatic Table Of Contents by default (unless it's turned off in Section Properties)
private LazyLoad _IncludeInTOC;
- public bool IncludeInTOC
- {
- get
- {
- return LazyLoad(ref _IncludeInTOC, "@IncludeInTOC");
- }
- }
- #endregion IncludeInTOC
+ public bool IncludeInTOC => LazyLoad(ref _IncludeInTOC, "@IncludeInTOC");
+ #endregion IncludeInTOC
- #region UseCheckOffs
- [Category("Miscellaneous")]
+ #region UseCheckOffs
+ [Category("Miscellaneous")]
[Description("Section Uses Checkoffs")]
// turns on the ability for a step editor section to have checkoffs
private LazyLoad _UseCheckOffs;
- public bool UseCheckOffs
- {
- get
- {
- return LazyLoad(ref _UseCheckOffs, "@UseCheckOffs");
- }
- }
- #endregion UseCheckOffs
+ public bool UseCheckOffs => LazyLoad(ref _UseCheckOffs, "@UseCheckOffs");
+ #endregion UseCheckOffs
- #region UseCheckOffs
- [Category("Miscellaneous")]
+ #region UseCheckOffs
+ [Category("Miscellaneous")]
[Description("Section Uses MetaSection ColSByLevel")]
// the section uses the MetaSection ColSByLevel setting (based on step text level) to position the step on the page
private LazyLoad _UseColSByLevel;
- public bool UseColSByLevel
- {
- get
- {
- return LazyLoad(ref _UseColSByLevel, "@UseColSByLevel");
- }
- }
- #endregion UseCheckOffs
+ public bool UseColSByLevel => LazyLoad(ref _UseColSByLevel, "@UseColSByLevel");
+ #endregion UseCheckOffs
- #region CancelSectTitle
- [Category("Miscellaneous")]
+ #region CancelSectTitle
+ [Category("Miscellaneous")]
[Description("Section Cancel Section Title")]
// this will prevent the section number and title from printing at the beginning of the section. This is set to false when the section number and/or title is printed from the PageStyle instead
private LazyLoad _CancelSectTitle;
- public bool CancelSectTitle
- {
- get
- {
- return LazyLoad(ref _CancelSectTitle, "@CancelSectTitle");
- }
- }
- #endregion CancelSectTitle
+ public bool CancelSectTitle => LazyLoad(ref _CancelSectTitle, "@CancelSectTitle");
+ #endregion CancelSectTitle
- #region DontInsertBlankPages
- [Category("Miscellaneous")]
+ #region DontInsertBlankPages
+ [Category("Miscellaneous")]
[Description("Don't insert blank pages in this section when printing duplex with blank pages")]
//C2023-001 Added for Beaver Valley CAS sections (their two column format)
private LazyLoad _DontInsertBlankPages;
- public bool DontInsertBlankPages
- {
- get
- {
- return LazyLoad(ref _DontInsertBlankPages, "@DontInsertBlankPages");
- }
- }
- #endregion DontInsertBlankPages
+ public bool DontInsertBlankPages => LazyLoad(ref _DontInsertBlankPages, "@DontInsertBlankPages");
+ #endregion DontInsertBlankPages
- #region CenterLine
- //CenterLineX="261.9" CenterLineYTop="673.2" CenterLineYBottom="44.2"
- private LazyLoad _CenterLineX;
- [Category("CenterLine")]
- [DisplayName("X Location")]
- [Description("Distance from left side of page")]
- // horizontal positon of a center line that is drawn on the printed page
- public float? CenterLineX
- {
- get
- {
- return LazyLoad(ref _CenterLineX, "@CenterLineX");
- }
- }
+ #region CenterLine
+ //CenterLineX="261.9" CenterLineYTop="673.2" CenterLineYBottom="44.2"
+ private LazyLoad _CenterLineX;
+ [Category("CenterLine")]
+ [DisplayName("X Location")]
+ [Description("Distance from left side of page")]
+ // horizontal positon of a center line that is drawn on the printed page
+ public float? CenterLineX => LazyLoad(ref _CenterLineX, "@CenterLineX");
- // the vertical starting positon of a center line that is drawn on the printed page
- private LazyLoad _CenterLineYTop;
- [Category("CenterLine")]
- [DisplayName("Y Top Location")]
- [Description("starting vertical point of line")]
- public float? CenterLineYTop
- {
- get
- {
- return LazyLoad(ref _CenterLineYTop, "@CenterLineYTop");
- }
- }
+ // the vertical starting positon of a center line that is drawn on the printed page
+ private LazyLoad _CenterLineYTop;
+ [Category("CenterLine")]
+ [DisplayName("Y Top Location")]
+ [Description("starting vertical point of line")]
+ public float? CenterLineYTop => LazyLoad(ref _CenterLineYTop, "@CenterLineYTop");
- // the vertical ending positon of a center line that is drawn on the printed page
- private LazyLoad _CenterLineYBottom;
- [Category("CenterLine")]
- [DisplayName("Y Bottom Location")]
- [Description("ending vertical point of line")]
- public float? CenterLineYBottom
- {
- get
- {
- return LazyLoad(ref _CenterLineYBottom, "@CenterLineYBottom");
- }
- }
+ // the vertical ending positon of a center line that is drawn on the printed page
+ private LazyLoad _CenterLineYBottom;
+ [Category("CenterLine")]
+ [DisplayName("Y Bottom Location")]
+ [Description("ending vertical point of line")]
+ public float? CenterLineYBottom => LazyLoad(ref _CenterLineYBottom, "@CenterLineYBottom");
- private LazyLoad _CLineWidth;
- [Category("CenterLine")]
- [DisplayName("Line Width")]
- [Description("Width of Lines Internal to Boxes")]
-
- // overrides the default pen width (.95) used to draw the center line
- public float? CLineWidth
- {
- get
- {
- return LazyLoad(ref _CLineWidth, "@CLineWidth");
- }
- }
- #endregion CenterLine
+ private LazyLoad _CLineWidth;
+ [Category("CenterLine")]
+ [DisplayName("Line Width")]
+ [Description("Width of Lines Internal to Boxes")]
- #region OptionalSectionContent
- [Category("Miscellaneous")]
+ // overrides the default pen width (.95) used to draw the center line
+ public float? CLineWidth => LazyLoad(ref _CLineWidth, "@CLineWidth");
+ #endregion CenterLine
+
+ #region OptionalSectionContent
+ [Category("Miscellaneous")]
[Description("Section Optional Content")]
// don't print the "No Section Content" message when section is empty
private LazyLoad _OptionalSectionContent;
- public bool OptionalSectionContent
- {
- get
- {
- return LazyLoad(ref _OptionalSectionContent, "@OptionalSectionContent");
- }
- }
- #endregion OptionalSectionContent
+ public bool OptionalSectionContent => LazyLoad(ref _OptionalSectionContent, "@OptionalSectionContent");
+ #endregion OptionalSectionContent
- #region Section Number Flags
- [Category("Miscellaneous")]
+ #region Section Number Flags
+ [Category("Miscellaneous")]
[Description("Don't parse the section number - use DisplayNumber value")]
// when creating a section tab, use as was entered in section properties
private LazyLoad _DontParseSectionNumber;
- public bool DontParseSectionNumber
- {
- get
- {
- return LazyLoad(ref _DontParseSectionNumber, "@DontParseSectionNumber");
- }
- }
- #endregion
+ public bool DontParseSectionNumber => LazyLoad(ref _DontParseSectionNumber, "@DontParseSectionNumber");
+ #endregion
- #region SpecialStepsFoldout
- [Category("Miscellaneous")]
+ #region SpecialStepsFoldout
+ [Category("Miscellaneous")]
[Description("Section Special Steps Foldout")]
// (for step editor foldouts) reduces white space on the foldout page to allow more information on the page,
// also special handling of step tabs when section numbers normally are part of step numbers
private LazyLoad _SpecialStepsFoldout;
- public bool SpecialStepsFoldout
- {
- get
- {
- return LazyLoad(ref _SpecialStepsFoldout, "@SpecialStepsFoldout");
- }
- }
+ public bool SpecialStepsFoldout => LazyLoad(ref _SpecialStepsFoldout, "@SpecialStepsFoldout");
- [Category("Miscellaneous")]
+ [Category("Miscellaneous")]
[Description("Section Special Steps Foldout with white space")]
// allow for all of the other special foldout formatting, but not compress the page
private LazyLoad _SpecialStepsFoldoutKeepWhiteSpace;
- public bool SpecialStepsFoldoutKeepWhiteSpace
- {
- get
- {
- return LazyLoad(ref _SpecialStepsFoldoutKeepWhiteSpace, "@SpecialStepsFoldoutKeepWhiteSpace");
- }
- }
+ public bool SpecialStepsFoldoutKeepWhiteSpace => LazyLoad(ref _SpecialStepsFoldoutKeepWhiteSpace, "@SpecialStepsFoldoutKeepWhiteSpace");
- [Category("Miscellaneous")]
+ [Category("Miscellaneous")]
[Description("Section Extra Line Header")]
// add and extra blank line before a Caution/Note header, appears to be used with SpecialStepsFoldout logic
// and the SpaceIn set on Caution and Note step types
private LazyLoad _ExtraLineHeader;
- public bool ExtraLineHeader
- {
- get
- {
- return LazyLoad(ref _ExtraLineHeader, "@ExtraLineHeader");
- }
- }
- #endregion SpecialStepsFoldout
+ public bool ExtraLineHeader => LazyLoad(ref _ExtraLineHeader, "@ExtraLineHeader");
+ #endregion SpecialStepsFoldout
- #region UndSpecialStepsFoldout
- [Category("Miscellaneous")]
+ #region UndSpecialStepsFoldout
+ [Category("Miscellaneous")]
[Description("Section Cancel Section Title")]
// used in Foldout section types, will underline the High Level Steps of a Foldout (Step Editor Section)
private LazyLoad _UndSpecialStepsFoldout;
- public bool UndSpecialStepsFoldout
- {
- get
- {
- return LazyLoad(ref _UndSpecialStepsFoldout, "@UndSpecialStepsFoldout");
- }
- }
- #endregion UndSpecialStepsFoldout
+ public bool UndSpecialStepsFoldout => LazyLoad(ref _UndSpecialStepsFoldout, "@UndSpecialStepsFoldout");
+ #endregion UndSpecialStepsFoldout
- #region CoverNoMergedPageNum
- [Category("Miscellaneous")]
+ #region CoverNoMergedPageNum
+ [Category("Miscellaneous")]
[Description("Cover Page Do Not Show Page Count")]
// F2021-046: When doing the Merge option when printing all procedures, flag if cover page section
// doesn't print the merged page number on first page of the merged pdf (used in printing Alarm Procedure sets)
- private LazyLoad _CoverNoMergedPageNum;
- public bool CoverNoMergedPageNum
- {
- get
- {
- return LazyLoad(ref _CoverNoMergedPageNum, "@CoverNoMergedPageNum");
- }
- }
- #endregion CoverNoMergedPageNum
+ private LazyLoad _CoverNoMergedPageNum;
+ public bool CoverNoMergedPageNum => LazyLoad(ref _CoverNoMergedPageNum, "@CoverNoMergedPageNum");
+ #endregion CoverNoMergedPageNum
- #region AlignHLSTabWithSect
- [Category("Miscellaneous")]
+ #region AlignHLSTabWithSect
+ [Category("Miscellaneous")]
[Description("Align HLS Tab With Sect")]
// Align the starting position of the High Level Step to be under the section header (section title).
// The step width is also ajusted to fit within the page margins
private LazyLoad _AlignHLSTabWithSect;
- public bool AlignHLSTabWithSect
- {
- get
- {
- return LazyLoad(ref _AlignHLSTabWithSect, "@AlignHLSTabWithSect");
- }
- }
- #endregion AlignHLSTabWithSect
+ public bool AlignHLSTabWithSect => LazyLoad(ref _AlignHLSTabWithSect, "@AlignHLSTabWithSect");
+ #endregion AlignHLSTabWithSect
- #region AdjSectTitleLoc
- [Category("Miscellaneous")]
+ #region AdjSectTitleLoc
+ [Category("Miscellaneous")]
[Description("Adjust Section Title Location")]
// When high level steps are used as the high level section number and title (a ".0" is added to the high level
@@ -540,44 +346,27 @@ namespace VEPROMS.CSLA.Library
// This was added to support Barakah’s meta sections step/sub-step tabbing and the INITIAL sign off header
// placement in the page header.
private LazyLoad _AdjSectTitleLoc;
- public bool AdjSectTitleLoc // B2022-129: don't indent HLS when flag is on (Barakah - single column step attachment with meta sect)
- {
- get
- {
- return LazyLoad(ref _AdjSectTitleLoc, "@AdjSectTitleLoc");
- }
- }
+ public bool AdjSectTitleLoc // B2022-129: don't indent HLS when flag is on (Barakah - single column step attachment with meta sect)
+=> LazyLoad(ref _AdjSectTitleLoc, "@AdjSectTitleLoc");
- // this will add additional spacing between the Section Numbers and Titles
- private LazyLoad _SectTitleOffsetOverride;
- public float? SectTitleOffsetOverride
- {
- get
- {
- return LazyLoad(ref _SectTitleOffsetOverride, "@SectTitleOffsetOverride");
- }
- }
+ // this will add additional spacing between the Section Numbers and Titles
+ private LazyLoad _SectTitleOffsetOverride;
+ public float? SectTitleOffsetOverride => LazyLoad(ref _SectTitleOffsetOverride, "@SectTitleOffsetOverride");
- #endregion AdjSectTitleLoc
+ #endregion AdjSectTitleLoc
- #region ShowAlarmPointWindowInfo
- [Category("Miscellaneous")]
+ #region ShowAlarmPointWindowInfo
+ [Category("Miscellaneous")]
[Description("Show Alarm Point Table Info in Step Editor")]
//C2021-018 show alarm point RO data in step editor (BNPP Alarms)
// used to display Alarm Point Table RO values in the editor. A read-only Note type is used, off of step the section title, to display the Alarm Point table RO information.
private LazyLoad _ShowAlarmPointWindowInfo;
- public bool ShowAlarmPointWindowInfo
- {
- get
- {
- return LazyLoad(ref _ShowAlarmPointWindowInfo, "@ShowAlarmPointWindowInfo");
- }
- }
- #endregion ShowAlarmPointWindowInfo
+ public bool ShowAlarmPointWindowInfo => LazyLoad(ref _ShowAlarmPointWindowInfo, "@ShowAlarmPointWindowInfo");
+ #endregion ShowAlarmPointWindowInfo
- #region ComponentList
- [Category("Miscellaneous")]
+ #region ComponentList
+ [Category("Miscellaneous")]
[Description("Component List")]
// this is used generate a could different types of section and step formatting.
@@ -586,17 +375,11 @@ namespace VEPROMS.CSLA.Library
// It's used for Calvert Cliffs Alarm Point pages, Calvert Cliffs Valve List sections,
// and Farley Component List tales (Figure section in EOP procedures).
private LazyLoad _ComponentList;
- public bool ComponentList
- {
- get
- {
- return LazyLoad(ref _ComponentList, "@ComponentList");
- }
- }
- #endregion ComponentList
+ public bool ComponentList => LazyLoad(ref _ComponentList, "@ComponentList");
+ #endregion ComponentList
- #region pagestyle
- private PageStyle _pagestyle;
+ #region pagestyle
+ private PageStyle _pagestyle;
[Category("Miscellaneous")]
[DisplayName("Page Style")]
[Description("Page Style")]
@@ -607,8 +390,8 @@ namespace VEPROMS.CSLA.Library
get
{
string str = "//PageStyles/PageStyle[" + (IntLookup("@PageStyle") + 1).ToString() + "]";
- XmlNode xn = SelectSingleNode(str);
- if (_pagestyle == null) _pagestyle = new PageStyle(SelectSingleNode("//PageStyles/PageStyle[" + (IntLookup("@PageStyle") + 1).ToString() + "]"));
+ _ = SelectSingleNode(str);
+ if (_pagestyle == null) _pagestyle = new PageStyle(SelectSingleNode($"//PageStyles/PageStyle[{IntLookup("@PageStyle") + 1}]"));
return _pagestyle;
}
}
@@ -616,74 +399,29 @@ namespace VEPROMS.CSLA.Library
#region SubElements
private Layout _Layout;
- public Layout Layout
- {
- get
- {
- return (_Layout == null ? _Layout = new Layout(SelectSingleNode("Layout")) : _Layout);
- }
- }
- private SectTop _SectTop;
- public SectTop SectTop
- {
- get
- {
- return (_SectTop == null ? _SectTop = new SectTop(SelectSingleNode("SectTop")) : _SectTop);
- }
- }
- private Continue _Continue;
- public Continue Continue
- {
- get
- {
- return (_Continue == null ? _Continue = new Continue(SelectSingleNode("Continue")) : _Continue);
- }
- }
- private End _End;
- public End End
- {
- get
- {
- return (_End == null ? _End = new End(SelectSingleNode("End")) : _End);
- }
- }
- private Final _Final;
- public Final Final
- {
- get
- {
- return (_Final == null ? _Final = new Final(SelectSingleNode("Final")) : _Final);
- }
- }
- private StructureStyle _StructureStyle;
- public StructureStyle StructureStyle
- {
- get
- {
- return (_StructureStyle == null ? _StructureStyle = new StructureStyle(SelectSingleNode("StructureStyle")) : _StructureStyle);
- }
- }
- #endregion
+ public Layout Layout => _Layout ?? (_Layout = new Layout(SelectSingleNode("Layout")));
+ private SectTop _SectTop;
+ public SectTop SectTop => _SectTop ?? (_SectTop = new SectTop(SelectSingleNode("SectTop")));
+ private Continue _Continue;
+ public Continue Continue => _Continue ?? (_Continue = new Continue(SelectSingleNode("Continue")));
+ private End _End;
+ public End End => _End ?? (_End = new End(SelectSingleNode("End")));
+ private Final _Final;
+ public Final Final => _Final ?? (_Final = new Final(SelectSingleNode("Final")));
+ private StructureStyle _StructureStyle;
+ public StructureStyle StructureStyle => _StructureStyle ?? (_StructureStyle = new StructureStyle(SelectSingleNode("StructureStyle")));
+ #endregion
- #region AltMultiUnitWording
- [Category("Miscellaneous")]
+ #region AltMultiUnitWording
+ [Category("Miscellaneous")]
[Description("Alternate Wording for Printing when MultiUnit")]
// this will utilize Alternate Wording for Printing when MultiUnit and PrintCommonForZeroUnit is set
private LazyLoad _AltMultiUnitWording;
- public string AltMultiUnitWording
- {
- get
- {
- return LazyLoad(ref _AltMultiUnitWording, "@AltMultiUnitWording");
- }
- }
- #endregion IncludeInTOC
- public override string ToString()
- {
- return String.Format("{0:D2} - {1}", Index, Name);
- }
- }
+ public string AltMultiUnitWording => LazyLoad(ref _AltMultiUnitWording, "@AltMultiUnitWording");
+ #endregion IncludeInTOC
+ public override string ToString() => $"{Index:D2} - {Name}";
+ }
#endregion
#region DocStyleList
[TypeConverter(typeof(vlnListConverter))]
@@ -710,53 +448,35 @@ namespace VEPROMS.CSLA.Library
public Layout() : base() { }
#region TopMargin
private LazyLoad _TopMargin;
- [Category("Layout")]
- [DisplayName("Top Margin on Printed Page")]
- [Description("Top Margin on Printed Page")]
+ [Category("Layout")]
+ [DisplayName("Top Margin on Printed Page")]
+ [Description("Top Margin on Printed Page")]
- // The top point of the printed page to start printing the step text (or section number/title)
- public float? TopMargin
- {
- get
- {
- return LazyLoad(ref _TopMargin, "@TopMargin");
- }
- }
- #endregion
- #region FooterLength
- private LazyLoad _FooterLength;
- [Category("Location")]
- [DisplayName("Number of lines required for footer")]
- [Description("Number of lines required for footer")]
+ // The top point of the printed page to start printing the step text (or section number/title)
+ public float? TopMargin => LazyLoad(ref _TopMargin, "@TopMargin");
+ #endregion
+ #region FooterLength
+ private LazyLoad _FooterLength;
+ [Category("Location")]
+ [DisplayName("Number of lines required for footer")]
+ [Description("Number of lines required for footer")]
- // space to reserve if needed for bottom page messages (ex: continue message)
- public float? FooterLength
- {
- get
- {
- return LazyLoad(ref _FooterLength, "@FooterLength");
- }
- }
- #endregion
- #region ChangeBarAdjustment
- // B2023-052: Beaver Valley - Inconsistent change bar location
- private LazyLoad _AbsChgBarAdj;
- [Category("Location")]
- [DisplayName("Absolute change bar adjustment for margin differences")]
- [Description("Absolute change bar adjustment for margin differences")]
+ // space to reserve if needed for bottom page messages (ex: continue message)
+ public float? FooterLength => LazyLoad(ref _FooterLength, "@FooterLength");
+ #endregion
+ #region ChangeBarAdjustment
+ // B2023-052: Beaver Valley - Inconsistent change bar location
+ private LazyLoad _AbsChgBarAdj;
+ [Category("Location")]
+ [DisplayName("Absolute change bar adjustment for margin differences")]
+ [Description("Absolute change bar adjustment for margin differences")]
- // when AbsoluteFixedChangeColumn flag is used it is from the LeftMargin. If a unique section has a different LeftMarge define, change bars in that section will not be located at the same location as the other sections. This allows for an adjustment to the change bar location to match the other sections
- public float? AbsChgBarAdj
- {
- get
- {
- return LazyLoad(ref _AbsChgBarAdj, "@AbsChgBarAdj");
- }
- }
- #endregion ChangeBarAdjustment
+ // when AbsoluteFixedChangeColumn flag is used it is from the LeftMargin. If a unique section has a different LeftMarge define, change bars in that section will not be located at the same location as the other sections. This allows for an adjustment to the change bar location to match the other sections
+ public float? AbsChgBarAdj => LazyLoad(ref _AbsChgBarAdj, "@AbsChgBarAdj");
+ #endregion ChangeBarAdjustment
- #region LeftMargin
- private LazyLoad _LeftMargin;
+ #region LeftMargin
+ private LazyLoad _LeftMargin;
[Category("Location")]
[DisplayName("Size of left margin")]
[Description("Size of left margin")]
@@ -834,86 +554,56 @@ namespace VEPROMS.CSLA.Library
#region PageWidth
private LazyLoad _PageWidth;
- [Category("Location")]
- [DisplayName("Width of Page")]
- [Description("Width of Page")]
+ [Category("Location")]
+ [DisplayName("Width of Page")]
+ [Description("Width of Page")]
- // width of the printed page from the LeftMargin (defines the Right Margin of the section)
- public float? PageWidth
- {
- get
- {
- return LazyLoad(ref _PageWidth, "@PageWidth");
- }
- }
- #endregion PageWidth
+ // width of the printed page from the LeftMargin (defines the Right Margin of the section)
+ public float? PageWidth => LazyLoad(ref _PageWidth, "@PageWidth");
+ #endregion PageWidth
- #region MSWordXAdj
- private LazyLoad _MSWordXAdj;
- [Category("Location")]
- [DisplayName("MSWord X Adjustment")]
- [Description("X Placement of PDF during Print")]
+ #region MSWordXAdj
+ private LazyLoad _MSWordXAdj;
+ [Category("Location")]
+ [DisplayName("MSWord X Adjustment")]
+ [Description("X Placement of PDF during Print")]
- // used for landscape Word sections, adjusts the Horizontal position on the printed page
- public float? MSWordXAdj
- {
- get
- {
- return LazyLoad(ref _MSWordXAdj, "@MSWordXAdj");
- }
- }
- #endregion MSWordXAdj
+ // used for landscape Word sections, adjusts the Horizontal position on the printed page
+ public float? MSWordXAdj => LazyLoad(ref _MSWordXAdj, "@MSWordXAdj");
+ #endregion MSWordXAdj
- #region MSWordYAdj
- private LazyLoad _MSWordYAdj;
- [Category("Location")]
- [DisplayName("MSWord Y Adjustment")]
- [Description("Y Placement of PDF during Print")]
+ #region MSWordYAdj
+ private LazyLoad _MSWordYAdj;
+ [Category("Location")]
+ [DisplayName("MSWord Y Adjustment")]
+ [Description("Y Placement of PDF during Print")]
- // used for landscape Word sections, adjusts the Vertical position on the printed page
- public float? MSWordYAdj
- {
- get
- {
- return LazyLoad(ref _MSWordYAdj, "@MSWordYAdj");
- }
- }
- #endregion MSWordYAdj
+ // used for landscape Word sections, adjusts the Vertical position on the printed page
+ public float? MSWordYAdj => LazyLoad(ref _MSWordYAdj, "@MSWordYAdj");
+ #endregion MSWordYAdj
- #region SectionMacro
- private LazyLoad _SectionMacro;
- [Category("Extras")]
- [DisplayName("Section Macro")]
- [Description("Section Macro Prints With Title")]
+ #region SectionMacro
+ private LazyLoad _SectionMacro;
+ [Category("Extras")]
+ [DisplayName("Section Macro")]
+ [Description("Section Macro Prints With Title")]
- // will print a defined print macro with the section title.
- // (ex. Westinghouse Alarms format will print a solid line before the section title
- // for the "Line Above Section Title" section style)
- public string SectionMacro
- {
- get
- {
- return LazyLoad(ref _SectionMacro, "@SectionMacro");
- }
- }
- #endregion SectionMacro
+ // will print a defined print macro with the section title.
+ // (ex. Westinghouse Alarms format will print a solid line before the section title
+ // for the "Line Above Section Title" section style)
+ public string SectionMacro => LazyLoad(ref _SectionMacro, "@SectionMacro");
+ #endregion SectionMacro
- #region CenterToStepThenPage
- [Category("Layout")]
+ #region CenterToStepThenPage
+ [Category("Layout")]
[Description("CenterToStepThenPage")]
// centering position of Tables and Figures is calulated first with repect to the table or figure width, then that positionm is centered with respect the printable page width and left margin
private LazyLoad _CenterToStepThenPage;
- public bool CenterToStepThenPage
- {
- get
- {
- return LazyLoad(ref _CenterToStepThenPage, "@CenterToStepThenPage");
- }
- }
- #endregion CenterToStepThenPage
- }
+ public bool CenterToStepThenPage => LazyLoad(ref _CenterToStepThenPage, "@CenterToStepThenPage");
+ #endregion CenterToStepThenPage
+ }
#endregion Layout
#region SectTopWcnTraining
@@ -924,64 +614,40 @@ namespace VEPROMS.CSLA.Library
public SectTop() : base() { }
#region Font
private VE_Font _Font;
- [Category("Font")]
- [DisplayName("Font")]
- [Description("Font")]
- public VE_Font Font
- {
- get
- {
- return (_Font == null) ? _Font = new VE_Font(XmlNode) : _Font;
- }
- }
- #endregion
- #region Margin
- private LazyLoad _Margin;
- [Category("Section Continue Msg")]
- [DisplayName("Margin for Section top msg")]
- [Description("Margin for Section top msg")]
+ [Category("Font")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font => _Font ?? (_Font = new VE_Font(XmlNode));
+ #endregion
+ #region Margin
+ private LazyLoad _Margin;
+ [Category("Section Continue Msg")]
+ [DisplayName("Margin for Section top msg")]
+ [Description("Margin for Section top msg")]
- // used to position Responsibility text for Wolf Creek Training format
- public float? Margin
- {
- get
- {
- return LazyLoad(ref _Margin, "@Margin");
- }
- }
- #endregion Margin
+ // used to position Responsibility text for Wolf Creek Training format
+ public float? Margin => LazyLoad(ref _Margin, "@Margin");
+ #endregion Margin
- #region MaxLen
- private LazyLoad _MaxLen;
- [Category("Section Continue Msg")]
- [DisplayName("MaxLen for text within the column")]
- [Description("MaxLen for text within the column")]
+ #region MaxLen
+ private LazyLoad _MaxLen;
+ [Category("Section Continue Msg")]
+ [DisplayName("MaxLen for text within the column")]
+ [Description("MaxLen for text within the column")]
- // the maxium length of Responsibility text (Wolf Creek Training format)
- public int? MaxLen
- {
- get
- {
- return LazyLoad(ref _MaxLen, "@MaxLen");
- }
- }
- #endregion MaxLen
- #region Message
- private LazyLoad _Message;
- [Category("Continue Msg")]
- [DisplayName("Section Top Continue Msg")]
- [Description("Section Top Continue Msg")]
+ // the maxium length of Responsibility text (Wolf Creek Training format)
+ public int? MaxLen => LazyLoad(ref _MaxLen, "@MaxLen");
+ #endregion MaxLen
+ #region Message
+ private LazyLoad _Message;
+ [Category("Continue Msg")]
+ [DisplayName("Section Top Continue Msg")]
+ [Description("Section Top Continue Msg")]
- // top continue message used only for Wolf Creek Training format
- public string Message
- {
- get
- {
- return LazyLoad(ref _Message, "@Message");
- }
- }
- #endregion Message
- }
+ // top continue message used only for Wolf Creek Training format
+ public string Message => LazyLoad(ref _Message, "@Message");
+ #endregion Message
+ }
#endregion SectTopWcnTraining
#region ContinueAll
@@ -993,44 +659,20 @@ namespace VEPROMS.CSLA.Library
public Continue() : base() { }
#region Font
private VE_Font _Font;
- [Category("Continue Msg")]
- [DisplayName("Font")]
- [Description("Font")]
- public VE_Font Font
- {
- get
- {
- return (_Font == null ? _Font = new VE_Font(base.XmlNode) : _Font);
- }
- }
- #endregion
- #region SubElements
- private Top _Top;
- public Top Top
- {
- get
- {
- return (_Top == null? _Top = new Top(SelectSingleNode("Top")): _Top);
- }
- }
- private Bottom _Bottom;
- public Bottom Bottom
- {
- get
- {
- return (_Bottom == null ? _Bottom = new Bottom(SelectSingleNode("Bottom")) : _Bottom);
- }
- }
- private SectionTitle _SectionTitle;
- public SectionTitle SectionTitle
- {
- get
- {
- return (_SectionTitle == null ? _SectionTitle = new SectionTitle(SelectSingleNode("SectionTitle")) : _SectionTitle);
- }
- }
- #endregion
- }
+ [Category("Continue Msg")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font => _Font ?? (_Font = new VE_Font(base.XmlNode));
+ #endregion
+ #region SubElements
+ private Top _Top;
+ public Top Top => _Top ?? (_Top = new Top(SelectSingleNode("Top")));
+ private Bottom _Bottom;
+ public Bottom Bottom => _Bottom ?? (_Bottom = new Bottom(SelectSingleNode("Bottom")));
+ private SectionTitle _SectionTitle;
+ public SectionTitle SectionTitle => _SectionTitle ?? (_SectionTitle = new SectionTitle(SelectSingleNode("SectionTitle")));
+ #endregion
+ }
#endregion
#region Top
[TypeConverter(typeof(ExpandableObjectConverter))]
@@ -1040,138 +682,86 @@ namespace VEPROMS.CSLA.Library
public Top() : base() { }
#region Font
private VE_Font _Font;
- [Category("Font")]
- [DisplayName("Font")]
- [Description("Font")]
- public VE_Font Font
- {
- get
- {
- return (_Font == null) ? _Font = new VE_Font(XmlNode) : _Font;
- }
- }
- #endregion
- #region Margin
- private LazyLoad _Margin;
- [Category("Continue Msg")]
- [DisplayName("Margin for top msg")]
- [Description("Margin for top msg")]
+ [Category("Font")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font => _Font ?? (_Font = new VE_Font(XmlNode));
+ #endregion
+ #region Margin
+ private LazyLoad _Margin;
+ [Category("Continue Msg")]
+ [DisplayName("Margin for top msg")]
+ [Description("Margin for top msg")]
- //value added to the left margin when calculating the center point of a top continue message.
- public float? Margin
- {
- get
- {
- return LazyLoad(ref _Margin, "@Margin");
- }
- }
- #endregion Margin
+ //value added to the left margin when calculating the center point of a top continue message.
+ public float? Margin => LazyLoad(ref _Margin, "@Margin");
+ #endregion Margin
- #region RowOverride
- // C2019-044 put in for Barakah Single Column format
- // specify the row to put the top continue message
- // this allows us to put the Top Continue Message on the same row as the checkoff (initials) header - per their writer's guide
- private LazyLoad _RowOverride;
- [Category("Continue Msg")]
- [DisplayName("Top msg on specific row")]
- [Description("Top msg on specific row")]
- public float? RowOverride
- {
- get
- {
- return LazyLoad(ref _RowOverride, "@RowOverride");
- }
- }
- #endregion
+ #region RowOverride
+ // C2019-044 put in for Barakah Single Column format
+ // specify the row to put the top continue message
+ // this allows us to put the Top Continue Message on the same row as the checkoff (initials) header - per their writer's guide
+ private LazyLoad _RowOverride;
+ [Category("Continue Msg")]
+ [DisplayName("Top msg on specific row")]
+ [Description("Top msg on specific row")]
+ public float? RowOverride => LazyLoad(ref _RowOverride, "@RowOverride");
+ #endregion
- #region UseStepTabs
- private LazyLoad _UseStepTabs;
- [Category("Continue Msg")]
- [DisplayName("Flag to use step tabs")]
- [Description("Flag to use step tabs")]
+ #region UseStepTabs
+ private LazyLoad _UseStepTabs;
+ [Category("Continue Msg")]
+ [DisplayName("Flag to use step tabs")]
+ [Description("Flag to use step tabs")]
- // added for Comanche Peak will print out step tabs as a top comtinue message.
- public bool UseStepTabs
- {
- get
- {
- return LazyLoad(ref _UseStepTabs, "@UseStepTabs");
- }
- }
- #endregion UseStepTabs
+ // added for Comanche Peak will print out step tabs as a top comtinue message.
+ public bool UseStepTabs => LazyLoad(ref _UseStepTabs, "@UseStepTabs");
+ #endregion UseStepTabs
- #region HLS
- private LazyLoad _HLS;
- [Category("Continue Msg")]
- [DisplayName("Include HLS in top continue msg")]
- [Description("Include HLS in top continue msg")]
+ #region HLS
+ private LazyLoad _HLS;
+ [Category("Continue Msg")]
+ [DisplayName("Include HLS in top continue msg")]
+ [Description("Include HLS in top continue msg")]
- // include the High Level Step in the top continue message
- // - see DoTopContinueMsg in VlnParagraph for details
- // set to "1" will use high level step tab and text
- // set to "4" the high level step text is the section title, appears when fist level sub-step breaks
- // set to "7" similar logic as "4" but for Vogtle Main Control Room alarms but use high level step text
- // set to "6" handle when break occures on Caution/Note
- // set to "3" special logic for Calvert Cliffs Alarms (the two column part)
- public int? HLS
- {
- get
- {
- return LazyLoad(ref _HLS, "@HLS");
- }
- }
- #endregion HLS
+ // include the High Level Step in the top continue message
+ // - see DoTopContinueMsg in VlnParagraph for details
+ // set to "1" will use high level step tab and text
+ // set to "4" the high level step text is the section title, appears when fist level sub-step breaks
+ // set to "7" similar logic as "4" but for Vogtle Main Control Room alarms but use high level step text
+ // set to "6" handle when break occures on Caution/Note
+ // set to "3" special logic for Calvert Cliffs Alarms (the two column part)
+ public int? HLS => LazyLoad(ref _HLS, "@HLS");
+ #endregion HLS
- #region PlaceAtLeftMargin
- private LazyLoad _PlaceAtLeftMargin; // F2019-033 only use the Left Margin plus any Top message margin
- [Category("Continue Msg")]
- [DisplayName("Flag to position at left margin")]
- [Description("Flag to position at left margin")]
+ #region PlaceAtLeftMargin
+ private LazyLoad _PlaceAtLeftMargin; // F2019-033 only use the Left Margin plus any Top message margin
+ [Category("Continue Msg")]
+ [DisplayName("Flag to position at left margin")]
+ [Description("Flag to position at left margin")]
- // position the top continue message with respect only to the left margin
- public bool PlaceAtLeftMargin
- {
- get
- {
- return LazyLoad(ref _PlaceAtLeftMargin, "@PlaceAtLeftMargin");
- }
- }
- #endregion PlaceAtLeftMargin
+ // position the top continue message with respect only to the left margin
+ public bool PlaceAtLeftMargin => LazyLoad(ref _PlaceAtLeftMargin, "@PlaceAtLeftMargin");
+ #endregion PlaceAtLeftMargin
- #region Message
- private LazyLoad _RemoveBullet;
- public bool RemoveBullet // C2021-024: WCN1 if bullet exists in combined tab, stop right before bullet.
- {
- get
- {
- return LazyLoad(ref _RemoveBullet, "@RemoveBullet");
- }
- }
+ #region Message
+ private LazyLoad _RemoveBullet;
+ public bool RemoveBullet // C2021-024: WCN1 if bullet exists in combined tab, stop right before bullet.
+=> LazyLoad(ref _RemoveBullet, "@RemoveBullet");
- private LazyLoad _DontIncludeRNOTabIfHasAERParent;
- public bool DontIncludeRNOTabIfHasAERParent // F2026-002: Vogtle Units 3&4 Top Continue Message.
- {
- get
- {
- return LazyLoad(ref _DontIncludeRNOTabIfHasAERParent, "@DontIncludeRNOTabIfHasAERParent");
- }
- }
+ private LazyLoad _DontIncludeRNOTabIfHasAERParent;
+ public bool DontIncludeRNOTabIfHasAERParent // F2026-002: Vogtle Units 3&4 Top Continue Message.
+=> LazyLoad(ref _DontIncludeRNOTabIfHasAERParent, "@DontIncludeRNOTabIfHasAERParent");
- private LazyLoad _Message;
- [Category("Continue Msg")]
- [DisplayName("Top Continue Msg")]
- [Description("Top Continue Msg")]
+ private LazyLoad _Message;
+ [Category("Continue Msg")]
+ [DisplayName("Top Continue Msg")]
+ [Description("Top Continue Msg")]
- // the top continue message string - may caontain special formatting items - see DoTopContinueMsg in vlnParagraph for different format settings
- public string Message
- {
- get
- {
- return LazyLoad(ref _Message, "@Message");
- }
- }
- #endregion Message
- }
+ // the top continue message string - may caontain special formatting items - see DoTopContinueMsg in vlnParagraph for different format settings
+ public string Message => LazyLoad(ref _Message, "@Message");
+ #endregion Message
+ }
#endregion Top
@@ -1183,120 +773,72 @@ namespace VEPROMS.CSLA.Library
public Bottom() : base() { }
#region Font
private VE_Font _Font;
- [Category("Font")]
- [DisplayName("Font")]
- [Description("Font")]
- public VE_Font Font
- {
- get
- {
- return (_Font == null) ? _Font = new VE_Font(XmlNode) : _Font;
- }
- }
- #endregion
- #region Margin
- private LazyLoad _Margin;
- [Category("Continue Msg")]
- [DisplayName("Margin for bottom msg")]
- [Description("Margin for bottom msg")]
+ [Category("Font")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font => _Font ?? (_Font = new VE_Font(XmlNode));
+ #endregion
+ #region Margin
+ private LazyLoad _Margin;
+ [Category("Continue Msg")]
+ [DisplayName("Margin for bottom msg")]
+ [Description("Margin for bottom msg")]
- // horitzontal position of the bottom continue message from the left margin
- public float? Margin
- {
- get
- {
- return LazyLoad(ref _Margin, "@Margin");
- }
- }
- #endregion Margin
+ // horitzontal position of the bottom continue message from the left margin
+ public float? Margin => LazyLoad(ref _Margin, "@Margin");
+ #endregion Margin
- #region MarginR BGE
- private LazyLoad _MarginR;
- [Category("Continue Msg")]
- [DisplayName("Margin for bottom msg RNO Column (if in both columns)")]
- [Description("Margin for bottom msg RNO Column (if in both columns)")]
+ #region MarginR BGE
+ private LazyLoad _MarginR;
+ [Category("Continue Msg")]
+ [DisplayName("Margin for bottom msg RNO Column (if in both columns)")]
+ [Description("Margin for bottom msg RNO Column (if in both columns)")]
- // horitzontal position from the left margin for a RNO bottom continue message
- public float? MarginR
- {
- get
- {
- return LazyLoad(ref _MarginR, "@MarginR");
- }
- }
- #endregion MarginR BGE
+ // horitzontal position from the left margin for a RNO bottom continue message
+ public float? MarginR => LazyLoad(ref _MarginR, "@MarginR");
+ #endregion MarginR BGE
- #region Location
- [Category("Continue Msg")]
+ #region Location
+ [Category("Continue Msg")]
[Description("Bottom Continue Location")]
private LazyLoad _Location;
- // location of the bottom continue message
- // E_ContBottomLoc list (ENum.cs):
- // EndOfText = 0,
- // BtwnTextAndBottom = 1,
- // BottomOfPage = 2,
- // BelowBottom1 = 3,
- // BottomWithFooter = 4, - added for BGE for Alarms. This puts continue message on bottom AND if in CONDITION/RESPONSE table, at bottom of both columns.
- // EndOfText2 = 5,
- // BtwnTextAndBottom2 = 6 - Added for BGE, their continue message was a line or so too far down the page
+ // location of the bottom continue message
+ // E_ContBottomLoc list (ENum.cs):
+ // EndOfText = 0,
+ // BtwnTextAndBottom = 1,
+ // BottomOfPage = 2,
+ // BelowBottom1 = 3,
+ // BottomWithFooter = 4, - added for BGE for Alarms. This puts continue message on bottom AND if in CONDITION/RESPONSE table, at bottom of both columns.
+ // EndOfText2 = 5,
+ // BtwnTextAndBottom2 = 6 - Added for BGE, their continue message was a line or so too far down the page
- public E_ContBottomLoc? Location
- {
- get
- {
- return LazyLoad(ref _Location, "@Location");
- }
- }
+ public E_ContBottomLoc? Location => LazyLoad(ref _Location, "@Location");
- // flag for cases where step text was printing on top of the bottom continue messsage due to how a step was paginated - put in for Farley
- private LazyLoad _NoOverrideSpace;
- public bool NoOverrideSpace
- {
- get
- {
- return LazyLoad(ref _NoOverrideSpace, "@NoOverrideSpace");
- }
- }
+ // flag for cases where step text was printing on top of the bottom continue messsage due to how a step was paginated - put in for Farley
+ private LazyLoad _NoOverrideSpace;
+ public bool NoOverrideSpace => LazyLoad(ref _NoOverrideSpace, "@NoOverrideSpace");
- // Location Adjustment of the calculated vertical position of the bottom continue message (from Location setting)
- private LazyLoad _LocAdj;
- public int? LocAdj
- {
- get
- {
+ // Location Adjustment of the calculated vertical position of the bottom continue message (from Location setting)
+ private LazyLoad _LocAdj;
+ public int? LocAdj => LazyLoad(ref _LocAdj, "@LocAdj");
+ #endregion Location
- return LazyLoad(ref _LocAdj, "@LocAdj");
- }
- }
- #endregion Location
+ #region Message
+ private LazyLoad _RemoveBullet;
+ public bool RemoveBullet // C2021-024: WCN1 if bullet exists in combined tab, stop right before bullet.
+=> LazyLoad(ref _RemoveBullet, "@RemoveBullet");
- #region Message
- private LazyLoad _RemoveBullet;
- public bool RemoveBullet // C2021-024: WCN1 if bullet exists in combined tab, stop right before bullet.
- {
- get
- {
- return LazyLoad(ref _RemoveBullet, "@RemoveBullet");
- }
- }
+ private LazyLoad _Message;
+ [Category("Continue Msg")]
+ [DisplayName("Bottom Continue Msg")]
+ [Description("Bottom Continue Msg")]
- private LazyLoad _Message;
- [Category("Continue Msg")]
- [DisplayName("Bottom Continue Msg")]
- [Description("Bottom Continue Msg")]
-
- //the bottom continue message string - may caontain special formatting items
- //- see DoBottomContinueMsg in vlnParagraph for different format settings
- public string Message
- {
- get
- {
- return LazyLoad(ref _Message, "@Message");
- }
- }
- #endregion Message
- }
+ //the bottom continue message string - may caontain special formatting items
+ //- see DoBottomContinueMsg in vlnParagraph for different format settings
+ public string Message => LazyLoad(ref _Message, "@Message");
+ #endregion Message
+ }
#endregion Bottom
#region SectionTitle
@@ -1307,20 +849,14 @@ namespace VEPROMS.CSLA.Library
public SectionTitle() : base() { }
#region AppendToTitle
private LazyLoad _AppendToTitle;
- [Category("Section Title Continue Msg")]
- [DisplayName("AppendToTitle")]
- [Description("Append Text to Section Title For Continue Msg")]
+ [Category("Section Title Continue Msg")]
+ [DisplayName("AppendToTitle")]
+ [Description("Append Text to Section Title For Continue Msg")]
- // continue message to add to the section title
- public string AppendToTitle
- {
- get
- {
- return LazyLoad(ref _AppendToTitle, "@AppendToTitle");
- }
- }
- #endregion AppendToTitle
- }
+ // continue message to add to the section title
+ public string AppendToTitle => LazyLoad(ref _AppendToTitle, "@AppendToTitle");
+ #endregion AppendToTitle
+ }
#endregion //SectionTitle - continue setting
#endregion ContinueAll
@@ -1332,19 +868,13 @@ namespace VEPROMS.CSLA.Library
public End() : base() { }
#region Font
private VE_Font _Font;
- [Category("End Msg")]
- [DisplayName("Font")]
- [Description("Font")]
- public VE_Font Font
- {
- get
- {
- return (_Font == null ? _Font = new VE_Font(XmlNode) : _Font);
- }
- }
- #endregion
- #region Flag
- private LazyLoad _Flag;
+ [Category("End Msg")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font => _Font ?? (_Font = new VE_Font(XmlNode));
+ #endregion
+ #region Flag
+ private LazyLoad _Flag;
[Category("End Msg")]
[DisplayName("End Msg Exists")]
[Description("End Msg Exists")]
@@ -1361,48 +891,24 @@ namespace VEPROMS.CSLA.Library
#region Message
private LazyLoad _Message;
- [Category("End Msg")]
- [DisplayName("End Message")]
- [Description("End Message")]
+ [Category("End Msg")]
+ [DisplayName("End Message")]
+ [Description("End Message")]
- // End Message Text
- public string Message
- {
- get
- {
- return LazyLoad(ref _Message, "@Message");
- }
- }
+ // End Message Text
+ public string Message => LazyLoad(ref _Message, "@Message");
- public string FixedMessage
- {
- get
- {
- return Message == null ? null : Message.Replace("\n","\r\n").Replace(@"{par}","\r\n");
- }
- }
+ public string FixedMessage => Message?.Replace("\n", "\r\n").Replace(@"{par}", "\r\n");
- // amount of space from the left margin to print the End Message
- private LazyLoad _Margin;
- public float? Margin
- {
- get
- {
- return LazyLoad(ref _Margin, "@Margin");
- }
- }
+ // amount of space from the left margin to print the End Message
+ private LazyLoad _Margin;
+ public float? Margin => LazyLoad(ref _Margin, "@Margin");
- // print the end message at the end of each sub-section
- private LazyLoad _EndMessageOnEachSubSection;
- public bool EndMessageOnEachSubSection
- {
- get
- {
- return LazyLoad(ref _EndMessageOnEachSubSection, "@EndMessageOnEachSubSection");
- }
- }
- #endregion Message
- }
+ // print the end message at the end of each sub-section
+ private LazyLoad _EndMessageOnEachSubSection;
+ public bool EndMessageOnEachSubSection => LazyLoad(ref _EndMessageOnEachSubSection, "@EndMessageOnEachSubSection");
+ #endregion Message
+ }
#endregion End
#region Final
@@ -1412,19 +918,13 @@ namespace VEPROMS.CSLA.Library
public Final(XmlNode xmlNode) : base(xmlNode) { }
public Final() : base() { }
private LazyLoad _Message;
- [Category("Final Msg")]
- [DisplayName("Final Message")]
- [Description("Final Message")]
-
- // Final Message text to be printed on last page of procedure
- public string Message
- {
- get
- {
- return LazyLoad(ref _Message, "@Message");
- }
- }
- }
+ [Category("Final Msg")]
+ [DisplayName("Final Message")]
+ [Description("Final Message")]
+
+ // Final Message text to be printed on last page of procedure
+ public string Message => LazyLoad(ref _Message, "@Message");
+ }
#endregion Final
#region StructureStyle
@@ -1438,36 +938,24 @@ namespace VEPROMS.CSLA.Library
[Description("Where Used")]
private LazyLoad _Where;
- // where with repect to the section is this DocStyle/PageList relationship used:
- // UseOnAllPages (all pages of the section), UseOnFirstPage (only the first page of the section),
- // UseOnAllButFirstPage (all except for the first page of the section).
- // Note that when UseOnFirstPage is used, it but reference a DocStyle (IndexOtherThanFirstPage)
- // that uses UseOnAllButFirstPage.
+ // where with repect to the section is this DocStyle/PageList relationship used:
+ // UseOnAllPages (all pages of the section), UseOnFirstPage (only the first page of the section),
+ // UseOnAllButFirstPage (all except for the first page of the section).
+ // Note that when UseOnFirstPage is used, it but reference a DocStyle (IndexOtherThanFirstPage)
+ // that uses UseOnAllButFirstPage.
- public E_DocStyleUse? Where
- {
- get
- {
- return LazyLoad(ref _Where, "@Where");
- }
- }
- #endregion Where
+ public E_DocStyleUse? Where => LazyLoad(ref _Where, "@Where");
+ #endregion Where
- #region Style
- [Category("Structure Style")]
+ #region Style
+ [Category("Structure Style")]
[Description("Style")]
// allow us to identify a specialized type of section (Table of Contents, Foldout Page, etc) as well as other unique formatting that deviates from the normal formatting/data entry of the procedure. See "E_DocStructStyle" in VEPROMS.CSLA.Library\ENums.cs for alist of the possible flags and descriptions.
private LazyLoad _Style;
- public E_DocStructStyle? Style
- {
- get
- {
- return LazyLoad(ref _Style, "@Style");
- }
- }
- #endregion Style
- }
+ public E_DocStructStyle? Style => LazyLoad(ref _Style, "@Style");
+ #endregion Style
+ }
#endregion StructureStyle
#endregion DocStyleAll
}
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs b/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs
index 5d0a9ff5..2653103b 100644
--- a/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs
+++ b/PROMS/VEPROMS.CSLA.Library/Format/ENums.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
-using System.ComponentModel;
namespace VEPROMS.CSLA.Library
{
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs b/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs
index 1d75f875..d881cdc9 100644
--- a/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs
+++ b/PROMS/VEPROMS.CSLA.Library/Format/EPFormatFile.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Text;
using System.ComponentModel;
using System.Xml;
using System.Linq;
@@ -32,54 +31,27 @@ namespace VEPROMS.CSLA.Library
private LazyLoad _Name;
[DisplayName("Name")]
[Description("EP Viewer File Name")]
- public string Name
- {
- get
- {
- return LazyLoad(ref _Name, "@Name");
- }
- }
+ public string Name => LazyLoad(ref _Name, "@Name");
// Name of the EP Viewer Format File
private LazyLoad _Description;
[DisplayName("Description")]
[Description("EP Viewer Description")]
- public string Description
- {
- get
- {
- return LazyLoad(ref _Description, "@Description");
- }
- }
+ public string Description => LazyLoad(ref _Description, "@Description");
// Id of Annotation Type Associated with this file
private LazyLoad _AnnotationTypeID;
[DisplayName("AnnotationTypeID")]
[Description("Id of Annotation Type Associated with this file")]
- public int? AnnotationTypeID
- {
- get
- {
- return LazyLoad(ref _AnnotationTypeID, "@AnnotationTypeID");
- }
- }
+ public int? AnnotationTypeID => LazyLoad(ref _AnnotationTypeID, "@AnnotationTypeID");
// Return Name of Annotation that EP Format File is Attached to
- public string AnnotationName()
- {
- return AnnotationTypeInfo.Get((int) AnnotationTypeID).Name;
- }
+ public string AnnotationName() => AnnotationTypeInfo.Get((int)AnnotationTypeID).Name;
//if xml value is blank, should element export?
//defaults to true
private LazyLoad _exportblank;
[DisplayName("exportblank")]
[Description("if xml value is blank, should element export?")]
- public bool exportblank
- {
- get
- {
- return LazyLoad(ref _exportblank, "@exportblank");
- }
- }
+ public bool exportblank => LazyLoad(ref _exportblank, "@exportblank");
// returns a list of fields that are defined in the EP format's structure
private EPFields _FieldList;
public EPFields FieldList
@@ -141,8 +113,10 @@ namespace VEPROMS.CSLA.Library
{
if (dr.Read())
{
- XmlDocument xd = new XmlDocument();
- xd.XmlResolver = null;
+ XmlDocument xd = new XmlDocument
+ {
+ XmlResolver = null
+ };
xd.LoadXml(dr.GetString("Data"));
return xd;
}
@@ -255,21 +229,9 @@ namespace VEPROMS.CSLA.Library
public EPField(XmlNode xmlNode) : base(xmlNode) { }
public EPField() : base() { }
private LazyLoad _name;
- public string name
- {
- get
- {
- return LazyLoad(ref _name, "@name");
- }
- }
+ public string name => LazyLoad(ref _name, "@name");
private LazyLoad _type;
- public string type
- {
- get
- {
- return LazyLoad(ref _type, "@type");
- }
- }
+ public string type => LazyLoad(ref _type, "@type");
private LazyLoad _label;
public string label
{
@@ -284,22 +246,10 @@ namespace VEPROMS.CSLA.Library
}
}
private LazyLoad _text;
- public string text
- {
- get
- {
- return LazyLoad(ref _text, "@text");
- }
- }
+ public string text => LazyLoad(ref _text, "@text");
//roid of group item that individual sub-items will be the choices for the list/combobox for ROSINGLE and ROMULTI
private LazyLoad _rosource;
- public string rosource
- {
- get
- {
- return LazyLoad(ref _rosource, "@rosource");
- }
- }
+ public string rosource => LazyLoad(ref _rosource, "@rosource");
//the columns in the RO that will be included in the exports
private LazyLoad _returncols;
public List returncols()
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PageStyles.cs b/PROMS/VEPROMS.CSLA.Library/Format/PageStyles.cs
index a97edf71..7de782d0 100644
--- a/PROMS/VEPROMS.CSLA.Library/Format/PageStyles.cs
+++ b/PROMS/VEPROMS.CSLA.Library/Format/PageStyles.cs
@@ -1,6 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
using System.ComponentModel;
using System.Xml;
@@ -23,44 +20,23 @@ namespace VEPROMS.CSLA.Library
#region Business Methods
// description to associate with a DocStyle
private LazyLoad _Name;
- [DisplayName("Name")]
- [Description("Page Style Name")]
- public string Name
- {
- get
- {
- return LazyLoad(ref _Name, "@Name");
- }
- }
+ [DisplayName("Name")]
+ [Description("Page Style Name")]
+ public string Name => LazyLoad(ref _Name, "@Name");
- // a unuque number that is referenced from the DocStyles
- private LazyLoad _Index;
- [DisplayName("Index")]
- [Description("Page Style Index")]
- public int? Index
- {
- get
- {
- return LazyLoad(ref _Index, "@Index");
- }
- }
+ // a unuque number that is referenced from the DocStyles
+ private LazyLoad _Index;
+ [DisplayName("Index")]
+ [Description("Page Style Index")]
+ public int? Index => LazyLoad(ref _Index, "@Index");
- private PageItems _PageItems;
- public PageItems PageItems
- {
- get
- {
- return (_PageItems == null)? _PageItems = new PageItems(SelectNodes("Item")): _PageItems;
- }
- }
- #endregion
- #region Override ToString
- public override string ToString()
- {
- return string.Format("{0:D2} - {1}", Index, Name);
- }
- #endregion
- }
+ private PageItems _PageItems;
+ public PageItems PageItems => _PageItems ?? (_PageItems = new PageItems(SelectNodes("Item")));
+ #endregion
+ #region Override ToString
+ public override string ToString() => string.Format("{0:D2} - {1}", Index, Name);
+ #endregion
+ }
#endregion
#region PageItems
[TypeConverter(typeof(vlnListConverter))]
@@ -79,192 +55,91 @@ namespace VEPROMS.CSLA.Library
#endregion
#region Business Methods
private VE_Font _Font;
- [Category("Font")]
- [DisplayName("Font")]
- [Description("Font")]
- public VE_Font Font
- {
- get
- {
- return (_Font == null) ?_Font = new VE_Font(XmlNode): _Font;
- }
- }
- private RelatedItem _RelatedItem;
- public RelatedItem RelatedItem
- {
- get
- {
- return (_RelatedItem == null) ? _RelatedItem = new RelatedItem(SelectSingleNode("RelatedItem")) : _RelatedItem;
- }
- }
+ [Category("Font")]
+ [DisplayName("Font")]
+ [Description("Font")]
+ public VE_Font Font => _Font ?? (_Font = new VE_Font(XmlNode));
+ private RelatedItem _RelatedItem;
+ public RelatedItem RelatedItem => _RelatedItem ?? (_RelatedItem = new RelatedItem(SelectSingleNode("RelatedItem")));
- // this can be an actual token, in curly braces, that dynamically gets replaced with information, or just plain text
- private LazyLoad _Token;
- [Category("Content")]
- [DisplayName("Content")]
- [Description("Item Content")]
- public string Token
- {
- get
- {
- return LazyLoad(ref _Token, "@Token");
- }
- }
+ // this can be an actual token, in curly braces, that dynamically gets replaced with information, or just plain text
+ private LazyLoad _Token;
+ [Category("Content")]
+ [DisplayName("Content")]
+ [Description("Item Content")]
+ public string Token => LazyLoad(ref _Token, "@Token");
- // the row on the page to place the Item
- private LazyLoad _Row;
- [Category("Location")]
- [DisplayName("Vertical Position")]
- [Description("Vertical Position")]
- public float? Row
- {
- get
- {
- return LazyLoad(ref _Row, "@Row");
- }
- }
+ // the row on the page to place the Item
+ private LazyLoad _Row;
+ [Category("Location")]
+ [DisplayName("Vertical Position")]
+ [Description("Vertical Position")]
+ public float? Row => LazyLoad(ref _Row, "@Row");
- // the column on the page to place the Item
- private LazyLoad _Col;
- [Category("Location")]
- [DisplayName("Horizontal Position")]
- [Description("Horizontal Position")]
- public float? Col
- {
- get
- {
- return LazyLoad(ref _Col, "@Col");
- }
- }
+ // the column on the page to place the Item
+ private LazyLoad _Col;
+ [Category("Location")]
+ [DisplayName("Horizontal Position")]
+ [Description("Horizontal Position")]
+ public float? Col => LazyLoad(ref _Col, "@Col");
- // the justification at the Col position in which to print the Token information
- private LazyLoad _Justify;
- public E_Justify? Justify
- {
- get
- {
- return LazyLoad(ref _Justify, "@Justify");
- }
- }
+ // the justification at the Col position in which to print the Token information
+ private LazyLoad _Justify;
+ public E_Justify? Justify => LazyLoad(ref _Justify, "@Justify");
- //run the PROMS Replace Words logic on the resulting text of Token
- private LazyLoad _RepWords; // F2021-053: Do replace words in page list
- public bool RepWords
- {
- get
- {
- return LazyLoad(ref _RepWords, "@RepWords");
- }
- }
+ //run the PROMS Replace Words logic on the resulting text of Token
+ private LazyLoad _RepWords; // F2021-053: Do replace words in page list
+ public bool RepWords => LazyLoad(ref _RepWords, "@RepWords");
- //Flag to tell PROMS to get the alarm value information based on the specified Child applicability
- private LazyLoad _ROLkUpMatch; // C2021-065 (BNPP Alarms format)
- public bool ROLkUpMatch
- {
- get
- {
- return LazyLoad(ref _ROLkUpMatch, "@ROLkUpMatch");
- }
- }
+ //Flag to tell PROMS to get the alarm value information based on the specified Child applicability
+ private LazyLoad _ROLkUpMatch; // C2021-065 (BNPP Alarms format)
+ public bool ROLkUpMatch => LazyLoad(ref _ROLkUpMatch, "@ROLkUpMatch");
- // Flag to specify if that PageStyle Item should be used in creating alarm point information
- // for viewing in the PROMS step editor
- // this information is displayed in a Note that it build on the fly when first opening an Alarm Point page
- private LazyLoad _ROLkUpInEditor; // C2021-018 (BNPP Alarms format)
- public bool ROLkUpInEditor
- {
- get
- {
- return LazyLoad(ref _ROLkUpInEditor, "@ROLkUpInEditor");
- }
- }
+ // Flag to specify if that PageStyle Item should be used in creating alarm point information
+ // for viewing in the PROMS step editor
+ // this information is displayed in a Note that it build on the fly when first opening an Alarm Point page
+ private LazyLoad _ROLkUpInEditor; // C2021-018 (BNPP Alarms format)
+ public bool ROLkUpInEditor => LazyLoad(ref _ROLkUpInEditor, "@ROLkUpInEditor");
- // defines a maxium width before the resolved PSI token (procedure specific information) text is wrapped
- // on to the next line
- private LazyLoad _MaxWidth;
- public int? MaxWidth
- {
- get
- {
- return (LazyLoad(ref _MaxWidth, "@MaxWidth"));
- }
- }
+ // defines a maxium width before the resolved PSI token (procedure specific information) text is wrapped
+ // on to the next line
+ private LazyLoad _MaxWidth;
+ public int? MaxWidth => LazyLoad(ref _MaxWidth, "@MaxWidth");
- // MaxWidth, above, flagged that, if there was more than 1 line, the topmargin would be adjusted by however
- // many lines the PSI item contained (for wst alarms). The MaxWidthCurPage is used when that adjustment
- // should not be made, the length of the PSI item is only relevant for the current page.
- // (see AdjustTopMarginForMultiLinePageListItems variable and how it is used)
- private LazyLoad _MaxWidthCurPage;
- public int? MaxWidthCurPage
- {
- get
- {
- return (LazyLoad(ref _MaxWidthCurPage, "@MaxWidthCurPage"));
- }
- }
+ // MaxWidth, above, flagged that, if there was more than 1 line, the topmargin would be adjusted by however
+ // many lines the PSI item contained (for wst alarms). The MaxWidthCurPage is used when that adjustment
+ // should not be made, the length of the PSI item is only relevant for the current page.
+ // (see AdjustTopMarginForMultiLinePageListItems variable and how it is used)
+ private LazyLoad _MaxWidthCurPage;
+ public int? MaxWidthCurPage => LazyLoad(ref _MaxWidthCurPage, "@MaxWidthCurPage");
- // the resolved pagestype item font size will be reduce in order to fit within the defined width
- private LazyLoad _FontShrinkAftLen; // F2021-066 & 070 (text len before shrinking font)
- public int? FontShrinkAftLen
- {
- get
- {
- return (LazyLoad(ref _FontShrinkAftLen, "@FontShrinkAftLen"));
- }
- }
+ // the resolved pagestype item font size will be reduce in order to fit within the defined width
+ private LazyLoad _FontShrinkAftLen; // F2021-066 & 070 (text len before shrinking font)
+ public int? FontShrinkAftLen => LazyLoad(ref _FontShrinkAftLen, "@FontShrinkAftLen");
- // used in Alarm Point Table page style values with FontShrinkAftLen set, will display this message if the text cannot be shrunk enough (and be readable) to fit within the defined width
- private LazyLoad _FontTooSmallMsg; // F2021-066 message if can't shrink enough
- public string FontTooSmallMsg
- {
- get
- {
- return LazyLoad(ref _FontTooSmallMsg, "@FontTooSmallMsg");
- }
- }
+ // used in Alarm Point Table page style values with FontShrinkAftLen set, will display this message if the text cannot be shrunk enough (and be readable) to fit within the defined width
+ private LazyLoad _FontTooSmallMsg; // F2021-066 message if can't shrink enough
+ public string FontTooSmallMsg => LazyLoad(ref _FontTooSmallMsg, "@FontTooSmallMsg");
- // F2023-039 allow to select text color of a pagelist line
- // sets a text color for the page style Item
- private LazyLoad _TextColor;
- public string TextColor
- {
- get
- {
- return LazyLoad(ref _TextColor, "@TextColor");
- }
- }
+ // F2023-039 allow to select text color of a pagelist line
+ // sets a text color for the page style Item
+ private LazyLoad _TextColor;
+ public string TextColor => LazyLoad(ref _TextColor, "@TextColor");
- // set to a string, will remove the matching string from the end
- // F2023-112 Vogtle Units 3 & Backgrounds - trim the ending "-B" from the procedure number (used in title box of page header)
- private LazyLoad _TrimEnding;
- public string TrimEnding
- {
- get
- {
- return LazyLoad(ref _TrimEnding, "@TrimEnding");
- }
- }
- // C2025-033 to specify to print pagestyle item for a specific Child procedure
- private LazyLoad _ChildNum;
- public int? ChildNum
- {
- get
- {
- return (LazyLoad(ref _ChildNum, "@ChildNum"));
- }
- }
+ // set to a string, will remove the matching string from the end
+ // F2023-112 Vogtle Units 3 & Backgrounds - trim the ending "-B" from the procedure number (used in title box of page header)
+ private LazyLoad _TrimEnding;
+ public string TrimEnding => LazyLoad(ref _TrimEnding, "@TrimEnding");
+ // C2025-033 to specify to print pagestyle item for a specific Child procedure
+ private LazyLoad _ChildNum;
+ public int? ChildNum => LazyLoad(ref _ChildNum, "@ChildNum");
- #endregion
- #region Override ToString
- public override string ToString()
- {
- //return string.Format("({0:D5},{1:D5}) - {2}",Row,Col,Token);
- return Token;
- }
- public override string GetPDDisplayName()
- { return string.Format("({0},{1})",Row,Col); }
- #endregion
- }
+ #endregion
+ #region Override ToString
+ public override string ToString() => Token;
+ public override string GetPDDisplayName() => string.Format("({0},{1})", Row, Col);
+ #endregion
+ }
#endregion
#region RelatedItem
// RelatedItem was added to allow a PSI logical to have an associated PSI item, and if both are
@@ -281,53 +156,29 @@ namespace VEPROMS.CSLA.Library
// the name of the PSI logical token to check
private LazyLoad _Token;
- [Category("RelatedContent")]
- [DisplayName("RelatedContent")]
- [Description("Item RelatedContent")]
- public string Token
- {
- get
- {
- return LazyLoad(ref _Token, "@Token");
- }
- }
+ [Category("RelatedContent")]
+ [DisplayName("RelatedContent")]
+ [Description("Item RelatedContent")]
+ public string Token => LazyLoad(ref _Token, "@Token");
- // new Row value to use for PageStyle Item
- private LazyLoad _Row;
- [Category("Location")]
- [DisplayName("Vertical Position")]
- [Description("Vertical Position")]
- public float? Row
- {
- get
- {
- return LazyLoad(ref _Row, "@Row");
- }
- }
+ // new Row value to use for PageStyle Item
+ private LazyLoad _Row;
+ [Category("Location")]
+ [DisplayName("Vertical Position")]
+ [Description("Vertical Position")]
+ public float? Row => LazyLoad(ref _Row, "@Row");
- // new Col value to use for PageStyle Item
- private LazyLoad _Col;
- [Category("Location")]
- [DisplayName("Horizontal Position")]
- [Description("Horizontal Position")]
- public float? Col
- {
- get
- {
- return LazyLoad(ref _Col, "@Col");
- }
- }
+ // new Col value to use for PageStyle Item
+ private LazyLoad _Col;
+ [Category("Location")]
+ [DisplayName("Horizontal Position")]
+ [Description("Horizontal Position")]
+ public float? Col => LazyLoad(ref _Col, "@Col");
- // new Justify value to use for PageStyle Item
- private LazyLoad _Justify;
- public E_Justify? Justify
- {
- get
- {
- return LazyLoad(ref _Justify, "@Justify");
- }
- }
- #endregion
- }
+ // new Justify value to use for PageStyle Item
+ private LazyLoad _Justify;
+ public E_Justify? Justify => LazyLoad(ref _Justify, "@Justify");
+ #endregion
+ }
#endregion
}
diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs
index 36631cf5..28704379 100644
--- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs
+++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Text;
using System.Xml;
using System.ComponentModel;
using System.Drawing;
@@ -11,9 +10,10 @@ namespace VEPROMS.CSLA.Library
[TypeConverter(typeof(ExpandableObjectConverter))]
public class PlantFormat
{
- public PlantFormat(IFormatOrFormatInfo format, string config)
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Keeping config for future use / Debugging")]
+ public PlantFormat(IFormatOrFormatInfo format, string config)
{
- _MyFormat = format;
+ MyFormat = format;
string str = null;
if (format is Format) str = (format as Format).Config;
else if (format is FormatInfo) str = (format as FormatInfo).Config;
@@ -26,26 +26,21 @@ namespace VEPROMS.CSLA.Library
{
if (_FormatConfig == null)
{
- _FormatConfig = GetFormatConfig(_MyFormat);
+ _FormatConfig = GetFormatConfig(MyFormat);
}
return _FormatConfig;
}
set { _FormatConfig = value; }
}
- #region User Control of Format (UCF)
- // User Control of Format allows a PROMS user to make modifications to a very limited set of format settings
- // Variables in this region are not set in the format files. They are used only in the C# code
+ #region User Control of Format (UCF)
+ // User Control of Format allows a PROMS user to make modifications to a very limited set of format settings
+ // Variables in this region are not set in the format files. They are used only in the C# code
- // when IgnoreUCF is true, get the original data, i.e.don't apply any UCF changes to it
- private static bool _IgnoreUCF = true; // turn off reading in UCF values when getting format information
- public static bool IgnoreUCF
- {
- get { return PlantFormat._IgnoreUCF; }
- set { PlantFormat._IgnoreUCF = value; }
- }
+ // when IgnoreUCF is true, get the original data, i.e.don't apply any UCF changes to it
+ public static bool IgnoreUCF { get; set; } = true;
- #endregion //User Control of Format (UCF)
- public static FormatConfig GetFormatConfig(IFormatOrFormatInfo format)
+ #endregion //User Control of Format (UCF)
+ public static FormatConfig GetFormatConfig(IFormatOrFormatInfo format)
{
FormatConfig fc = null;
string str = null;
@@ -54,19 +49,15 @@ namespace VEPROMS.CSLA.Library
if (str != null && str != "") fc = FormatConfig.Get(str);
return fc;
}
- private IFormatOrFormatInfo _MyFormat;
- public IFormatOrFormatInfo MyFormat
- {
- get { return _MyFormat; }
- set { _MyFormat = value; }
- }
- private vlnFormatDocument _XmlDoc;
+
+ public IFormatOrFormatInfo MyFormat { get; set; }
+ private vlnFormatDocument _XmlDoc;
internal vlnFormatDocument XmlDoc
{
get
{
if (_XmlDoc == null)
- _XmlDoc = new vlnFormatDocument(_MyFormat);
+ _XmlDoc = new vlnFormatDocument(MyFormat);
return _XmlDoc;
}
}
@@ -132,10 +123,10 @@ namespace VEPROMS.CSLA.Library
public class VE_Font : vlnFormatItem
{
public VE_Font(XmlNode xmlNode) : base(xmlNode) { }
- private string _ffam = null;
- private int _fsize = 0;
- private E_Style _fstyle = E_Style.None;
- private float _fcpi = 0;
+ private readonly string _ffam = null;
+ private readonly int _fsize = 0;
+ private readonly E_Style _fstyle = E_Style.None;
+ private readonly float _fcpi = 0;
public VE_Font(string family, int size, E_Style style, float CPI)
{
_Family = new LazyLoad(family);
@@ -148,7 +139,8 @@ namespace VEPROMS.CSLA.Library
_fcpi = CPI;
}
private LazyLoad _Family;
- private static Dictionary _WinFontLookup = new Dictionary();
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0044:Add readonly modifier", Justification = "Keeping Collections Not ReadOnly")]
+ private static Dictionary _WinFontLookup = new Dictionary();
// put the fonts in a dictionary so that we don't call new Font each time we reference it
private static Font GetFont(string family, float size, FontStyle style)
{
@@ -157,34 +149,21 @@ namespace VEPROMS.CSLA.Library
_WinFontLookup.Add(key, new Font(family, size, style));
return _WinFontLookup[key];
}
- // part of bug B2017-117 and for conservation of window handles to reduce the frequency of
- // the Out of Window Handles error when editing and printing.
- // we are now using a common dictionary for font usages
- public static Font GetWinSysFont(string family, float size, FontStyle style)
- {
- return GetFont(family, size, style);
- }
- public static Font GetWinSysFont(string family, float size)
- {
- return GetFont(family, size, FontStyle.Regular);
- }
- public static Font GetWinSysFont(FontFamily ffamily, float size, FontStyle style)
- {
- return GetFont(ffamily.Name, size, style);
- }
- public static Font GetWinSysFont(Font font, FontStyle style)
- {
- return GetFont(font.Name, font.Size, style);
- }
+ // part of bug B2017-117 and for conservation of window handles to reduce the frequency of
+ // the Out of Window Handles error when editing and printing.
+ // we are now using a common dictionary for font usages
+ public static Font GetWinSysFont(string family, float size, FontStyle style) => GetFont(family, size, style);
+ public static Font GetWinSysFont(string family, float size) => GetFont(family, size, FontStyle.Regular);
+ public static Font GetWinSysFont(FontFamily ffamily, float size, FontStyle style) => GetFont(ffamily.Name, size, style);
+ public static Font GetWinSysFont(Font font, FontStyle style) => GetFont(font.Name, font.Size, style);
- private Font _WindowsFont;
+ private Font _WindowsFont;
public Font WindowsFont
{
get
{
if (_WindowsFont == null)
{
- //FontStyle style = (Family == "Cornet")?FontStyle.Italic : FontStyle.Regular;
FontStyle style = FontStyle.Regular;
if (Style != E_Style.None)
{
@@ -200,10 +179,7 @@ namespace VEPROMS.CSLA.Library
_WindowsFont = GetFont("Arial", 10, FontStyle.Regular);
else
{
- //if (_ffam != null)
- // _WindowsFont = GetFont(_ffam, (float)_fsize, style); // this needs work.
- //else
- _WindowsFont = GetFont(Family, Size == 0 ? 10 : (float)Size, style);
+ _WindowsFont = GetFont(Family, Size == 0 ? 10 : (float)Size, style);
}
}
return _WindowsFont;
@@ -213,61 +189,19 @@ namespace VEPROMS.CSLA.Library
_WindowsFont = value;
}
}
- [Description("Font Family")]
- public string Family
- {
- get
- {
- return LazyLoad(ref _Family,"Font/@Family");
- }
- }
- private LazyLoad _Size;
- [Description("Font Size (in Double Points)")]
- public int? Size
- {
- get
- {
- return LazyLoad(ref _Size, "Font/@Size");
- }
- }
- private LazyLoad _Style;
- public E_Style? Style
- {
- get
- {
- return LazyLoad(ref _Style, "Font/@Style");
- }
- //set
- //{
- // _Style.Value = value;
- //}
- }
- private LazyLoad _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);
- }
- public bool FontIsProportional()
- {
- if (Family.Contains("Arial") || Family.Contains("Times New Roman")) return true;
- return false;
- }
- }
+ [Description("Font Family")]
+ public string Family => LazyLoad(ref _Family, "Font/@Family");
+ private LazyLoad _Size;
+ [Description("Font Size (in Double Points)")]
+ public int? Size => LazyLoad(ref _Size, "Font/@Size");
+ private LazyLoad _Style;
+ public E_Style? Style => LazyLoad(ref _Style, "Font/@Style");
+ private LazyLoad _CPI;
+ public float? CPI => LazyLoad(ref _CPI, "Font/@CPI");
+ public float CharsToTwips => 72 / (CPI ?? 12);
+ public override string ToString() => string.Format("{0}, {1} pt, {2}", Family, Size, Style);
+ public bool FontIsProportional() => Family.Contains("Arial") || Family.Contains("Times New Roman");
+ }
#endregion
#region FormatData
[TypeConverter(typeof(ExpandableObjectConverter))]
@@ -276,67 +210,31 @@ namespace VEPROMS.CSLA.Library
public FormatData(XmlNode xmlNode) : base(xmlNode) { }
// Name of the format - as it appears when selecting the format to use in PROMS
private LazyLoad _Name;
- public string Name
- {
- get
- {
- return LazyLoad(ref _Name, "@Name");
- }
- }
- // When true, this format is allowed to be used in the PROMS Express product
- private LazyLoad _Express;
- public bool Express
- {
- get
- {
- return LazyLoad(ref _Express, "@Express");
- }
- }
- // When set to True, it enables the use of a Procedure Set Specific dialog, containing defined fields
- // in which the user enters data that is printed on all or specific pages for all of the procedures in the set using this format
- private LazyLoad _SpecificInfo;
- public bool SpecificInfo
- {
- get
- {
- return LazyLoad(ref _SpecificInfo, "@SpecificInfo");
- }
- }
- // this is a structure defined in the format file that defines labels and fields on a pop-up dialog
- // in which the user will enter data - this is accessible only at the procedure set level
- private SI _SI;
- public SI SI
- {
- get
- {
- return _SI == null ? _SI = new SI(SelectSingleNode("SI")) : _SI;
- }
- }
- // TPL represents Templates which are sizes of columns for 'table' type data. If the format
- // has the 'UseSmartTemplate' format flag, this table will have starting location & widths, and
- // other data for the listed step types. Data from this table overrides width data as specified
- // by the step type format data. The only active format that has 'UseSmartTemplate' is WCNCKL.
- // The TPL data is also used by other formats, many of which are using it for Enhanced Background
- // & Deviations. The actual format of the template can be in an old or new format. The old format
- // uses spaces as delimiters, the new uses commas.
- private LazyLoad _TPL;
- public string TPL
- {
- get
- {
- return LazyLoad(ref _TPL, "@TPL");
- }
- }
- // not defined in format files, we now use TPL to define both the original and new template
- // the C# determines if it's a smart (new) template or the old style (search for NewTemplateFormat to see the code)
- private bool _NewTemplateFormat;
- public bool NewTemplateFormat
- {
- get { return _NewTemplateFormat; }
- set { _NewTemplateFormat = value; }
- }
- // Creates a dictionary of the templates (TPL) defined in the format
- private Dictionary _TopTemplateTypes;
+ public string Name => LazyLoad(ref _Name, "@Name");
+ // When true, this format is allowed to be used in the PROMS Express product
+ private LazyLoad _Express;
+ public bool Express => LazyLoad(ref _Express, "@Express");
+ // When set to True, it enables the use of a Procedure Set Specific dialog, containing defined fields
+ // in which the user enters data that is printed on all or specific pages for all of the procedures in the set using this format
+ private LazyLoad _SpecificInfo;
+ public bool SpecificInfo => LazyLoad(ref _SpecificInfo, "@SpecificInfo");
+ // this is a structure defined in the format file that defines labels and fields on a pop-up dialog
+ // in which the user will enter data - this is accessible only at the procedure set level
+ private SI _SI;
+ public SI SI => _SI ?? (_SI = new SI(SelectSingleNode("SI")));
+ // TPL represents Templates which are sizes of columns for 'table' type data. If the format
+ // has the 'UseSmartTemplate' format flag, this table will have starting location & widths, and
+ // other data for the listed step types. Data from this table overrides width data as specified
+ // by the step type format data. The only active format that has 'UseSmartTemplate' is WCNCKL.
+ // The TPL data is also used by other formats, many of which are using it for Enhanced Background
+ // & Deviations. The actual format of the template can be in an old or new format. The old format
+ // uses spaces as delimiters, the new uses commas.
+ private LazyLoad _TPL;
+ public string TPL => LazyLoad(ref _TPL, "@TPL");
+
+ public bool NewTemplateFormat { get; set; }
+ // Creates a dictionary of the templates (TPL) defined in the format
+ private Dictionary _TopTemplateTypes;
public Dictionary TopTemplateTypes
{
get
@@ -387,64 +285,63 @@ namespace VEPROMS.CSLA.Library
int cnt = 0;
int tmpStrIndxStart = 0;
- int tmpStrIndxEnd = 0;
- while (cnt < NumTemplates)
+ while (cnt < NumTemplates)
{
- tmpStrIndxEnd = TPL.IndexOf("\n", tmpStrIndxStart);
- if (tmpStrIndxEnd < 0)
+ int tmpStrIndxEnd = TPL.IndexOf("\n", tmpStrIndxStart);
+ if (tmpStrIndxEnd < 0)
{
cnt++;
continue; // maybe extra newlines at end of string.
}
string tpl = TPL.Substring(tmpStrIndxStart, tmpStrIndxEnd-tmpStrIndxStart);
tmpStrIndxStart = tmpStrIndxEnd + 1;
- int level = 0;
- int type = 0;
- int start = 0;
- int width = 0;
+ int start = 0;
+ int width = 0;
short nocol = 0;
int row = 0;
- string stmp = null;
- if (!NewTemplateFormat) // not the smart template
- {
- string[] tmpOld = tpl.Split(" ".ToCharArray());
- level = Convert.ToInt32(tmpOld[0]);
- type = Convert.ToInt32(tmpOld[1]);
- if (tmpOld.Length <= 2)
- stmp = null;
- else if (tmpOld.Length > 3)
- {
- // Wolf Creek and Turkey Point Background formats have spaces as part of the text in the 3rd field,
- // handle this special case
- int indxx = tpl.IndexOf(" "); //skip past "level"
- if (indxx < 0) stmp = null; // template incomplete set text to a null
- else
- {
- indxx = tpl.IndexOf(" ", indxx + 1); //skip past "type"
- stmp = (indxx > -1) ? tpl.Substring(indxx+1) : null; //if valid index grab text after "type" (+1 skips past the space char after the "type" number)
- }
- }
- else
- stmp = tmpOld[2];
- }
- else
- {
- string[] tmpNew = tpl.Split(",".ToCharArray());
- if (tmpNew.Length < 5)
- {
- cnt++;
- continue; // may be extra newlines at end of string
- }
- level = Convert.ToInt32(tmpNew[0]);
- type = Convert.ToInt32(tmpNew[1]);
- start = Convert.ToInt32(tmpNew[2]);
- width = Convert.ToInt32(tmpNew[3]);
- row = Convert.ToInt32(tmpNew[4]);
- nocol = Convert.ToInt16(tmpNew[5]);
- stmp = tmpNew.Length <= 6 ? null : tmpNew[6];
- }
- // some plants (Wolf Creek, Turkey Point) have two line titles in their templates with "[(0014])" representing the hard return in the title
- if (stmp != null)
+ int level;
+ int type;
+ string stmp;
+ if (!NewTemplateFormat) // not the smart template
+ {
+ string[] tmpOld = tpl.Split(" ".ToCharArray());
+ level = Convert.ToInt32(tmpOld[0]);
+ type = Convert.ToInt32(tmpOld[1]);
+ if (tmpOld.Length <= 2)
+ stmp = null;
+ else if (tmpOld.Length > 3)
+ {
+ // Wolf Creek and Turkey Point Background formats have spaces as part of the text in the 3rd field,
+ // handle this special case
+ int indxx = tpl.IndexOf(" "); //skip past "level"
+ if (indxx < 0) stmp = null; // template incomplete set text to a null
+ else
+ {
+ indxx = tpl.IndexOf(" ", indxx + 1); //skip past "type"
+ stmp = (indxx > -1) ? tpl.Substring(indxx + 1) : null; //if valid index grab text after "type" (+1 skips past the space char after the "type" number)
+ }
+ }
+ else
+ stmp = tmpOld[2];
+ }
+ else
+ {
+ string[] tmpNew = tpl.Split(",".ToCharArray());
+ if (tmpNew.Length < 5)
+ {
+ cnt++;
+ continue; // may be extra newlines at end of string
+ }
+ level = Convert.ToInt32(tmpNew[0]);
+ type = Convert.ToInt32(tmpNew[1]);
+ start = Convert.ToInt32(tmpNew[2]);
+ width = Convert.ToInt32(tmpNew[3]);
+ row = Convert.ToInt32(tmpNew[4]);
+ nocol = Convert.ToInt16(tmpNew[5]);
+ stmp = tmpNew.Length <= 6 ? null : tmpNew[6];
+ }
+ // some plants (Wolf Creek, Turkey Point) have two line titles in their templates with "[(0014])" representing the hard return in the title
+ if (stmp != null)
{
stmp = stmp.Replace("[(0014])", "\\line "); // Hard Return
stmp = stmp.Replace("\xFFFD", @"\u160?"); // Hard Space B2018-052 replace old(from 16-bit) hardspace character with the unicode hardspace character
@@ -462,49 +359,26 @@ namespace VEPROMS.CSLA.Library
// where we check which bits of the integer is set to determine if that option can be used.
// See E_PurchaseOptions in ENums.cs for a description of each option flag (bit)
private LazyLoad _PurchaseOptions;
- public E_PurchaseOptions? PurchaseOptions
- {
- get
- {
- return LazyLoad(ref _PurchaseOptions, "@PurchaseOptions");
- }
- }
- // Set at the top of the format(under FormatData) defined the default font used in this format.
- // Specific step types can have different font information assigned to override this default
- private VE_Font _Font;
- public VE_Font Font
- {
- get
- {
- return _Font == null? _Font = new VE_Font(base.XmlNode): _Font;
- }
- }
+ public E_PurchaseOptions? PurchaseOptions => LazyLoad(ref _PurchaseOptions, "@PurchaseOptions");
+ // Set at the top of the format(under FormatData) defined the default font used in this format.
+ // Specific step types can have different font information assigned to override this default
+ private VE_Font _Font;
+ public VE_Font Font => _Font ?? (_Font = new VE_Font(XmlNode));
- // Defines the printed page size (ex: US Letter, A4)
- private PDFPageSize _PDFPageSize;
- public PDFPageSize PDFPageSize // C2020-002 paper size is now set in the format files
- {
- get
- {
- return _PDFPageSize == null ? _PDFPageSize = new PDFPageSize(SelectSingleNode("PDFPageSize")) : _PDFPageSize;
- }
- }
- //C2021-005 Format file grouping containing a list of possible font sizes (used only for table text via the Table Ribbon)
- private FontSizes _FontSizes;
- public FontSizes FontSizes
- {
- get
- {
- return _FontSizes == null ? _FontSizes = new FontSizes(SelectSingleNode("FontSizes")) : _FontSizes;
- }
- }
- // C2021-004 This gets the list for additional Table Cell shading options defined in the format (base) file
- private ShadingOptionList _ShadingOptionList;
+ // Defines the printed page size (ex: US Letter, A4)
+ private PDFPageSize _PDFPageSize;
+ // C2020-002 paper size is now set in the format files
+ public PDFPageSize PDFPageSize => _PDFPageSize ?? (_PDFPageSize = new PDFPageSize(SelectSingleNode("PDFPageSize")));
+ //C2021-005 Format file grouping containing a list of possible font sizes (used only for table text via the Table Ribbon)
+ private FontSizes _FontSizes;
+ public FontSizes FontSizes => _FontSizes ?? (_FontSizes = new FontSizes(SelectSingleNode("FontSizes")));
+ // C2021-004 This gets the list for additional Table Cell shading options defined in the format (base) file
+ private ShadingOptionList _ShadingOptionList;
public ShadingOptionList ShadingOptionList
{
get
{
- return (_ShadingOptionList == null) ? _ShadingOptionList = new ShadingOptionList(SelectNodes("MoreShadingOptions/ShadingOption")) : _ShadingOptionList;
+ return _ShadingOptionList ?? (_ShadingOptionList = new ShadingOptionList(SelectNodes("MoreShadingOptions/ShadingOption")));
}
set { _ShadingOptionList = value; }
}
@@ -514,7 +388,7 @@ namespace VEPROMS.CSLA.Library
{
get
{
- return (_UnitWatermarkList == null) ? _UnitWatermarkList = new UnitWatermarkList(SelectNodes("UnitWatermarkData/UnitWatermark")) : _UnitWatermarkList;
+ return _UnitWatermarkList ?? (_UnitWatermarkList = new UnitWatermarkList(SelectNodes("UnitWatermarkData/UnitWatermark")));
}
set { _UnitWatermarkList = value; }
}
@@ -525,81 +399,45 @@ namespace VEPROMS.CSLA.Library
{
get
{
- return (_SymbolList == null) ? _SymbolList = new SymbolList(SelectNodes("Symbols/Symbol")) : _SymbolList;
+ return _SymbolList ?? (_SymbolList = new SymbolList(SelectNodes("Symbols/Symbol")));
}
set { _SymbolList = value; }
}
// gets the high level node that contains setting used in the procedure step editor
private EditData _EditData;
- public EditData EditData
- {
- get
- {
- return _EditData == null ? _EditData = new EditData(SelectSingleNode("EditData")): _EditData;
- }
- }
- // gets the high level node that contains settings used to generate PDFs (print)
- private PrintData _PrintData;
- public PrintData PrintData
- {
- get
- {
- return _PrintData == null? _PrintData = new PrintData(SelectSingleNode("PrintData")):_PrintData;
- }
- }
- // get high level node containing settings used for both edit and print
- private ProcData _ProcData;
- public ProcData ProcData
- {
- get
- {
- return _ProcData == null? _ProcData = new ProcData(SelectSingleNode("ProcData")):_ProcData;
- }
- }
- // get high level node containing settings pertraining to sections of a procedure
- private SectData _SectData;
- public SectData SectData
- {
- get
- {
- return _SectData == null? _SectData = new SectData(SelectSingleNode("SectData")):_SectData;
- }
- }
- // get a list of box formatting information primarily used for Cautions, Notes, and Warnings.
- private BoxList _BoxList;
+ public EditData EditData => _EditData ?? (_EditData = new EditData(SelectSingleNode("EditData")));
+ // gets the high level node that contains settings used to generate PDFs (print)
+ private PrintData _PrintData;
+ public PrintData PrintData => _PrintData ?? (_PrintData = new PrintData(SelectSingleNode("PrintData")));
+ // get high level node containing settings used for both edit and print
+ private ProcData _ProcData;
+ public ProcData ProcData => _ProcData ?? (_ProcData = new ProcData(SelectSingleNode("ProcData")));
+ // get high level node containing settings pertraining to sections of a procedure
+ private SectData _SectData;
+ public SectData SectData => _SectData ?? (_SectData = new SectData(SelectSingleNode("SectData")));
+ // get a list of box formatting information primarily used for Cautions, Notes, and Warnings.
+ private BoxList _BoxList;
public BoxList BoxList
{
get
{
- return _BoxList == null? _BoxList = new BoxList(SelectNodes("BoxData/Box"),MyFormat):_BoxList;
+ return _BoxList ?? (_BoxList = new BoxList(SelectNodes("BoxData/Box"), MyFormat));
}
set { _BoxList = value; }
}
// gets a list of trainsition formatting information for various types of transitions
private TransData _TransData;
- public TransData TransData
- {
- get
- {
- return _TransData == null? _TransData = new TransData(SelectSingleNode("TransData")):_TransData;
- }
- }
- // get format settings related to handling Referenced Object values
- private ROData _ROData;
- public ROData ROData
- {
- get
- {
- return _ROData == null ? _ROData = new ROData(SelectSingleNode("ROData")) : _ROData;
- }
- }
- // gets a list containing all of the defined step types and step parts (high level, sub-steps, cations, notes, etc)
- private StepDataList _StepDataList;
+ public TransData TransData => _TransData ?? (_TransData = new TransData(SelectSingleNode("TransData")));
+ // get format settings related to handling Referenced Object values
+ private ROData _ROData;
+ public ROData ROData => _ROData ?? (_ROData = new ROData(SelectSingleNode("ROData")));
+ // gets a list containing all of the defined step types and step parts (high level, sub-steps, cations, notes, etc)
+ private StepDataList _StepDataList;
public StepDataList StepDataList
{
get
{
- return _StepDataList == null? _StepDataList = new StepDataList(SelectNodes("StepData/Step"),MyFormat):_StepDataList;
+ return _StepDataList ?? (_StepDataList = new StepDataList(SelectNodes("StepData/Step"), MyFormat));
}
set { _StepDataList = value; }
}
@@ -649,8 +487,10 @@ namespace VEPROMS.CSLA.Library
while (top.ParentType != "Base")
{
bool foundit = false;
- string sParStp = StepDataList[formatStepType].ParentType;
- foreach (StepData stp in StepDataList)
+#pragma warning disable IDE0059 // Unnecessary assignment of a value - Keeping for Debugging
+ string sParStp = StepDataList[formatStepType].ParentType;
+#pragma warning restore IDE0059 // Unnecessary assignment of a value
+ foreach (StepData stp in StepDataList)
{
if (top.ParentType == stp.Type)
{
@@ -865,14 +705,8 @@ namespace VEPROMS.CSLA.Library
// Defines the printed page size (ex: US Letter, A4)
private LazyLoad _PaperSize;
- public string PaperSize
- {
- get
- {
- return LazyLoad(ref _PaperSize, "@PaperSize"); // C2020-002 paper size is now set in the format files
- }
- }
- }
+ public string PaperSize => LazyLoad(ref _PaperSize, "@PaperSize"); // C2020-002 paper size is now set in the format files
+ }
#endregion
#region FontSizes
// C2021-005 the list of possible font sizes are set in the format files
@@ -881,14 +715,8 @@ namespace VEPROMS.CSLA.Library
{
public FontSizes(XmlNode xmlNode) : base(xmlNode) { }
private LazyLoad _TableFontSizes;
- public string TableFontSizes
- {
- get
- {
- return LazyLoad(ref _TableFontSizes, "@TableFontSizes"); // C2021-005 list of possible font sizes for table text
- }
- }
- }
+ public string TableFontSizes => LazyLoad(ref _TableFontSizes, "@TableFontSizes"); // C2021-005 list of possible font sizes for table text
+ }
#endregion
#region ShadingOptions
// C2021-004 Additional shading color options defined in the format file
@@ -904,64 +732,25 @@ namespace VEPROMS.CSLA.Library
public ShadingOption() : base() { }
[Category("Ints")]
private LazyLoad _Alpha;
- public int? Alpha
- {
- get
- {
- return LazyLoad(ref _Alpha, "@A");
- }
- }
- [Category("Ints")]
+ public int? Alpha => LazyLoad(ref _Alpha, "@A");
+ [Category("Ints")]
private LazyLoad _Red;
- public int? Red
- {
- get
- {
- return LazyLoad(ref _Red, "@R");
- }
- }
- [Category("Ints")]
+ public int? Red => LazyLoad(ref _Red, "@R");
+ [Category("Ints")]
private LazyLoad _Green;
- public int? Green
- {
- get
- {
- return LazyLoad(ref _Green, "@G");
- }
- }
- [Category("Ints")]
+ public int? Green => LazyLoad(ref _Green, "@G");
+ [Category("Ints")]
private LazyLoad _Blue;
- public int? Blue
- {
- get
- {
- return LazyLoad(ref _Blue, "@B");
- }
- }
- [Category("Strings")]
+ public int? Blue => LazyLoad(ref _Blue, "@B");
+ [Category("Strings")]
private LazyLoad _Desc;
- public string Desc
- {
- get
- {
- return LazyLoad(ref _Desc, "@Desc");
- }
- }
- public override string GetPDDisplayName()
- { return Desc; }
- public override string GetPDDescription()
- { return string.Format("Shading Description '{0}' Alpha {1} Red {2} Green {3} Blue {4}", Desc, Alpha, Red, Green, Blue); }
- public override string GetPDCategory()
- { return "Additional Shading Options"; }
- public override string ToString()
- {
- return Desc;
- }
- public string GetARBGstringForTableCells()
- {
- return string.Format("[A={0}, R={1}, G={2}, B={3}]", Alpha, Red, Green, Blue);
- }
- }
+ public string Desc => LazyLoad(ref _Desc, "@Desc");
+ public override string GetPDDisplayName() => Desc;
+ public override string GetPDDescription() => string.Format("Shading Description '{0}' Alpha {1} Red {2} Green {3} Blue {4}", Desc, Alpha, Red, Green, Blue);
+ public override string GetPDCategory() => "Additional Shading Options";
+ public override string ToString() => Desc;
+ public string GetARBGstringForTableCells() => string.Format("[A={0}, R={1}, G={2}, B={3}]", Alpha, Red, Green, Blue);
+ }
[TypeConverter(typeof(vlnListConverter))]
public class ShadingOptionList : vlnFormatList
{
@@ -995,32 +784,15 @@ namespace VEPROMS.CSLA.Library
public UnitWatermark() : base() { }
[Category("Strings")]
private LazyLoad _ProcNumPrefix;
- public string ProcNumPrefix // based on the what the procedure number starts with, usually a resolved unit toke (ex: )
- {
- get
- {
- return LazyLoad(ref _ProcNumPrefix, "@ProcNumPrefix");
- }
- }
- [Category("Strings")]
+ // based on the what the procedure number starts with, usually a resolved unit toke (ex: )
+ public string ProcNumPrefix => LazyLoad(ref _ProcNumPrefix, "@ProcNumPrefix");
+ [Category("Strings")]
private LazyLoad _WMText;
- public string WMText
- {
- get
- {
- return LazyLoad(ref _WMText, "@WMText");
- }
- }
- [Category("Strings")]
+ public string WMText => LazyLoad(ref _WMText, "@WMText");
+ [Category("Strings")]
private LazyLoad _WMColor;
- public string WMColor
- {
- get
- {
- return LazyLoad(ref _WMColor, "@WMColor");
- }
- }
- }
+ public string WMColor => LazyLoad(ref _WMColor, "@WMColor");
+ }
[TypeConverter(typeof(vlnListConverter))]
public class UnitWatermarkList : vlnFormatList
{
@@ -1035,33 +807,15 @@ namespace VEPROMS.CSLA.Library
public Symbol() : base() { }
[Category("Ints")]
private LazyLoad _Unicode;
- public int? Unicode
- {
- get
- {
- return LazyLoad(ref _Unicode, "@Unicode");
- }
- }
- [Category("Strings")]
+ public int? Unicode => LazyLoad(ref _Unicode, "@Unicode");
+ [Category("Strings")]
private LazyLoad _Desc;
- public string Desc
- {
- get
- {
- return LazyLoad(ref _Desc, "@Desc");
- }
- }
- public override string GetPDDisplayName()
- { return Desc; }
- public override string GetPDDescription()
- { return string.Format("Symbol Unicode '{0}' Description '{1}'", Unicode, Desc); }
- public override string GetPDCategory()
- { return "Supported Symbols"; }
- public override string ToString()
- {
- return Desc;
- }
- }
+ public string Desc => LazyLoad(ref _Desc, "@Desc");
+ public override string GetPDDisplayName() => Desc;
+ public override string GetPDDescription() => string.Format("Symbol Unicode '{0}' Description '{1}'", Unicode, Desc);
+ public override string GetPDCategory() => "Supported Symbols";
+ public override string ToString() => Desc;
+ }
[TypeConverter(typeof(vlnListConverter))]
public class SymbolList : vlnFormatList
{
@@ -1096,7 +850,6 @@ namespace VEPROMS.CSLA.Library
nocolm = c;
hmacro = 0x00F0 & nocolm >> 4;
if (hmacro > 0) hmacro = 4; // bge - this was in 16bit code
- int blines = (0x0F00 & nocolm) >> 8;
boxed = ((0xF000 & nocolm) >> 12) != 0;
nocolm = (short)(0x000F & nocolm);
text = x;
@@ -1112,14 +865,8 @@ namespace VEPROMS.CSLA.Library
// - No change bars will be added
// - existing change bars will remain
private LazyLoad _EditoralSpellCheck;
- public bool EditoralSpellCheck
- {
- get
- {
- return LazyLoad(ref _EditoralSpellCheck, "@EditoralSpellCheck");
- }
- }
- }
+ public bool EditoralSpellCheck => LazyLoad(ref _EditoralSpellCheck, "@EditoralSpellCheck");
+ }
#endregion
#region PrintDataAll
#region PrintData
@@ -1131,294 +878,132 @@ namespace VEPROMS.CSLA.Library
// List of procedure descriptions (ProcDescr) inwhich we match the beginning of a procedure number
// in order to print procedure description text via a pagelist token
private ProcDescrList _ProcDescrList;
- public ProcDescrList ProcDescrList
- {
- get
- {
- return _ProcDescrList == null? _ProcDescrList = new ProcDescrList(SelectNodes("ProcDescrList/ProcDescr")):_ProcDescrList;
- }
- }
+ public ProcDescrList ProcDescrList => _ProcDescrList ?? (_ProcDescrList = new ProcDescrList(SelectNodes("ProcDescrList/ProcDescr")));
- // an offset value for the placement of step tabs used in a Supplemental Information section of SAMG procedures
- // to allow space for a Note or Caution tab.
- private LazyLoad _SupInfoTabOff;
- public int? SupInfoTabOff
- {
- get
- {
- return LazyLoad(ref _SupInfoTabOff, "@SupInfoTabOff");
- }
- }
+ // an offset value for the placement of step tabs used in a Supplemental Information section of SAMG procedures
+ // to allow space for a Note or Caution tab.
+ private LazyLoad _SupInfoTabOff;
+ public int? SupInfoTabOff => LazyLoad(ref _SupInfoTabOff, "@SupInfoTabOff");
- // Flag to determin if the parent tab is used as the first part of a supplemental info step/sub-step tab.
- private LazyLoad _SupInfoIncludeParTab;
- public bool SupInfoIncludeParTab
- {
- get
- {
- return LazyLoad(ref _SupInfoIncludeParTab, "@SupInfoIncludeParTab");
- }
- }
+ // Flag to determin if the parent tab is used as the first part of a supplemental info step/sub-step tab.
+ private LazyLoad _SupInfoIncludeParTab;
+ public bool SupInfoIncludeParTab => LazyLoad(ref _SupInfoIncludeParTab, "@SupInfoIncludeParTab");
- // Shift the hoizontal positon of a step by 12 if the supplemental Info step tab was going to print over step text
- private LazyLoad _SupInfoAdjustXOffForLongTab;
- public bool SupInfoAdjustXOffForLongTab
- {
- get
- {
- return LazyLoad(ref _SupInfoAdjustXOffForLongTab, "@SupInfoAdjustXOffForLongTab");
- }
- }
+ // Shift the hoizontal positon of a step by 12 if the supplemental Info step tab was going to print over step text
+ private LazyLoad _SupInfoAdjustXOffForLongTab;
+ public bool SupInfoAdjustXOffForLongTab => LazyLoad(ref _SupInfoAdjustXOffForLongTab, "@SupInfoAdjustXOffForLongTab");
- // flag to allow user to enter the procedure revision number, either a forward or back slash,
- // then the revision date or revision text
- private LazyLoad _DoRevDate;
- public bool DoRevDate
- {
- get
- {
- return LazyLoad(ref _DoRevDate, "@DoRevDate");
- }
- }
+ // flag to allow user to enter the procedure revision number, either a forward or back slash,
+ // then the revision date or revision text
+ private LazyLoad _DoRevDate;
+ public bool DoRevDate => LazyLoad(ref _DoRevDate, "@DoRevDate");
- // Print alternate foldout pages within a defined range of procedure step pages.
- // You can have multiple Foldout Page sections within a procedure,
- // each pertaining to a range of steps (ranges cannot overlap) - used by Shearon Harris
- private LazyLoad _AlternateFloatingFoldout;
- public bool AlternateFloatingFoldout
- {
- get
- {
- return LazyLoad(ref _AlternateFloatingFoldout, "@AlternateFloatingFoldout");
- }
- }
+ // Print alternate foldout pages within a defined range of procedure step pages.
+ // You can have multiple Foldout Page sections within a procedure,
+ // each pertaining to a range of steps (ranges cannot overlap) - used by Shearon Harris
+ private LazyLoad _AlternateFloatingFoldout;
+ public bool AlternateFloatingFoldout => LazyLoad(ref _AlternateFloatingFoldout, "@AlternateFloatingFoldout");
- // Allows the user to identify a procedure section that is to be used as a foldout page
- // that is printed on the backside of procedure step pages
- private LazyLoad _SectionLevelFoldouts;
- public bool SectionLevelFoldouts
- {
- get
- {
- return LazyLoad(ref _SectionLevelFoldouts, "@SectionLevelFoldouts");
- }
- }
+ // Allows the user to identify a procedure section that is to be used as a foldout page
+ // that is printed on the backside of procedure step pages
+ private LazyLoad _SectionLevelFoldouts;
+ public bool SectionLevelFoldouts => LazyLoad(ref _SectionLevelFoldouts, "@SectionLevelFoldouts");
- // This will replace any forward or back slash character they may be in the procedures's PDF file name
- // with the character defined in the plant's format file
- private LazyLoad _SlashReplace;
- public string SlashReplace
- {
- get
- {
- return LazyLoad(ref _SlashReplace, "@SlashReplace");
- }
- }
+ // This will replace any forward or back slash character they may be in the procedures's PDF file name
+ // with the character defined in the plant's format file
+ private LazyLoad _SlashReplace;
+ public string SlashReplace => LazyLoad(ref _SlashReplace, "@SlashReplace");
- // Flag - (flag is named incorrectly) when set allows user to append to the procedure's revision number,
- // a backslash character followed by a revision date
- private LazyLoad _RevDateWithForwardSlash;
- public bool RevDateWithForwardSlash
- {
- get
- {
- return LazyLoad(ref _RevDateWithForwardSlash, "@RevDateWithForwardSlash");
- }
- }
+ // Flag - (flag is named incorrectly) when set allows user to append to the procedure's revision number,
+ // a backslash character followed by a revision date
+ private LazyLoad _RevDateWithForwardSlash;
+ public bool RevDateWithForwardSlash => LazyLoad(ref _RevDateWithForwardSlash, "@RevDateWithForwardSlash");
- // On the Working Draft Properties page, Turns on a text box for the user to enter in a unit number
- // that is used on cover pages and in the page header - D.C. Cook and Calvert Cliffs formats
- private LazyLoad _UnitNumber;
- public bool UnitNumber
- {
- get
- {
- return LazyLoad(ref _UnitNumber, "@UnitNumber");
- }
- }
+ // On the Working Draft Properties page, Turns on a text box for the user to enter in a unit number
+ // that is used on cover pages and in the page header - D.C. Cook and Calvert Cliffs formats
+ private LazyLoad _UnitNumber;
+ public bool UnitNumber => LazyLoad(ref _UnitNumber, "@UnitNumber");
- // Flag allow for using the UnitProcSetString transition defintion variable which will build
- // a prefix to the referenced procedure number
- // ex: UnitProcSetString ="{PSI:UNITCOM}-{SI:SETNAME}-{PSI:SETID|4023}-" will look for UNITCOM in
- // the Procedure Specific Information, then SETNAME in the Set Specific Information (working draft),
- // then the SETID in the Procedure Specific Information (or use 4023) if nothing is entered
- private LazyLoad _OutSideTransSetName; //B2019-072: For AEP, use PSI & SI for outside transition text
- public bool OutSideTransSetName
- {
- get
- {
- return LazyLoad(ref _OutSideTransSetName, "@OutSideTransSetName");
- }
- }
+ // Flag allow for using the UnitProcSetString transition defintion variable which will build
+ // a prefix to the referenced procedure number
+ // ex: UnitProcSetString ="{PSI:UNITCOM}-{SI:SETNAME}-{PSI:SETID|4023}-" will look for UNITCOM in
+ // the Procedure Specific Information, then SETNAME in the Set Specific Information (working draft),
+ // then the SETID in the Procedure Specific Information (or use 4023) if nothing is entered
+ private LazyLoad _OutSideTransSetName; //B2019-072: For AEP, use PSI & SI for outside transition text
+ public bool OutSideTransSetName => LazyLoad(ref _OutSideTransSetName, "@OutSideTransSetName");
- // For Calvert Cliffs, this allows for double letted step tabs, speical handling in Transitions,
- // special pagination logic for their style of procedures
- private LazyLoad _SpecialCaseCalvert;
- public bool SpecialCaseCalvert
- {
- get
- {
- return LazyLoad(ref _SpecialCaseCalvert, "@SpecialCaseCalvert");
- }
- }
+ // For Calvert Cliffs, this allows for double letted step tabs, speical handling in Transitions,
+ // special pagination logic for their style of procedures
+ private LazyLoad _SpecialCaseCalvert;
+ public bool SpecialCaseCalvert => LazyLoad(ref _SpecialCaseCalvert, "@SpecialCaseCalvert");
- // Calvert Alarms have the top part of the alarm point page in single column, the the bottom part in two column.
- // Also special processing of Note, Cautions and Warnings
- private LazyLoad _SpecialCaseCalvertAlarm;
- public bool SpecialCaseCalvertAlarm
- {
- get
- {
- return LazyLoad(ref _SpecialCaseCalvertAlarm, "@SpecialCaseCalvertAlarm");
- }
- }
+ // Calvert Alarms have the top part of the alarm point page in single column, the the bottom part in two column.
+ // Also special processing of Note, Cautions and Warnings
+ private LazyLoad _SpecialCaseCalvertAlarm;
+ public bool SpecialCaseCalvertAlarm => LazyLoad(ref _SpecialCaseCalvertAlarm, "@SpecialCaseCalvertAlarm");
- // Special pagination logic to handle out of the ordinary procedure formating and steps with RNOs
- // that go on for pages
- private LazyLoad _SpecialCaseCalvertPagination;
- public bool SpecialCaseCalvertPagination
- {
- get
- {
- return LazyLoad(ref _SpecialCaseCalvertPagination, "@SpecialCaseCalvertPagination");
- }
- }
+ // Special pagination logic to handle out of the ordinary procedure formating and steps with RNOs
+ // that go on for pages
+ private LazyLoad _SpecialCaseCalvertPagination;
+ public bool SpecialCaseCalvertPagination => LazyLoad(ref _SpecialCaseCalvertPagination, "@SpecialCaseCalvertPagination");
- // B2023-034 for use with Beaver Valley AOP format
- // This allows for the use of the UseOnFirst docstyle setting on a mixture of sections and sub-sections
- private LazyLoad _UseOnFirstForSeparatePaginationOnSubSect;
- public bool UseOnFirstForSeparatePaginationOnSubSect
- {
- get
- {
- return LazyLoad(ref _UseOnFirstForSeparatePaginationOnSubSect, "@UseOnFirstForSeparatePaginationOnSubSect");
- }
- }
+ // B2023-034 for use with Beaver Valley AOP format
+ // This allows for the use of the UseOnFirst docstyle setting on a mixture of sections and sub-sections
+ private LazyLoad _UseOnFirstForSeparatePaginationOnSubSect;
+ public bool UseOnFirstForSeparatePaginationOnSubSect => LazyLoad(ref _UseOnFirstForSeparatePaginationOnSubSect, "@UseOnFirstForSeparatePaginationOnSubSect");
- // B2023-043 for use with Beaver Valley AOP format - allow attributes, such as superscript on section titles
- // when printing
- private LazyLoad _SectionTitleWithAttributes;
- public bool SectionTitleWithAttributes
- {
- get
- {
- return LazyLoad(ref _SectionTitleWithAttributes, "@SectionTitleWithAttributes");
- }
- }
+ // B2023-043 for use with Beaver Valley AOP format - allow attributes, such as superscript on section titles
+ // when printing
+ private LazyLoad _SectionTitleWithAttributes;
+ public bool SectionTitleWithAttributes => LazyLoad(ref _SectionTitleWithAttributes, "@SectionTitleWithAttributes");
- // Format Flag enabling special formatting and printing of training materials - Wolf Creek Training format
- private LazyLoad _WCNTraining;
- public bool WCNTraining
- {
- get
- {
- return LazyLoad(ref _WCNTraining, "@WCNTraining");
- }
- }
+ // Format Flag enabling special formatting and printing of training materials - Wolf Creek Training format
+ private LazyLoad _WCNTraining;
+ public bool WCNTraining => LazyLoad(ref _WCNTraining, "@WCNTraining");
- // Only used in Calvert Cliffs Valve format - only supporting code checks to see
- // if a note should be a footnote
- private LazyLoad _HorizontalSubsteps;
- public bool HorizontalSubsteps
- {
- get
- {
- return LazyLoad(ref _HorizontalSubsteps, "@HorizontalSubsteps");
- }
- }
+ // Only used in Calvert Cliffs Valve format - only supporting code checks to see
+ // if a note should be a footnote
+ private LazyLoad _HorizontalSubsteps;
+ public bool HorizontalSubsteps => LazyLoad(ref _HorizontalSubsteps, "@HorizontalSubsteps");
- // Doesn't reset the paglist for the first sub-section when printing
- // - appears to be needed for plants with AP1000 procedures
- private LazyLoad _SpecialCaseWestinghouse;
- public bool SpecialCaseWestinghouse
- {
- get
- {
- return LazyLoad(ref _SpecialCaseWestinghouse, "@SpecialCaseWestinghouse");
- }
- }
+ // Doesn't reset the paglist for the first sub-section when printing
+ // - appears to be needed for plants with AP1000 procedures
+ private LazyLoad _SpecialCaseWestinghouse;
+ public bool SpecialCaseWestinghouse => LazyLoad(ref _SpecialCaseWestinghouse, "@SpecialCaseWestinghouse");
- // Put in for Comanche Peak to print "COMMON" for the unit number instead of "Unit 0"
- private LazyLoad _PrintCommonForZeroUnit;
- public bool PrintCommonForZeroUnit
- {
- get
- {
- return LazyLoad(ref _PrintCommonForZeroUnit, "@PrintCommonForZeroUnit");
- }
- }
+ // Put in for Comanche Peak to print "COMMON" for the unit number instead of "Unit 0"
+ private LazyLoad _PrintCommonForZeroUnit;
+ public bool PrintCommonForZeroUnit => LazyLoad(ref _PrintCommonForZeroUnit, "@PrintCommonForZeroUnit");
- // F2021-033: Barakah Alarm: no blank line between HLS & first substep
- private LazyLoad _NoBlankHlsAndFirstSub;
- public bool NoBlankHlsAndFirstSub
- {
- get
- {
- return LazyLoad(ref _NoBlankHlsAndFirstSub, "@NoBlankHlsAndFirstSub");
- }
- }
+ // F2021-033: Barakah Alarm: no blank line between HLS & first substep
+ private LazyLoad