Added CapSPIfLastLower=True for Catawba and McGuire
Added CapROIfLastLower=False for Catawba and McGuire Added CapSPIfLastLower for Catawba and McGuire so that only setpoint ROs are uppercased if the surounding text is uppercase.
This commit is contained in:
parent
3ddc7dfd41
commit
75abd14dd4
@ -5419,6 +5419,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return LazyLoad(ref _CapRoIfLastLower, "@CapRoIfLastLower");
|
return LazyLoad(ref _CapRoIfLastLower, "@CapRoIfLastLower");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private LazyLoad<bool> _CapSPIfLastLower;
|
||||||
|
public bool CapSPIfLastLower
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return LazyLoad(ref _CapSPIfLastLower, "@CapSPIfLastLower");
|
||||||
|
}
|
||||||
|
}
|
||||||
private LazyLoad<bool> _UpRoIfPrevUpper;
|
private LazyLoad<bool> _UpRoIfPrevUpper;
|
||||||
public bool UpRoIfPrevUpper
|
public bool UpRoIfPrevUpper
|
||||||
{
|
{
|
||||||
|
@ -350,13 +350,14 @@ namespace Volian.Controls.Library
|
|||||||
System.Text.RegularExpressions.Group g = m.Groups[3];
|
System.Text.RegularExpressions.Group g = m.Groups[3];
|
||||||
string beforeRO = StaticStripRtfCommands(text.Substring(0, g.Index));
|
string beforeRO = StaticStripRtfCommands(text.Substring(0, g.Index));
|
||||||
string afterRO = StaticStripRtfCommands(text.Substring(g.Index + g.Length));
|
string afterRO = StaticStripRtfCommands(text.Substring(g.Index + g.Length));
|
||||||
string newvalue = DoROFormatFlags(g.ToString(), beforeRO, afterRO);
|
|
||||||
newvalue = DoROReplaceWords(_MyFormat.PlantFormat.FormatData.SectData.ReplaceStrList, newvalue, _MyItemInfo.IsHigh);
|
|
||||||
Match myMatch = regRefObj.Match(m.ToString());
|
Match myMatch = regRefObj.Match(m.ToString());
|
||||||
int dbid = System.Convert.ToInt32(myMatch.Groups[2].Value.Substring(0, 4), 16);
|
int dbid = System.Convert.ToInt32(myMatch.Groups[2].Value.Substring(0, 4), 16);
|
||||||
int rodbid = int.Parse(myMatch.Groups[3].Value);
|
int rodbid = int.Parse(myMatch.Groups[3].Value);
|
||||||
ROFstInfo myROFst = _MyItemInfo.MyDocVersion.GetROFst(rodbid);
|
ROFstInfo myROFst = _MyItemInfo.MyDocVersion.GetROFst(rodbid);
|
||||||
if (myROFst.IsSetpointDB(dbid)) newvalue = ReplaceSpaceWithHardspace(newvalue);
|
bool isSetpoint=myROFst.IsSetpointDB(dbid);
|
||||||
|
string newvalue = DoROFormatFlags(g.ToString(), beforeRO, afterRO, isSetpoint);
|
||||||
|
newvalue = DoROReplaceWords(_MyFormat.PlantFormat.FormatData.SectData.ReplaceStrList, newvalue, _MyItemInfo.IsHigh);
|
||||||
|
if (isSetpoint) newvalue = ReplaceSpaceWithHardspace(newvalue);
|
||||||
if (g.ToString() != newvalue)
|
if (g.ToString() != newvalue)
|
||||||
text = text.Substring(0, g.Index) + newvalue + text.Substring(g.Index + g.Length);
|
text = text.Substring(0, g.Index) + newvalue + text.Substring(g.Index + g.Length);
|
||||||
}
|
}
|
||||||
@ -1168,7 +1169,7 @@ namespace Volian.Controls.Library
|
|||||||
// string spaces = @" \u160?";
|
// string spaces = @" \u160?";
|
||||||
// return (spaces.IndexOf(ch) >= 0);
|
// return (spaces.IndexOf(ch) >= 0);
|
||||||
//}
|
//}
|
||||||
private string DoROFormatFlags(string roText, string beforeRO, string afterRO)
|
private string DoROFormatFlags(string roText, string beforeRO, string afterRO, bool isSetpoint)
|
||||||
{
|
{
|
||||||
string rtnstr = roText;
|
string rtnstr = roText;
|
||||||
// The RO text is being changed to match it's context. Since it is changed in reverse order, the text before the RO
|
// The RO text is being changed to match it's context. Since it is changed in reverse order, the text before the RO
|
||||||
@ -1195,6 +1196,11 @@ namespace Volian.Controls.Library
|
|||||||
// Caps ROs anywhere if no lower case text follows
|
// Caps ROs anywhere if no lower case text follows
|
||||||
// and an upper case letter immediately precedes the RO.
|
// and an upper case letter immediately precedes the RO.
|
||||||
|
|
||||||
|
if (isSetpoint && _MyItemInfo.ActiveFormat.PlantFormat.FormatData.ROData.CapSPIfLastLower &&
|
||||||
|
!Regex.IsMatch(afterRO, @".*(?<!\\)[a-z].*") && char.IsUpper(LastAlpha(beforeRO)))
|
||||||
|
{
|
||||||
|
return UpperCaseUnits(rtnstr);
|
||||||
|
}
|
||||||
if (_MyItemInfo.ActiveFormat.PlantFormat.FormatData.ROData.CapRoIfLastLower &&
|
if (_MyItemInfo.ActiveFormat.PlantFormat.FormatData.ROData.CapRoIfLastLower &&
|
||||||
!Regex.IsMatch(afterRO,@".*(?<!\\)[a-z].*") && char.IsUpper(LastAlpha(beforeRO)))
|
!Regex.IsMatch(afterRO,@".*(?<!\\)[a-z].*") && char.IsUpper(LastAlpha(beforeRO)))
|
||||||
{
|
{
|
||||||
|
@ -1121,7 +1121,8 @@ public struct RO
|
|||||||
public string UpRoAftrDash; //UpSetpntAftrDash;
|
public string UpRoAftrDash; //UpSetpntAftrDash;
|
||||||
public string UpcaseAllRoUnits; //UpcaseAllSetpointUnits;
|
public string UpcaseAllRoUnits; //UpcaseAllSetpointUnits;
|
||||||
public string CapHighRo; //CapHighSetpnt;
|
public string CapHighRo; //CapHighSetpnt;
|
||||||
public string CapRoIfLastLower; //CapsPIFLastLower;
|
public string CapRoIfLastLower; //Old CapsPIFLastLower;
|
||||||
|
public string CapSPIfLastLower; //Adding in CapSPIFLastLower;
|
||||||
public string UpRoIfPrevUpper; //UpSpIfPrevUpper
|
public string UpRoIfPrevUpper; //UpSpIfPrevUpper
|
||||||
public string UnderlineRo; //UnderlineSetpoints
|
public string UnderlineRo; //UnderlineSetpoints
|
||||||
public string CapFirstLetterInHighRO; //CAPFIRSTLETTERINHIGHSP
|
public string CapFirstLetterInHighRO; //CAPFIRSTLETTERINHIGHSP
|
||||||
@ -4118,6 +4119,7 @@ namespace fmtxml
|
|||||||
else fmtdata.ROData.CapHighRo = "False";
|
else fmtdata.ROData.CapHighRo = "False";
|
||||||
if (XtraFlags.CapsPIFLastLower == "True") fmtdata.ROData.CapRoIfLastLower = "True";
|
if (XtraFlags.CapsPIFLastLower == "True") fmtdata.ROData.CapRoIfLastLower = "True";
|
||||||
else fmtdata.ROData.CapRoIfLastLower = "False";
|
else fmtdata.ROData.CapRoIfLastLower = "False";
|
||||||
|
fmtdata.ROData.CapSPIfLastLower = "null";
|
||||||
if (XtraFlags.UpSpIfPrevUpper == "True") fmtdata.ROData.UpRoIfPrevUpper = "True";
|
if (XtraFlags.UpSpIfPrevUpper == "True") fmtdata.ROData.UpRoIfPrevUpper = "True";
|
||||||
else fmtdata.ROData.UpRoIfPrevUpper = "False";
|
else fmtdata.ROData.UpRoIfPrevUpper = "False";
|
||||||
if (XtraFlags.UnderlineSetpoints == "True") fmtdata.ROData.UnderlineRo = "True";
|
if (XtraFlags.UnderlineSetpoints == "True") fmtdata.ROData.UnderlineRo = "True";
|
||||||
|
@ -10,9 +10,15 @@ namespace fmtxml
|
|||||||
private void AddCATADEVfmt(ref FormatData fmtdata)
|
private void AddCATADEVfmt(ref FormatData fmtdata)
|
||||||
{
|
{
|
||||||
fmtdata.ProcData.TitleLength = 45;
|
fmtdata.ProcData.TitleLength = 45;
|
||||||
|
// Fix Logic for CAPSPIfLastLower
|
||||||
|
fmtdata.ROData.CapRoIfLastLower = "False";
|
||||||
|
fmtdata.ROData.CapSPIfLastLower = "True";
|
||||||
}
|
}
|
||||||
private void AddCATfmt(ref FormatData fmtdata) // Catawba
|
private void AddCATfmt(ref FormatData fmtdata) // Catawba
|
||||||
{
|
{
|
||||||
|
// Fix Logic for CAPSPIfLastLower
|
||||||
|
fmtdata.ROData.CapRoIfLastLower = "False";
|
||||||
|
fmtdata.ROData.CapSPIfLastLower = "True";
|
||||||
//fmtdata.SectData.StepSectionData.StpSectLayData.Separator.SeparatorLocation = 2;
|
//fmtdata.SectData.StepSectionData.StpSectLayData.Separator.SeparatorLocation = 2;
|
||||||
fmtdata.SectData.StepSectionData.StpSectLayData.ColT = -3;
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColT = -3;
|
||||||
fmtdata.SectData.StepSectionData.StpSectLayData.WidT = 390;
|
fmtdata.SectData.StepSectionData.StpSectLayData.WidT = 390;
|
||||||
|
@ -9,6 +9,9 @@ namespace fmtxml
|
|||||||
{
|
{
|
||||||
private void AddMCGfmt(ref FormatData fmtdata) // McGuire
|
private void AddMCGfmt(ref FormatData fmtdata) // McGuire
|
||||||
{
|
{
|
||||||
|
// Fix Logic for CAPSPIfLastLower
|
||||||
|
fmtdata.ROData.CapRoIfLastLower = "False";
|
||||||
|
fmtdata.ROData.CapSPIfLastLower = "True";
|
||||||
//fmtdata.SectData.StepSectionData.StpSectLayData.Separator.SeparatorLocation = 2;
|
//fmtdata.SectData.StepSectionData.StpSectLayData.Separator.SeparatorLocation = 2;
|
||||||
fmtdata.SectData.StepSectionData.StpSectLayData.ColT = -3;
|
fmtdata.SectData.StepSectionData.StpSectLayData.ColT = -3;
|
||||||
fmtdata.SectData.StepSectionData.StpSectLayData.WidT = 390;
|
fmtdata.SectData.StepSectionData.StpSectLayData.WidT = 390;
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user