B2022-083: Support Conditional RO Values
This commit is contained in:
@@ -436,7 +436,7 @@ i = 0;
|
||||
// a tabbing line - BGE wasn't using this in data at time of development. The following code may
|
||||
// need expanded to support the tabbing/column definitions if this is found in data.
|
||||
float lyoff = yOff - 4;
|
||||
plist = plist.Replace("\r", "");
|
||||
plist = plist.Replace("\r", string.Empty);
|
||||
string[] lines = plist.Split("\n".ToCharArray());
|
||||
DocStyle docstyle = MySection.MyDocStyle;
|
||||
try
|
||||
@@ -444,7 +444,7 @@ i = 0;
|
||||
foreach (string clinex in lines)
|
||||
{
|
||||
string cline = clinex.TrimEnd();
|
||||
if (cline != "")
|
||||
if (cline != string.Empty)
|
||||
{
|
||||
// xoff handles the columns. The separator between phone items is a double space. A phone
|
||||
// item may have a single space within it (this comes from 16bit implementation)
|
||||
@@ -721,7 +721,7 @@ i = 0;
|
||||
{
|
||||
PdfDestination dest =pb.PdfDestination;
|
||||
if(dest==null) dest = new PdfDestination(PdfDestination.FIT);
|
||||
PdfOutline pdo = new PdfOutline(MyPdfOutlines[lev-1], dest,Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", ""), false);
|
||||
PdfOutline pdo = new PdfOutline(MyPdfOutlines[lev-1], dest,Regex.Replace(pb.Title, @"\\{Prerequisite Step: .*?\\}", string.Empty), false);
|
||||
if (MyPdfOutlines.Count == lev)
|
||||
MyPdfOutlines.Add(pdo);
|
||||
else
|
||||
@@ -861,7 +861,7 @@ i = 0;
|
||||
set
|
||||
{
|
||||
_MySection = value;
|
||||
MySectionTitle = ((_MySection.DisplayNumber ?? "")=="" ? "" : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
|
||||
MySectionTitle = ((_MySection.DisplayNumber ?? string.Empty)==string.Empty ? string.Empty : _MySection.DisplayNumber + " - ") + _MySection.DisplayText;
|
||||
bool forceLoadSvg = false;
|
||||
if (value.SectionConfig.Section_Pagination == SectionConfig.SectionPagination.Separate && value.MyDocStyle.ResetFirstPageOnSection)
|
||||
DidFirstPageDocStyle = false;
|
||||
@@ -1185,7 +1185,7 @@ i = 0;
|
||||
key = key + "." + MySection.ItemID;
|
||||
break;
|
||||
case E_NumberingSequence.WithinEachSectionNumber:
|
||||
key = key + "." + ( MySection.DisplayNumber == "" ? (MySection.ActiveParent as ItemInfo).DisplayNumber : MySection.DisplayNumber);
|
||||
key = key + "." + ( MySection.DisplayNumber == string.Empty ? (MySection.ActiveParent as ItemInfo).DisplayNumber : MySection.DisplayNumber);
|
||||
break;
|
||||
case E_NumberingSequence.GroupedByLevel:
|
||||
case E_NumberingSequence.Like6_ButDoesntNeedSubsection:
|
||||
@@ -1245,7 +1245,7 @@ i = 0;
|
||||
{
|
||||
while (fibase.FormatID != fibase.ParentID) fibase = fibase.MyParent;
|
||||
sGenMacBase = fibase.GenMac;
|
||||
if (sGenMacBase != null && sGenMacBase != "")
|
||||
if (sGenMacBase != null && sGenMacBase != string.Empty)
|
||||
{
|
||||
XmlDocument xDocGenMacBase = new XmlDocument();
|
||||
xDocGenMacBase.LoadXml(sGenMacBase);
|
||||
@@ -1260,19 +1260,19 @@ i = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sGenMac == null || sGenMac == "")
|
||||
if (sGenMac == null || sGenMac == string.Empty)
|
||||
{
|
||||
// If subformat and does not have its own genmac, find an inherited genmac.
|
||||
FormatInfo tmpf = FormatInfo.Get(activeFormat.ParentID);
|
||||
while (tmpf.FormatID!=1 && (sGenMac==null||sGenMac==""))
|
||||
while (tmpf.FormatID!=1 && (sGenMac==null||sGenMac==string.Empty))
|
||||
{
|
||||
sGenMac = tmpf.GenMac;
|
||||
tmpf = FormatInfo.Get(tmpf.ParentID);
|
||||
}
|
||||
if (sGenMac == null || sGenMac == "")
|
||||
if (sGenMac == null || sGenMac == string.Empty)
|
||||
sGenMac = "<svg></svg>";
|
||||
}
|
||||
if (sGenMacBase != null && sGenMacBase != "")
|
||||
if (sGenMacBase != null && sGenMacBase != string.Empty)
|
||||
{
|
||||
sGenMac = sGenMac.Replace("</svg>", sGenMacBase + "</svg>");
|
||||
}
|
||||
@@ -1338,7 +1338,7 @@ i = 0;
|
||||
//float rowAdj = 0; // = 18;
|
||||
|
||||
bool usePSIvalue = false; // C2021-065 used with ROLkUpMatch pagelist flag (Barakah Alarms)
|
||||
string otherChildUnit = ""; // C2021-065 used when OTHER applicability information is used for the ROLookUp
|
||||
string otherChildUnit = string.Empty; // C2021-065 used when OTHER applicability information is used for the ROLookUp
|
||||
foreach (VEPROMS.CSLA.Library.PageItem pageItem in pageStyle.PageItems)
|
||||
{
|
||||
if (pageItem.Token == null) continue; // can be null if token is dependent on PSI lookup!
|
||||
@@ -1401,7 +1401,7 @@ i = 0;
|
||||
parts[1] = parts[n + 1];// Get the last 2 parts
|
||||
parts[2] = parts[n + 2];
|
||||
}
|
||||
string ROLookupVal = "";
|
||||
string ROLookupVal = string.Empty;
|
||||
// parts[0] - the RO to look up - for Alarms, is usually the EOP number thus uses the "{EOPNUM}" token
|
||||
// parts[1] - Which of the multiple return value from the RO to return
|
||||
// parts[2] - the value to use if not found in ROs - usually defined in a PSI field for that Alarm procedure
|
||||
@@ -1420,7 +1420,7 @@ i = 0;
|
||||
int idx = procnum.IndexOf('-');
|
||||
otherChildUnit = procnum.Substring(0, idx); // we need to get RO info for the Other child applicability - this gets child's number
|
||||
}
|
||||
ROLookupVal = ROLookup(parts[0], parts[1], "",otherChildUnit); // will return empty string if alarm point is not found in RO database
|
||||
ROLookupVal = ROLookup(parts[0], parts[1], string.Empty,otherChildUnit); // will return empty string if alarm point is not found in RO database
|
||||
usePSIvalue = (ROLookupVal != section.MyProcedure.DisplayNumber); // use PSI value if child alarm ID not found or does not match resolved procedure number (alarm point)
|
||||
}
|
||||
// C2021-065 if usePSIvalue is true, then we know alarm point info is not in the RO database, so just use the default (PSI) value
|
||||
@@ -1437,7 +1437,7 @@ i = 0;
|
||||
ROLookupVal = dt1.StartText;
|
||||
}
|
||||
// replace the pagelist token with ROLookupVal
|
||||
pltok = pltok.Substring(0, idxstart) + ROLookupVal + ((idxstart + idxend < pltok.Length) ? pltok.Substring(idxstart + idxend + 1) : "");
|
||||
pltok = pltok.Substring(0, idxstart) + ROLookupVal + ((idxstart + idxend < pltok.Length) ? pltok.Substring(idxstart + idxend + 1) : string.Empty);
|
||||
}
|
||||
// C2021-065 (BNPP Alarms format) we are processing a paglist flag (ROLkUpMatch) to determine how to get Alarm Point information
|
||||
// Nothing else is on this page list item, so use "continue" to jump to the next pagelist item as nothing gets printed for this item
|
||||
@@ -1447,13 +1447,13 @@ i = 0;
|
||||
MatchCollection matches = regexFindToken.Matches(pltok);//(pageItem.Token);
|
||||
if (matches.Count > 0)
|
||||
{
|
||||
string plstr = "";
|
||||
string plstr = string.Empty;
|
||||
// When a pagelist line (row) has more than one token that is resolved to text, each resolved token text was place on top
|
||||
// of each other. Use a temporary string (plstr) to process the pagelist tokens for each pagelist line (row) before adding
|
||||
// it to the svgGroup.
|
||||
plstr = pltok;//pageItem.Token;
|
||||
// F2017-046: Remove the '@@' characters that were getting printed on SAMG Sup Info facing pages for Calvert (BGESAM1 format).
|
||||
if (MyPromsPrinter.DoingFacingPage && plstr.Contains("@@")) plstr = plstr.Replace("@@", "");
|
||||
if (MyPromsPrinter.DoingFacingPage && plstr.Contains("@@")) plstr = plstr.Replace("@@", string.Empty);
|
||||
foreach (Match match in matches)
|
||||
{
|
||||
string token = match.Value;
|
||||
@@ -1485,7 +1485,7 @@ i = 0;
|
||||
{
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem.Token, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
||||
svgGroup.Add(PageItemToSvgText(pltok, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
||||
plstr = ""; // Clear it so it isn't put out twice (used below)
|
||||
plstr = string.Empty; // Clear it so it isn't put out twice (used below)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1494,11 +1494,11 @@ i = 0;
|
||||
int eindx = token.IndexOf("}", bindx);
|
||||
val = token.Substring(bindx + 1, eindx - bindx - 1);
|
||||
}
|
||||
if (val != null && val != "" && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == "")
|
||||
if (val != null && val != string.Empty && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == string.Empty)
|
||||
//val = " ";
|
||||
if (val == null)
|
||||
val = "";
|
||||
val = string.Empty;
|
||||
plstr = plstr.Replace(token, val);
|
||||
// Get a list of Pagelist token that are inside the PS= conditional result
|
||||
// Paglist tokens inside a PS= conditional are surrounded by square brackets instead of curley
|
||||
@@ -1540,7 +1540,7 @@ i = 0;
|
||||
if (relval == "Y")
|
||||
{
|
||||
svgGroup.Add(PageItemToSvgText(pltok, (float)pageItem.RelatedItem.Row, (float)pageItem.RelatedItem.Col, pageItem.RelatedItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, val, MySection));
|
||||
plstr = ""; // Clear it so it isn't put out twice (used below)
|
||||
plstr = string.Empty; // Clear it so it isn't put out twice (used below)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1549,11 +1549,11 @@ i = 0;
|
||||
int eindx = token.IndexOf("}", bindx);
|
||||
val = token.Substring(bindx + 1, eindx - bindx - 1);
|
||||
}
|
||||
if (val != null && val != "" && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == "")
|
||||
if (val != null && val != string.Empty && !PgLogicals.ContainsKey(pstok)) PgLogicals.Add(pstok, val != null);
|
||||
//if (val == null || val == string.Empty)
|
||||
//val = " ";
|
||||
if (val == null)
|
||||
val = "";
|
||||
val = string.Empty;
|
||||
plstr = plstr.Replace(token, val);
|
||||
// Get a list of Pagelist token that are inside the SI= conditional result
|
||||
// Paglist tokens inside a PS= conditional are surrounded by square brackets instead of curley
|
||||
@@ -1575,7 +1575,7 @@ i = 0;
|
||||
if (!ProcessPaglistToken(section, svgGroup, pageItem, ref useFontForCheckOffHeader, ref plstr, token)) break;
|
||||
}
|
||||
} // end foreach matches
|
||||
if (plstr != "")
|
||||
if (plstr != string.Empty)
|
||||
{
|
||||
if (useFontForCheckOffHeader != null)
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, useFontForCheckOffHeader, MySection));
|
||||
@@ -1604,30 +1604,36 @@ i = 0;
|
||||
else
|
||||
Volian.Base.Library.BaselineMetaFile.WriteLine("No Pagelist Information");
|
||||
}
|
||||
|
||||
private string ROLookup(string accpageid, string multiid, string deflt)
|
||||
{
|
||||
return ROLookup(accpageid, multiid, deflt, "");
|
||||
return ROLookup(accpageid, multiid, deflt, string.Empty);
|
||||
}
|
||||
|
||||
// C2021-065 pass in a override for the child unit - in this case the <u-Otherxxx> token is being used (Barakah Alarms)
|
||||
private string ROLookup(string accpageid, string multiid, string deflt, string overrideChild)
|
||||
{
|
||||
ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MySection.MyDocVersion, overrideChild);
|
||||
|
||||
string accpgid = accpageid;
|
||||
//accpgid = accpgid.Replace("-HIGH", "-HI").Replace("-LOW", "-LO").Replace("_HIGH", "-HI").Replace("_LOW", "-LO").Replace(@"\u8209?", "-");
|
||||
string val = myLookup.GetROValueByAccPagID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
if (val == null)
|
||||
ROFSTLookup.rochild roc = myLookup.GetROChildByAccPageID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
|
||||
if (roc.value == null)
|
||||
{
|
||||
accpgid = accpgid.Replace(@"\u8209?", "-");
|
||||
val = myLookup.GetROValueByAccPagID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
roc = myLookup.GetROChildByAccPageID("<" + accpgid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix);
|
||||
}
|
||||
if (!deflt.StartsWith("[") && val != null && val.Trim().Length > 0) // don't return val if it's an empty or blank string - jsj 01-28-2019
|
||||
|
||||
if (!deflt.StartsWith("[") && !string.IsNullOrEmpty(roc.value) && roc.value.Trim().Length > 0) // don't return val if it's an empty or blank string - jsj 01-28-2019
|
||||
{
|
||||
val = val.Replace("[xB3]", "\xB3");
|
||||
val = val.Replace("[xB2]", "\xB2");
|
||||
return val;
|
||||
roc.value = roc.value.Replace("[xB3]", "\xB3");
|
||||
roc.value = roc.value.Replace("[xB2]", "\xB2");
|
||||
return roc.value;
|
||||
}
|
||||
|
||||
return deflt;
|
||||
}
|
||||
|
||||
private bool _DidHLSText = false;
|
||||
public bool DidHLSText
|
||||
{
|
||||
@@ -1640,23 +1646,23 @@ i = 0;
|
||||
get { return _HasHLSTextId; }
|
||||
set { _HasHLSTextId = value; }
|
||||
}
|
||||
private string _HLSText = "";
|
||||
private string _HLSText = string.Empty;
|
||||
public string HLSText
|
||||
{
|
||||
get { return _HLSText; }
|
||||
set
|
||||
{
|
||||
if (_HLSText == "")
|
||||
if (_HLSText == string.Empty)
|
||||
_HLSText = value;
|
||||
}
|
||||
}
|
||||
private string _HLSTAB = "";
|
||||
private string _HLSTAB = string.Empty;
|
||||
public string HLSTAB
|
||||
{
|
||||
get { return _HLSTAB; }
|
||||
set { _HLSTAB = value; }
|
||||
}
|
||||
private string _HLRNO = "";
|
||||
private string _HLRNO = string.Empty;
|
||||
public string HLRNO
|
||||
{
|
||||
get { return _HLRNO; }
|
||||
@@ -1697,11 +1703,11 @@ i = 0;
|
||||
{
|
||||
case "{!atom}":
|
||||
// Add an Atom Figure to the SVG
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
AddImage(svgGroup, 160.5f, 170.5f, 288f, 323f, "atom.bmp");
|
||||
break;
|
||||
case "{!cpllogo}":
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
AddImage(svgGroup, 10f, 10f, 78.7f, 29.8f, "cpllogo.bmp");
|
||||
break;
|
||||
//case "{!domlogo}":
|
||||
@@ -1738,7 +1744,7 @@ i = 0;
|
||||
case "[BOX8]":
|
||||
case "{BOX9}":
|
||||
case "[BOX9]":
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(token)));
|
||||
break;
|
||||
case "{PMODEBOX}": // need to set either 1 or 2 depending on number of columns
|
||||
@@ -1751,24 +1757,24 @@ i = 0;
|
||||
else if (_MySection.SectionConfig.Section_ColumnMode == SectionConfig.SectionColumnMode.Two)
|
||||
box = "2";
|
||||
box = "{BOX" + box + "}";
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
svgGroup.Add(PageItemToSvgUse(pageItem, FirstAndLast(box)));
|
||||
break;
|
||||
case "{DRAFTPAGE}":
|
||||
//if (!AllowedWatermarks.Contains("Draft")) AllowedWatermarks.Add("Draft"); -- B2018-124 not needed anymore
|
||||
plstr = plstr.Replace(token, "");// Remove token since it is handled now
|
||||
plstr = plstr.Replace(token, string.Empty);// Remove token since it is handled now
|
||||
break;
|
||||
case "{REFERENCEPAGE}":
|
||||
//if (!AllowedWatermarks.Contains("Reference")) AllowedWatermarks.Add("Reference"); -- B2018-124 not needed anymore
|
||||
plstr = plstr.Replace(token, "");// Remove token since it is handled now
|
||||
plstr = plstr.Replace(token, string.Empty);// Remove token since it is handled now
|
||||
break;
|
||||
case "{MASTERPAGE}":
|
||||
//if (!AllowedWatermarks.Contains("Master")) AllowedWatermarks.Add("Master"); -- B2018-124 not needed anymore
|
||||
plstr = plstr.Replace(token, "");// Remove token since it is handled now
|
||||
plstr = plstr.Replace(token, string.Empty);// Remove token since it is handled now
|
||||
break;
|
||||
case "{SAMPLEPAGE}":
|
||||
//if (!AllowedWatermarks.Contains("Sample")) AllowedWatermarks.Add("Sample"); -- B2018-124 not needed anymore
|
||||
plstr = plstr.Replace(token, "");// Remove token since it is handled now
|
||||
plstr = plstr.Replace(token, string.Empty);// Remove token since it is handled now
|
||||
break;
|
||||
//case "{INFORMATIONPAGE}":
|
||||
// if (!AllowedWatermarks.Contains("Information Only")) AllowedWatermarks.Add("Information Only"); -- B2018-124 not needed anymore
|
||||
@@ -1788,7 +1794,7 @@ i = 0;
|
||||
float linelen = tlen * (float)pageItem.Font.CPI / 12;
|
||||
string title = section.MyProcedure.MyContent.Text;
|
||||
if (title.Contains("<NO TITLE>") && !section.ActiveFormat.PlantFormat.FormatData.ProcData.PrintNoTitle)
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
else
|
||||
{
|
||||
if (section.ActiveFormat.PlantFormat.FormatData.ProcData.CapitalizeTitle) title = title.ToUpper();
|
||||
@@ -1833,7 +1839,7 @@ i = 0;
|
||||
if (OldTemplateContMsg)
|
||||
plstr = plstr.Replace("{CM:(Cont)}", "(Cont)");
|
||||
else
|
||||
plstr = plstr.Replace("{CM:(Cont)}", "");
|
||||
plstr = plstr.Replace("{CM:(Cont)}", string.Empty);
|
||||
break;
|
||||
case "{RF:REFERENCE}":
|
||||
// This token is used by IP2. In 16bit it is processed when the PO_DISTRIBUTEAPPROVED
|
||||
@@ -1842,13 +1848,13 @@ i = 0;
|
||||
// unless/until it is determined that it is used (no data that Volian currently has
|
||||
// contains this file). To implement it requires a config item off of the procedure level,
|
||||
// user interface support on the Procedure Properties dialog and print support.
|
||||
plstr = plstr.Replace("{RF:REFERENCE}", "");
|
||||
plstr = plstr.Replace("{RF:REFERENCE}", string.Empty);
|
||||
break;
|
||||
case "{NULLDOCCURPAGE}":
|
||||
// This token is used by IP2. There was no support for it in 16bit and the 16bit to 32bit
|
||||
// output compared so it is just removed here so that a pagelist token error is not output
|
||||
// in error log.
|
||||
plstr = plstr.Replace("{NULLDOCCURPAGE}", "");
|
||||
plstr = plstr.Replace("{NULLDOCCURPAGE}", string.Empty);
|
||||
break;
|
||||
case "{PDFDate}":
|
||||
plstr = plstr.Replace("{PDFDate}", DateTime.Now.ToString("MM/dd/yyyy"));
|
||||
@@ -1882,16 +1888,16 @@ i = 0;
|
||||
{
|
||||
// copied Rgex from DisplayText and modifed to remove the Parent/Child Unit information
|
||||
// i.e. <U>, <U-ID>, <U-NAME>, <U-TEXT>, <U-NUMBER>, <U-OTHERID>, <U-OTHERNAME>, <U-OTHERTEXT>, <U-OTHERNUMBER>
|
||||
eopnum = Regex.Replace(eopnum, @"\<U\>", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)ID)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NAME)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)TEXT)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NUMBER)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<U\>", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)ID)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NAME)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)TEXT)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)NUMBER)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
// B2021-148 remove space character after "OTHER"
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERID)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERNAME)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERTEXT)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERNUMBER)\>(-|\\u8209\?)", "", RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERID)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERNAME)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERTEXT)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
eopnum = Regex.Replace(eopnum, @"\<(U(-|\\u8209\?)OTHERNUMBER)\>(-|\\u8209\?)", string.Empty, RegexOptions.IgnoreCase);
|
||||
}
|
||||
else
|
||||
eopnum = section.MyProcedure.DisplayNumber;// B2021-066: found and fixed during proc pc/pc work
|
||||
@@ -1933,7 +1939,7 @@ i = 0;
|
||||
&& token.Contains("ATTACHTITLECONT") && DidFirstPageDocStyle)
|
||||
{
|
||||
string myMsg = section.MyDocStyle.Continue.Top.Message;
|
||||
if (myMsg != null && myMsg != "")stitle = stitle + myMsg;
|
||||
if (myMsg != null && myMsg != string.Empty)stitle = stitle + myMsg;
|
||||
}
|
||||
// B2021-119: large titles on Landscape Word Attachments are printing on 2 lines.
|
||||
int? stl = (int)section.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumberAndTitleLength;
|
||||
@@ -1945,7 +1951,7 @@ i = 0;
|
||||
PrintedSectionPage = (int)pageItem.Row - _sectLevelNumTtlDiff;
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, section.DisplayText));
|
||||
break;
|
||||
case "{METASECTIONTITLE}": // This will print the top level section title (versus level above current)
|
||||
@@ -1961,7 +1967,7 @@ i = 0;
|
||||
plstr = SplitTitle(svgGroup, pageItem, top.DisplayText, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionTitleLength, token, plstr, section.ActiveFormat.PlantFormat.FormatData.SectData.SectionNumberAndTitleLength);
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{SECTIONLEVELNUMBER}":
|
||||
case "[SECTIONLEVELNUMBER]":
|
||||
@@ -1972,7 +1978,7 @@ i = 0;
|
||||
_sectLevelNumTtlDiff = (int)pageItem.Row;
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
// B2020-040: pagelist was {SECTIONLEVELNUMBER}, {SECTIONLEVELTITLE} and if no SECTIONLEVELNUMBER exists, printed
|
||||
// text starts with a ', ' - remove it.
|
||||
if (plstr.StartsWith(", ") && plstr.IndexOf("{SECTIONLEVELTITLE}") == 2)
|
||||
@@ -1996,7 +2002,7 @@ i = 0;
|
||||
plstr = plstr.Replace(token, top.DisplayNumber);
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{UNITTEXT}":
|
||||
case "[UNITTEXT]":
|
||||
@@ -2069,12 +2075,12 @@ i = 0;
|
||||
plstr = plstr.Replace(token, "BREAKER");
|
||||
break;
|
||||
default:
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{STARTUP}":
|
||||
ItemInfo firstHighs = ValveGetFirstStep(section);
|
||||
@@ -2092,12 +2098,12 @@ i = 0;
|
||||
plstr = plstr.Replace(token, "STARTUP/");
|
||||
break;
|
||||
default:
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
break;
|
||||
case "{PROCDES}":
|
||||
ProcDescrList pdl = section.ActiveFormat.PlantFormat.FormatData.PrintData.ProcDescrList;
|
||||
@@ -2112,7 +2118,7 @@ i = 0;
|
||||
if (procnum.Contains(matchStr))
|
||||
{
|
||||
if (pd.ProcDescr1 == "{null}") // used to override fmt file inheritance & set null/empty string
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
else
|
||||
plstr = pd.ProcDescr1;
|
||||
break;
|
||||
@@ -2127,13 +2133,13 @@ i = 0;
|
||||
if (Regex.IsMatch(procnum.Substring(0,1),"[A-Za-z]"))
|
||||
plstr = pd.ProcDescr1;
|
||||
else
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
break;
|
||||
}
|
||||
if (Regex.IsMatch(procnum, "^[A-Za-z]+$"))
|
||||
plstr = pd.ProcDescr1;
|
||||
else
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2162,7 +2168,7 @@ i = 0;
|
||||
if (Regex.IsMatch(procnum, "^[A-Za-z]+$"))
|
||||
plstr = pd.ProcDescr2;
|
||||
else
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2180,7 +2186,7 @@ i = 0;
|
||||
plstr = plstr.Replace(token, thisDate2.ToString("H:mm"));
|
||||
break;
|
||||
case "{HLRNO}":
|
||||
plstr = HLRNO==null?"":plstr.Replace(token, HLRNO);
|
||||
plstr = HLRNO==null?string.Empty:plstr.Replace(token, HLRNO);
|
||||
break;
|
||||
case "{HLSTAB}":
|
||||
plstr = plstr.Replace(token, HLSTAB);
|
||||
@@ -2204,14 +2210,14 @@ i = 0;
|
||||
//int sc = sectCfg.Section_CheckoffListSelection;
|
||||
if (!MySection.HasInitials)
|
||||
{
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
//PIInitials = pageItem;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pageItem.Row == -MySection.MyDocStyle.Layout.TopMargin)
|
||||
{
|
||||
plstr = plstr.Replace(token, "");
|
||||
plstr = plstr.Replace(token, string.Empty);
|
||||
PIInitials = pageItem;
|
||||
}
|
||||
else
|
||||
@@ -2222,7 +2228,7 @@ i = 0;
|
||||
// copied from 16bit's pagelist.cs for BGE:
|
||||
string revUnit = null;
|
||||
string unitNum = MySection.MyDocVersion.DocVersionConfig.Print_UnitNumberForPageList;
|
||||
if (Rev != null && Rev != "")
|
||||
if (Rev != null && Rev != string.Empty)
|
||||
{
|
||||
revUnit = Rev;
|
||||
int indxs = Rev.IndexOf(MySection.ActiveFormat.PlantFormat.FormatData.PrintData.RevDateWithForwardSlash ? '\\' : '/');
|
||||
@@ -2262,7 +2268,7 @@ i = 0;
|
||||
if (val.ToUpper().Contains("<U>") || val.ToUpper().Contains("<U-")) // Replace token with the applicable unit information
|
||||
{
|
||||
string unbr3 = ResolveUnitApp(MySection.MyDocVersion, val);
|
||||
plstr = unbr3 ?? "";
|
||||
plstr = unbr3 ?? string.Empty;
|
||||
}
|
||||
plstr = plstr.Replace(token, val);
|
||||
break; // B2019-134 break out of switch statement after processing the <SI- token so that it can loop and handle any other tokens on the same line
|
||||
@@ -2275,7 +2281,7 @@ i = 0;
|
||||
if (plstr.ToUpper().Contains("<U>") || val.ToUpper().Contains("<U-")) // Replace token with the applicable unit information
|
||||
{
|
||||
string unbr3 = ResolveUnitApp(MySection.MyDocVersion, val);
|
||||
plstr = unbr3 ?? "";
|
||||
plstr = unbr3 ?? string.Empty;
|
||||
}
|
||||
// the first part of the string between the ? and ' ' is the other logical
|
||||
// to see if it's on. If on, just use col and/or row as defined. Otherwise use
|
||||
@@ -2292,14 +2298,14 @@ i = 0;
|
||||
col = System.Convert.ToInt32(newval.Substring(4));
|
||||
}
|
||||
svgGroup.Add(PageItemToSvgText(pageItem.Token, pageItem.Row ?? 0, col, pageItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, plstr, MySection));
|
||||
plstr = ""; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
plstr = string.Empty; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (token.Contains(@"RO-"))
|
||||
{
|
||||
plstr = token.Replace("{","").Replace("}","");
|
||||
plstr = token.Replace("{",string.Empty).Replace("}",string.Empty);
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, MySection));
|
||||
}
|
||||
if (token.Contains(@"PS-"))
|
||||
@@ -2317,7 +2323,7 @@ i = 0;
|
||||
if(val.ToUpper().Contains("<U>") || val.ToUpper().Contains("<U-")) // Replace token with the applicable unit information
|
||||
{
|
||||
string unbr3 = ResolveUnitApp(MySection.MyDocVersion, val);
|
||||
val = unbr3 ?? "";
|
||||
val = unbr3 ?? string.Empty;
|
||||
}
|
||||
// MaxWidth is used to define width that the PSI text spans x-direction on page. If it is
|
||||
// defined, see if the text is too wide for a single line (SplitTextMaxWidth). The
|
||||
@@ -2352,22 +2358,22 @@ i = 0;
|
||||
col = System.Convert.ToInt32(newval.Substring(4));
|
||||
}
|
||||
svgGroup.Add(PageItemToSvgText(pageItem.Token, pageItem.Row ?? 0, col, pageItem.Justify ?? VEPROMS.CSLA.Library.E_Justify.PSLeft, pageItem.Font, plstr, MySection));
|
||||
plstr = ""; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
plstr = string.Empty; // clear so it doesn't get added twice, i.e. in the method that calls this.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plstr != "")
|
||||
if (plstr != string.Empty)
|
||||
{
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, MySection));
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
}
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, pageItem.Token));
|
||||
}
|
||||
//_MyLog.InfoFormat("Token not processed {0}", token);
|
||||
if (plstr == "") retval = false;
|
||||
if (plstr == string.Empty) retval = false;
|
||||
break;
|
||||
}
|
||||
return retval;
|
||||
@@ -2409,7 +2415,7 @@ i = 0;
|
||||
// if (dvConfig != null)
|
||||
// {
|
||||
// val = dvConfig.GetValue("SI", fieldName);
|
||||
// if (val != null && val != "") return val; // the value exists within the docversion level
|
||||
// if (val != null && val != string.Empty) return val; // the value exists within the docversion level
|
||||
// }
|
||||
// FolderInfo fi = pi.MyDocVersion.MyFolder;
|
||||
// while (fi != null)
|
||||
@@ -2418,7 +2424,7 @@ i = 0;
|
||||
// if (folderConfig != null)
|
||||
// {
|
||||
// val = folderConfig.GetValue("SI", fieldName);
|
||||
// if (val != null && val != "") return val; // the value exists within this folder
|
||||
// if (val != null && val != string.Empty) return val; // the value exists within this folder
|
||||
// }
|
||||
// fi = fi.ActiveParent as FolderInfo;
|
||||
// }
|
||||
@@ -2476,11 +2482,11 @@ i = 0;
|
||||
{
|
||||
plstr = plstr.Replace(match, line); // include preceeding text with the first line v.c. summer
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, yOffset));
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
}
|
||||
else
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
|
||||
plstr = plstr.Replace(match, "");
|
||||
plstr = plstr.Replace(match, string.Empty);
|
||||
}
|
||||
yOffset += (float)((pageItem.Font.Size > 14) ? pageItem.Font.Size : 12);
|
||||
}
|
||||
@@ -2489,7 +2495,7 @@ i = 0;
|
||||
private string SplitTitle(SvgGroup svgGroup, VEPROMS.CSLA.Library.PageItem pageItem, string title, int? len, string match, string plstr,int? numAndTitleLen)
|
||||
{
|
||||
bool includePrecedingText = false;
|
||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, "");
|
||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, string.Empty);
|
||||
// F2017-013 - Ginna (RGESAM1) this handles when you have {SECTIONLEVELNUMBER} and {SECTIONLEVELTITLE} on the same line.
|
||||
// The section number was already replaced in plstr so when determining where to split the title,
|
||||
// include the section number (and anything before the title) in the calculation of where to split.
|
||||
@@ -2508,9 +2514,9 @@ i = 0;
|
||||
if ((len == null || len == 0 || ItemInfo.StripRtfFormatting(title).Length < len) && (!includePrecedingText || ItemInfo.StripRtfFormatting(title).Length < numAndTitleLen))
|
||||
{
|
||||
// B2022-061: don't print '\line' as part of procedure title in pagelist items.
|
||||
if (match == "{PROCTITLE}") title = title.Replace("\\line ", "");
|
||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, ""); // this would have been done in proctitle1
|
||||
plstr = plstr.Replace(match, title).Replace("@@","");
|
||||
if (match == "{PROCTITLE}") title = title.Replace("\\line ", string.Empty);
|
||||
if (match == "{PROCTITLE2}" || match == "[PROCTITLE2]") return plstr.Replace(match, string.Empty); // this would have been done in proctitle1
|
||||
plstr = plstr.Replace(match, title).Replace("@@",string.Empty);
|
||||
//svgGroup.Add(PageItemToSvgText(pageItem, title));
|
||||
return plstr;
|
||||
}
|
||||
@@ -2520,7 +2526,7 @@ i = 0;
|
||||
if (plstr.Contains("@@"))
|
||||
{
|
||||
DoSpecialSectNumTitle(svgGroup, pageItem, title, len, match, plstr);
|
||||
return ""; // all resolved pagelist items were already added to svgGroup for printing.
|
||||
return string.Empty; // all resolved pagelist items were already added to svgGroup for printing.
|
||||
}
|
||||
// Otherwise determine how many line to split the text into
|
||||
List<string>titleLines = Volian.Base.Library.RtfTools.SplitText(title,(includePrecedingText)?(int)numAndTitleLen: (int)len);
|
||||
@@ -2555,11 +2561,11 @@ i = 0;
|
||||
{
|
||||
plstr = plstr.Replace(match, line); // include preceeding text with the first line v.c. summer
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, yOffset));
|
||||
plstr = "";
|
||||
plstr = string.Empty;
|
||||
}
|
||||
else
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
|
||||
plstr = plstr.Replace(match, "");
|
||||
plstr = plstr.Replace(match, string.Empty);
|
||||
}
|
||||
yOffset += (float)((pageItem.Font.Size > 14) ? pageItem.Font.Size : 12);
|
||||
}
|
||||
@@ -2632,7 +2638,7 @@ i = 0;
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
|
||||
yOffset += (float)((pageItem.Font.Size > 14) ? pageItem.Font.Size : 12);
|
||||
}
|
||||
return plstr.Replace(token, "");
|
||||
return plstr.Replace(token, string.Empty);
|
||||
}
|
||||
private string SplitEOPNumber(SvgGroup svgGroup, PageItem pageItem, string eopnum, string token, string plstr)
|
||||
{
|
||||
@@ -2643,7 +2649,7 @@ i = 0;
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, line, yOffset));
|
||||
yOffset += (float)((pageItem.Font.Size > 14) ? pageItem.Font.Size : 12);
|
||||
}
|
||||
return plstr.Replace(token, "");
|
||||
return plstr.Replace(token, string.Empty);
|
||||
}
|
||||
//private string symblsStr = "\u25CF\u0394"; // string of possible symbol character in a tab
|
||||
//// add symbol characters as needed
|
||||
@@ -2697,7 +2703,7 @@ i = 0;
|
||||
if (lnCnt == 1) continue;
|
||||
plstr = plstr.Replace(match, line);
|
||||
svgGroup.Add(PageItemToSvgText(pageItem, plstr, yOffset));
|
||||
plstr = ""; // clear it because it was added into the list in the line above this, i.e. don't duplicate
|
||||
plstr = string.Empty; // clear it because it was added into the list in the line above this, i.e. don't duplicate
|
||||
yOffset += 12;
|
||||
}
|
||||
return plstr;
|
||||
@@ -2815,7 +2821,7 @@ i = 0;
|
||||
// there is a message in format file to use instead of text, then use it.
|
||||
if (tmpi == 8 && mySize.Width > fontShrinkAftLen)
|
||||
{
|
||||
if (reptext != null && reptext != "")
|
||||
if (reptext != null && reptext != string.Empty)
|
||||
text = reptext;
|
||||
else // As per PAL (11/15/21) have default message and highlight by italics (text was already bolded)
|
||||
{
|
||||
@@ -2939,7 +2945,7 @@ i = 0;
|
||||
// that are used.
|
||||
|
||||
// 16-bit had code to string preceeding blanks.
|
||||
if (Rev != null && Rev != "") Rev = Rev.TrimStart(" ".ToCharArray());
|
||||
if (Rev != null && Rev != string.Empty) Rev = Rev.TrimStart(" ".ToCharArray());
|
||||
|
||||
// Now check the format flags to determine if/how the Rev string should be parsed.
|
||||
if ((MySection.ActiveFormat.PlantFormat.FormatData.PrintData.DoRevDate && Rev.Contains("/"))
|
||||
@@ -2958,14 +2964,14 @@ i = 0;
|
||||
case "{SETREV}":
|
||||
return MySection.MyDocVersion.DocVersionConfig.ProcedureSetRev;
|
||||
case "{NULLDOCCURPAGE}":
|
||||
return "";
|
||||
return string.Empty;
|
||||
}
|
||||
if (!_MissingTokens.Contains(match.Value))
|
||||
{
|
||||
_MissingTokens.Add(match.Value);
|
||||
_MyLog.InfoFormat("Unhandled token {0}", match.Value);
|
||||
}
|
||||
return "";
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
public class ChkListBoxesHelper : List<ChkListBoxHelper>
|
||||
|
Reference in New Issue
Block a user