Initial check in of formats for Vogtle Units 2 and 3

This commit is contained in:
2023-07-07 15:48:15 -04:00
parent bc7460d801
commit 05247bc026
18 changed files with 122 additions and 19 deletions

View File

@@ -378,6 +378,18 @@ namespace VEPROMS.CSLA.Library
}
}
#endregion
#region Section Number Flags
[Category("Miscellaneous")]
[Description("Don't parse the section number - use DisplayNumber value")]
private LazyLoad<bool> _DontParseSectionNumber;
public bool DontParseSectionNumber
{
get
{
return LazyLoad(ref _DontParseSectionNumber, "@DontParseSectionNumber");
}
}
#endregion
#region SpecialStepsFoldout
[Category("Miscellaneous")]
[Description("Section Special Steps Foldout")]
@@ -628,13 +640,13 @@ namespace VEPROMS.CSLA.Library
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _LeftMargin, "@LeftMargin");
if (MyFormat.PlantFormat.FormatConfig == null) return LazyLoad(ref _LeftMargin, "@LeftMargin");
// see if there is UCF data, need to match the index of the ucf data to that in the original format, and
// also need to check that LeftMargin is not null, since other docstyle data may exist in UCF but not PageLength:
XmlNode par = this.XmlNode.ParentNode;
// see if there is UCF (User Control of Format) data, need to match the index of the ucf data to that in the original format, and
// also need to check that LeftMargin is not null, since other docstyle data may exist in UCF but not LeftMargin:
XmlNode par = this.XmlNode.ParentNode;
string indx = null;
XmlElement ele = par as XmlElement;
if (ele.HasAttribute("Index")) indx = ele.GetAttribute("Index");
if (indx == null) return LazyLoad(ref _PageLength, "@LeftMargin");
if (indx == null) return LazyLoad(ref _LeftMargin, "@LeftMargin");
if (MyFormat.PlantFormat.FormatConfig != null && this.MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles != null && MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles.Count > 0)
{
foreach (FormatConfig.DocStyle ds in MyFormat.PlantFormat.FormatConfig.PlantFormat.DocStyles)
@@ -663,7 +675,7 @@ namespace VEPROMS.CSLA.Library
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _PageLength, "@PageLength");
if (MyFormat.PlantFormat.FormatConfig == null) return LazyLoad(ref _PageLength, "@PageLength");
// see if there is UCF data, need to match the index of the ucf data to that in the original format, and
// see if there is UCF (User Control of Format) data, need to match the index of the ucf data to that in the original format, and
// also need to check that PageLength is not null, since other docstyle data may exist in UCF but not PageLength:
XmlNode par = this.XmlNode.ParentNode;
string indx = null;

View File

@@ -32,7 +32,11 @@ namespace VEPROMS.CSLA.Library
}
set { _FormatConfig = value; }
}
// when IgnoreUCF is true, get the original data, i.e. don't apply any UCF changes to it
#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 = false;
public static bool IgnoreUCF
{
@@ -53,6 +57,7 @@ namespace VEPROMS.CSLA.Library
get { return PlantFormat._DoingUCFCheckOffsUse; }
set { PlantFormat._DoingUCFCheckOffsUse = value; }
}
#endregion //User Control of Format (UCF)
public static FormatConfig GetFormatConfig(IFormatOrFormatInfo format)
{
FormatConfig fc = null;
@@ -78,6 +83,8 @@ namespace VEPROMS.CSLA.Library
return _XmlDoc;
}
}
// FormatData contains flag and specific settings for step/sub-step types, tabbing information, etc. (pertains to the entire format)
// Reads this information in from the format file
private FormatData _FormatData;
public FormatData FormatData
{
@@ -88,6 +95,9 @@ namespace VEPROMS.CSLA.Library
}
}
private PageStyles _PageStyles;
// PageStyles (AKA PageList) contains settings used to print page boarders, page numbers, and positions information such as procedure number/title in page headers.
// These are associated with the sections defined in DocStyle
// Reads this information in from the format file
public PageStyles PageStyles
{
get
@@ -97,6 +107,8 @@ namespace VEPROMS.CSLA.Library
}
}
private DocStyles _DocStyles;
// DocStyles define page margins, continue messages, end messages and associate each section with a PageSyle
// Reads this information in from the format file
public DocStyles DocStyles
{
get
@@ -105,13 +117,18 @@ namespace VEPROMS.CSLA.Library
return _DocStyles;
}
}
public bool HasPageListToken(string token)
// Used to test if the current PageStyle uses the passed in "token"
// A token in a PageStyle is surrounded by open/close curly brackets.
// ex: {myToken}
public bool HasPageListToken(string token)
{
string xpath = string.Format("/PlantFormat/PageStyles/PageStyle/Item[@Token = '{0}']", token);
XmlNodeList nl = XmlDoc.SelectNodes(xpath);
return nl.Count > 0;
}
private FormatConfig.ReplaceStrData _UCFandOrigReplaceStrData = null;
// This will return a complete list of ReplaceWords, combining those in the original plant format
// with the ones added by the user via User Control of Format (UCF)
public FormatConfig.ReplaceStrData UCFandOrigReplaceStrData
{
get
@@ -207,7 +224,7 @@ namespace VEPROMS.CSLA.Library
_WinFontLookup.Add(key, new Font(family, size, style));
return _WinFontLookup[key];
}
// part of bug B2017-117 and for conservation of winow handles to reduce the frequency of
// 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)
@@ -324,6 +341,7 @@ namespace VEPROMS.CSLA.Library
public class FormatData : vlnFormatItem
{
public FormatData(XmlNode xmlNode) : base(xmlNode) { }
// Name of the format - as it appears when selecting the format to use in PROMS
private LazyLoad<string> _Name;
public string Name
{
@@ -332,6 +350,7 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _Name, "@Name");
}
}
// When true, this format is allowed to be used in the PROMS Express product
private LazyLoad<bool> _Express;
public bool Express
{
@@ -340,6 +359,8 @@ namespace VEPROMS.CSLA.Library
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<bool> _SpecificInfo;
public bool SpecificInfo
{
@@ -348,6 +369,8 @@ namespace VEPROMS.CSLA.Library
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
{
@@ -371,12 +394,15 @@ namespace VEPROMS.CSLA.Library
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<int, int> _TopTemplateTypes;
public Dictionary<int, int> TopTemplateTypes
{
@@ -398,6 +424,8 @@ namespace VEPROMS.CSLA.Library
return _TopTemplateTypes;
}
}
// Parses the templates defined in the format file and creates a list
// this also determines if it a Smart Template or the original style
private List<TPlate> _Templates;
public List<TPlate> Templates
{
@@ -497,6 +525,9 @@ namespace VEPROMS.CSLA.Library
}
}
// Old style format flags (from DOS version of PROMS)
// 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<E_PurchaseOptions?> _PurchaseOptions;
public E_PurchaseOptions? PurchaseOptions
{
@@ -505,6 +536,8 @@ namespace VEPROMS.CSLA.Library
return LazyLoad<E_PurchaseOptions>(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
{
@@ -521,7 +554,7 @@ namespace VEPROMS.CSLA.Library
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)
//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
{
@@ -530,7 +563,7 @@ namespace VEPROMS.CSLA.Library
return _FontSizes == null ? _FontSizes = new FontSizes(SelectSingleNode("FontSizes")) : _FontSizes;
}
}
// C2021-004 This gets the list for additional shading options defined in the format (base) file
// C2021-004 This gets the list for additional Table Cell shading options defined in the format (base) file
private ShadingOptionList _ShadingOptionList;
public ShadingOptionList ShadingOptionList
{
@@ -550,6 +583,8 @@ namespace VEPROMS.CSLA.Library
}
set { _UnitWatermarkList = value; }
}
// This is a list of supported symbol characters used in the PROMS step editor
// the master list is defined in the base format (Baseall.xml)
private SymbolList _SymbolList;
public SymbolList SymbolList
{
@@ -1580,10 +1615,11 @@ namespace VEPROMS.CSLA.Library
{
get
{
// The following line is used in UCF: this needs to be able to control a change in setting in UCF versus its use:
// This is a special case since the original format, using the value in BaseAll, is always 'false'. And the value
// should never be set in original volian plant format files, if the additional UCF checkoffs are to be used, this must
// be set in the UCF user interface.
// The following line is used in UCF (User Control of Format).
// This needs to be able to control a change in setting in UCF versus its use:
// - This is a special case since the original format, using the value in BaseAll, is always 'false'. And the value
// should never be set in original volian plant format files, if the additional UCF checkoffs are to be used, this must
// be set in the UCF user interface.
if (PlantFormat.DoingUCFCheckOffs) return PlantFormat.DoingUCFCheckOffsUse;
if (PlantFormat.IgnoreUCF) return LazyLoad(ref _CheckOffUCF, "@CheckOffUCF");
@@ -2886,6 +2922,15 @@ namespace VEPROMS.CSLA.Library
return LazyLoad(ref _OnlyBoldTopSect, "@OnlyBoldTopSect");
}
}
// If the section number is null or all blanks, then use the SectionNumber.Pos to position the section title
private LazyLoad<bool> _UseNumPosWhenNumBlank;
public bool UseNumPosWhenNumBlank
{
get
{
return LazyLoad(ref _UseNumPosWhenNumBlank, "@UseNumPosWhenNumBlank");
}
}
private VE_Font _Font;
public VE_Font Font
{