From 5bac79bf8e49b07b9bec4ad052a3143a43a2b617 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 7 Nov 2019 15:55:58 +0000 Subject: [PATCH] =?UTF-8?q?Code=20cleanup=20=E2=80=93=20B2019-133=20?= =?UTF-8?q?=E2=80=93=20continuation=20of=20bug=20fix=20for=20B2018-057=20t?= =?UTF-8?q?o=20replace=20non-breaking=20hyphen=20with=20a=20dash.=20=20Thi?= =?UTF-8?q?s=20was=20done=20for=20procedure=20specific=20information=20but?= =?UTF-8?q?=20not=20for=20the=20folder=20and=20procedure=20set=20specific?= =?UTF-8?q?=20information=20logic.=20=20Was=20found=20during=20Barakah=20A?= =?UTF-8?q?larm=20format=20development,=20but=20ended=20up=20not=20needing?= =?UTF-8?q?=20this=20logic=20for=20their=20current=20format.=20C2019-043?= =?UTF-8?q?=20Added=20UseDashGreaterLessThenForArrowsInROValue=20flag=20to?= =?UTF-8?q?=20convert=20=E2=80=9C->=E2=80=9D=20to=20the=20right=20arrow=20?= =?UTF-8?q?symbol=20and=20=E2=80=9C<-=E2=80=9C=20to=20the=20left=20arrow?= =?UTF-8?q?=20symbol=20in=20RO=20return=20values?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS User Interface/frmSI.cs | 7 ++++--- PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs | 9 +++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/PROMS/VEPROMS User Interface/frmSI.cs b/PROMS/VEPROMS User Interface/frmSI.cs index 3311b51d..116e446a 100644 --- a/PROMS/VEPROMS User Interface/frmSI.cs +++ b/PROMS/VEPROMS User Interface/frmSI.cs @@ -71,7 +71,8 @@ namespace VEPROMS tb.Enter += new System.EventHandler(this.FieldStepRTB_Enter); tb.ContextMenuStrip = contextMenuStrip1; // B2017-024 clipboard context menu // see if config has data for this field, i.e. search for the 'name' - string val = DoFolder ? folderConfig.GetValue("SI", fld.name) : dvConfig.GetValue("SI", fld.name); + // B2019-133 continuation of B2018-057 Replace non-breaking hyphen with hyphen. + string val = (DoFolder ? folderConfig.GetValue("SI", fld.name) : dvConfig.GetValue("SI", fld.name)).Replace("\\u8209?", "-"); DisplayText dt = new DisplayText(val, new VE_Font("Arial", 10, E_Style.None, 12), false); StringBuilder sb = new StringBuilder(); sb.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 Arial;}"); @@ -146,9 +147,9 @@ namespace VEPROMS { isDirty = true; if (DoFolder) - folderConfig.SetValue("SI", fld.name, newval); + folderConfig.SetValue("SI", fld.name, newval.Replace("\\u8209?", "-"));// B2019-133 continuation of B2018-057 Replace non-breaking hyphen with hyphen. else - dvConfig.SetValue("SI", fld.name, newval); + dvConfig.SetValue("SI", fld.name, newval.Replace("\\u8209?", "-"));// B2019-133 continuation of B2018-057 Replace non-breaking hyphen with hyphen. } } else if (fld.type.ToLower() == "logical") diff --git a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs index b8f63e86..8c8a761f 100644 --- a/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs +++ b/PROMS/VEPROMS.CSLA.Library/Format/PlantFormat.cs @@ -2398,6 +2398,15 @@ namespace VEPROMS.CSLA.Library return LazyLoad(ref _UseTildaPoundCharsForSuperSubScriptInROValues, "@UseTildaPoundCharsForSuperSubScriptInROValues"); } } + // C2019-043 will convert "->" to the right arrow symbol and "<-" to the left arrow symbol for RO return values + private LazyLoad _UseDashGreaterLessThenForArrowsInROValue; + public bool UseDashGreaterLessThenForArrowsInROValue + { + get + { + return LazyLoad(ref _UseDashGreaterLessThenForArrowsInROValue, "@UseDashGreaterLessThenForArrowsInROValue"); + } + } private LazyLoad _ConvertUnderscoreToUnderline; public bool ConvertUnderscoreToUnderline {