diff --git a/PROMS/Volian.Controls.Library/DisplayText.cs b/PROMS/Volian.Controls.Library/DisplayText.cs index 7b2b3285..4e9646da 100644 --- a/PROMS/Volian.Controls.Library/DisplayText.cs +++ b/PROMS/Volian.Controls.Library/DisplayText.cs @@ -220,9 +220,18 @@ namespace Volian.Controls.Library text = DoReplaceWords2(text); if (_MyItemInfo != null) { - text = DoSearchAndReplace(text, "", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ID); + text = Regex.Replace(text, @"\", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase); + text = Regex.Replace(text, @"\<(U(-|\\u8209\?)ID)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase); + text = Regex.Replace(text, @"\<(U(-|\\u8209\?)NAME)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Name, RegexOptions.IgnoreCase); + text = Regex.Replace(text, @"\<(U(-|\\u8209\?)TEXT)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Text, RegexOptions.IgnoreCase); + text = Regex.Replace(text, @"\<(U(-|\\u8209\?)NUMBER)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase); + text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER ID)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_ID, RegexOptions.IgnoreCase); + text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER NAME)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Name, RegexOptions.IgnoreCase); + text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER TEXT)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Text, RegexOptions.IgnoreCase); + text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER NUMBER)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Number, RegexOptions.IgnoreCase); + //text = DoSearchAndReplace(text, "", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ID); text = text.Replace(@"", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID); - text = text.Replace("", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number); + //text = text.Replace("", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number); } // Adjust RO display if (ROsShouldBeAdjusted) @@ -356,7 +365,7 @@ namespace Volian.Controls.Library int dbid = System.Convert.ToInt32(myMatch.Groups[2].Value.Substring(0, 4), 16); int rodbid = int.Parse(myMatch.Groups[3].Value); ROFstInfo myROFst = _MyItemInfo.MyDocVersion.GetROFst(rodbid); - bool isSetpoint=myROFst.IsSetpointDB(dbid); + bool isSetpoint=myROFst.IsSetpointDB(dbid, _MyItemInfo.MyDocVersion); string newvalue = DoROFormatFlags(g.ToString(), beforeRO, afterRO, isSetpoint); newvalue = DoROReplaceWords(_MyFormat.PlantFormat.FormatData.SectData.ReplaceStrList, newvalue, _MyItemInfo.IsHigh); if (isSetpoint) newvalue = ReplaceSpaceWithHardspace(newvalue); @@ -1719,7 +1728,7 @@ namespace Volian.Controls.Library int dbid = System.Convert.ToInt32(myMatch.Groups[2].Value.Substring(0, 4), 16); int rodbid = int.Parse(myMatch.Groups[3].Value); ROFstInfo myROFst = myDocVersion.GetROFst(rodbid); - return myROFst.IsSetpointDB(dbid); + return myROFst.IsSetpointDB(dbid, myDocVersion); } return false; }