Compare commits
	
		
			2 Commits
		
	
	
		
			C2025-005
			...
			C2019-025_
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b7aa85f4fc | |||
| 90e25f3fcf | 
@@ -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);
 | 
			
		||||
@@ -55,21 +61,20 @@ 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.
 | 
			
		||||
		// C2019-025 c2025-010 Ability-to-Toggle-Replace-Words
 | 
			
		||||
		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 +91,7 @@ namespace VEPROMS.CSLA.Library
 | 
			
		||||
					break;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		private Item _MyItem;
 | 
			
		||||
		private string EditText
 | 
			
		||||
		{
 | 
			
		||||
 
 | 
			
		||||
@@ -2362,17 +2362,6 @@ namespace Volian.Controls.Library
 | 
			
		||||
				if (n.Nodes != null && n.Nodes.Count > 0 && n.Nodes[0].Text != DummyNodeText) CheckTreeNodeChildren(n.Nodes);
 | 
			
		||||
				checkingChildren = false;
 | 
			
		||||
			}
 | 
			
		||||
			else
 | 
			
		||||
            {
 | 
			
		||||
				//C2025-005 Find Step Elements
 | 
			
		||||
				//uncheck the parents if there are any
 | 
			
		||||
				DevComponents.AdvTree.Node tmp_n = n;
 | 
			
		||||
				while (tmp_n.Parent != null)
 | 
			
		||||
				{
 | 
			
		||||
					tmp_n = tmp_n.Parent;
 | 
			
		||||
					tmp_n.Checked = false;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// if the selected folder has a docversion, handle it:
 | 
			
		||||
			if (n.Tag != SelectAllProcedureSetsText)
 | 
			
		||||
@@ -2390,26 +2379,6 @@ namespace Volian.Controls.Library
 | 
			
		||||
 | 
			
		||||
			SetupContextMenu();
 | 
			
		||||
			buildSetToSearchPanelTitle();
 | 
			
		||||
 | 
			
		||||
			//C2025-005 Find Step Elements
 | 
			
		||||
			//Need to refresh the Doc List and Available Step Types
 | 
			
		||||
			//if All Procedure Sets was selected
 | 
			
		||||
			if (n.Tag == SelectAllProcedureSetsText)
 | 
			
		||||
			{
 | 
			
		||||
				if (n.Checked)
 | 
			
		||||
				{
 | 
			
		||||
					checkingChildren = true;
 | 
			
		||||
					foreach (Node node in advTreeProcSets.Nodes[0].Nodes)
 | 
			
		||||
					{
 | 
			
		||||
						node.Checked = true;
 | 
			
		||||
						CheckTreeNodeChildren(node.Nodes);
 | 
			
		||||
					}
 | 
			
		||||
					checkingChildren = false;
 | 
			
		||||
				}
 | 
			
		||||
				RefreshLstCheckedDocVersions();
 | 
			
		||||
				RefreshStepTypes();
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// check all folder nodes below this
 | 
			
		||||
@@ -2483,19 +2452,14 @@ namespace Volian.Controls.Library
 | 
			
		||||
			ResetStepTypes("....select a procedure set for types to appear...");
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		//C2025-005 Find Step Elements
 | 
			
		||||
		//improve messaging when multiple formats
 | 
			
		||||
		private void ResetStepTypes(params string[] strs)
 | 
			
		||||
		private void ResetStepTypes(string str)
 | 
			
		||||
		{
 | 
			
		||||
			advTreeStepTypes.Nodes.Clear();
 | 
			
		||||
			lstCheckedStepTypes.Clear();
 | 
			
		||||
			lstCheckedStepTypesStr.Clear();
 | 
			
		||||
			foreach (string str in strs)
 | 
			
		||||
			{
 | 
			
		||||
				Node newnode = new DevComponents.AdvTree.Node();
 | 
			
		||||
				newnode.Text = str;
 | 
			
		||||
				advTreeStepTypes.Nodes.Add(newnode);
 | 
			
		||||
			}
 | 
			
		||||
			Node newnode = new DevComponents.AdvTree.Node();
 | 
			
		||||
			newnode.Text = str;
 | 
			
		||||
			advTreeStepTypes.Nodes.Add(newnode);
 | 
			
		||||
			buildStepTypePannelTitle();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -2522,11 +2486,7 @@ namespace Volian.Controls.Library
 | 
			
		||||
			{
 | 
			
		||||
				if (formatName != dvi.ActiveFormat.Name)
 | 
			
		||||
				{
 | 
			
		||||
					//C2025-005 Find Step Elements
 | 
			
		||||
					//improve messaging when multiple formats
 | 
			
		||||
					string frmt1 = $"    Format is {formatName} before {dvi.MyFolder.Name}";
 | 
			
		||||
					string frmt2 = $"    which begins format: {dvi.ActiveFormat.Name}";
 | 
			
		||||
					ResetStepTypes("...folders selected include multiple formats.", frmt1, frmt2);
 | 
			
		||||
					ResetStepTypes("...folders selected include multiple formats");
 | 
			
		||||
					return;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user