From 90e25f3fcfbf10157c06f21f2ebbd9b4c64b79cd Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Thu, 30 Jan 2025 09:09:39 -0500 Subject: [PATCH 1/2] C2019-025_Ability-to-Toggle-Replace-Words-3 --- .../Extension/DisplayText.cs | 42 +++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs index 43a56584..0dca5503 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs @@ -12,6 +12,12 @@ using JR.Utils.GUI.Forms; namespace VEPROMS.CSLA.Library { public enum E_FieldToEdit { StepText, Text, Number, PSI }; + public enum ReplaceWords + { + Inherit = 0, + Show = 1, + DoNotShow = 2 + } public class DisplayText { private static readonly log4net.ILog _MyLog = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); @@ -57,19 +63,48 @@ namespace VEPROMS.CSLA.Library } // C2029-025 Show or hide replace words. Can highlight replace words in editor. + //private bool ShwRplWdsIndex(ItemInfo _MyItemInfo) + //{ + // StepConfig sc = _MyItemInfo.MyConfig as StepConfig; + // int setting = sc.Step_ShwRplWdsIndex; + // switch (setting) + // { + // case 2: + // return false; + // break; + // case 1: + // return true; + // break; + // case 0: + // //SectionConfig sc2 = _MyItemInfo.ActiveParent.MyConfig as SectionConfig; + // SectionConfig sc2 = _MyItemInfo.ActiveSection.MyConfig as SectionConfig; + // if (sc2 == null || sc2.Section_ShwRplWords == "Y") + // { + // return true; + // } + // else + // { + // return false; + // } + // break; + // default: + // return false; + // break; + // } + //} private bool ShwRplWdsIndex(ItemInfo _MyItemInfo) { StepConfig sc = _MyItemInfo.MyConfig as StepConfig; int setting = sc.Step_ShwRplWdsIndex; switch (setting) { - case 2: + case (int)ReplaceWords.DoNotShow: return false; break; - case 1: + case (int)ReplaceWords.Show: return true; break; - case 0: + case (int)ReplaceWords.Inherit: //SectionConfig sc2 = _MyItemInfo.ActiveParent.MyConfig as SectionConfig; SectionConfig sc2 = _MyItemInfo.ActiveSection.MyConfig as SectionConfig; if (sc2 == null || sc2.Section_ShwRplWords == "Y") @@ -86,6 +121,7 @@ namespace VEPROMS.CSLA.Library break; } } + private Item _MyItem; private string EditText { -- 2.47.2 From b7aa85f4fcd31a0d95baf3ab74babee1d07abe33 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Thu, 30 Jan 2025 09:22:51 -0500 Subject: [PATCH 2/2] C2019-025_Ability-to-Toggle-Replace-Words-3 --- .../Extension/DisplayText.cs | 32 +------------------ 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs index 0dca5503..b8798d29 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DisplayText.cs @@ -61,37 +61,7 @@ namespace VEPROMS.CSLA.Library if (sc == null) return "N"; return sc.Section_ShwRplWords; } - - // C2029-025 Show or hide replace words. Can highlight replace words in editor. - //private bool ShwRplWdsIndex(ItemInfo _MyItemInfo) - //{ - // StepConfig sc = _MyItemInfo.MyConfig as StepConfig; - // int setting = sc.Step_ShwRplWdsIndex; - // switch (setting) - // { - // case 2: - // return false; - // break; - // case 1: - // return true; - // break; - // case 0: - // //SectionConfig sc2 = _MyItemInfo.ActiveParent.MyConfig as SectionConfig; - // SectionConfig sc2 = _MyItemInfo.ActiveSection.MyConfig as SectionConfig; - // if (sc2 == null || sc2.Section_ShwRplWords == "Y") - // { - // return true; - // } - // else - // { - // return false; - // } - // break; - // default: - // return false; - // break; - // } - //} + // C2019-025 c2025-010 Ability-to-Toggle-Replace-Words private bool ShwRplWdsIndex(ItemInfo _MyItemInfo) { StepConfig sc = _MyItemInfo.MyConfig as StepConfig; -- 2.47.2