Fixed ROLookup to handle HIGH# and LOW# when looking for an RO Alarm.

Fixed [xB3] and [xB2] characters in the RO_Lookup return values.
This commit is contained in:
Rich 2013-02-06 16:37:16 +00:00
parent 9e35e1ec4b
commit e0932b5bf6

View File

@ -776,9 +776,13 @@ namespace Volian.Print.Library
private string ROLookup(string accpageid, string multiid, string deflt) private string ROLookup(string accpageid, string multiid, string deflt)
{ {
ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.ROFSTLookup; ROFSTLookup myLookup = MySection.MyDocVersion.DocVersionAssociations[0].MyROFst.ROFSTLookup;
string val = myLookup.GetROValueByAccPagID("<" + accpageid + "." + multiid + ">", MySection.MyDocVersion.DocVersionConfig.RODefaults_setpointprefix, MySection.MyDocVersion.DocVersionConfig.RODefaults_graphicsprefix); 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) if (val != null)
{ {
val = val.Replace("[xB3]", "\xB3");
val = val.Replace("[xB2]", "\xB2");
if (deflt.StartsWith("[") && !val.StartsWith("[")) val = "[" + val + "]"; if (deflt.StartsWith("[") && !val.StartsWith("[")) val = "[" + val + "]";
if (deflt.EndsWith("*")) val = val + "*"; if (deflt.EndsWith("*")) val = val + "*";
return val; return val;