diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs index bbcd72c9..2738ddb6 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs @@ -159,6 +159,65 @@ namespace VEPROMS.CSLA.Library // } // return null; //} + + public string GetTranslatedRoValue(string ROID16, bool DoCaret) + { + string retval = GetRoValue(ROID16); + retval = ReplaceUnicode(retval, DoCaret); + retval = ConvertFortranFormatToScienctificNotation(retval); + return retval.Replace("\r\n", @"\par "); + } + private string ReplaceUnicode(string s2, bool DoCaret) + { + string orig = s2; + s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days. + s2 = s2.Replace("\xa0", @"\u160?"); // hardspace + s2 = s2.Replace("\xb0", @"\'b0"); // degree + s2 = s2.Replace("\x7f", @"\u916?"); // delta + s2 = s2.Replace("\x2265", @"\u8805?"); // greater than or equal + s2 = s2.Replace("\x2264", @"\u8804?"); // less than or equal + s2 = s2.Replace("\xB1", @"\'b1"); // plus minus + s2 = s2.Replace("\x3A3", @"\u931?"); // sigma + s2 = s2.Replace("\x3C4", @"\u947?"); // gamma + s2 = s2.Replace("\xBD", @"\'bd"); // half + s2 = s2.Replace("\x25A0", @"\u9604?"); // accum 2584 + s2 = s2.Replace("\x7", @"\u9679?"); // bullet 25CF + s2 = s2.Replace("\x2248", @"\u8776?"); // approx eq + s2 = s2.Replace("\x2261", @"\u8773?"); // similar eq 2245 + s2 = s2.Replace("\xF7", @"\'f7"); // division + s2 = s2.Replace("\x221A", @"\u8730?"); // square root + s2 = s2.Replace("\x393", @"\u961?"); // rho 3C1 + s2 = s2.Replace("\x3C0", @"\u960?"); // pi + s2 = s2.Replace("\xb5", @"\u956?"); // micro 3BC (try e6, if not work try 109) + s2 = s2.Replace("\x3B4", @"\u948?"); // lower case delta + s2 = s2.Replace("\x3C3", @"\u963?"); // lower case sigma + s2 = s2.Replace("\xBC", @"\'bc"); // quarter + s2 = s2.Replace("\x3C6", @"\'d8"); // dist zero, D8 + s2 = s2.Replace("\xC9", @"\u274?"); // energy, 112 + s2 = s2.Replace("\xEC", @"\'ec"); // grave + s2 = s2.Replace("\x2502", @"\u9474?"); // bar + s2 = s2.Replace("\x3B5", @"\u949?"); // epsilon + s2 = s2.Replace("\x398", @"\u952?"); // theta, 3B8 + s2 = s2.Replace("\x221E", @"\u8857?"); // dot in oval, 2299 + s2 = s2.Replace("\xBF", @"\u964?"); // tau, 3C4 + s2 = s2.Replace("\x2310", @"\u9830?"); // diamond, 2666 + s2 = s2.Replace("\x2192", @"\u8594?"); + s2 = s2.Replace("\x2190", @"\u8592?"); + s2 = s2.Replace("\x2191", @"\u8593?"); + s2 = s2.Replace("\x2193", @"\u8595?"); + s2 = s2.Replace("\x2207", @"\u8711?"); + s2 = s2.Replace("\x2591", @"\'b0"); // Degree Symbol + s2 = s2.Replace("\xFF", @"\u8593?"); // Up Arrow + s2 = s2.Replace("\xD6", @"\u8595?"); // Down Arrow + + if (DoCaret) s2 = s2.Replace("^", @"\u916"); + // Convert dash to a non-breaking dash. This is a unicode character. + // This character will be used in veproms rather than a dash. + //if the dash is preceeded byte a token remove the space following the token + s2 = Regex.Replace(s2, @"(\\[^ \\?]*) \-", @"$1\u8209?"); + s2 = s2.Replace("-", @"\u8209?"); + return s2; + } // this only gets rochild values. Later we may want another // dictionary to get groups. public string GetRoValue(string ROID16)