Merge pull request 'C2025-005 PROMS – Searching Step Elements' (#502) from C2025-005 into Development

good for testing phase
This commit is contained in:
John Jenko 2025-01-29 15:31:59 -05:00
commit d67e81d8a6

View File

@ -2362,6 +2362,17 @@ 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)
@ -2379,6 +2390,26 @@ 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
@ -2452,14 +2483,19 @@ namespace Volian.Controls.Library
ResetStepTypes("....select a procedure set for types to appear...");
}
private void ResetStepTypes(string str)
//C2025-005 Find Step Elements
//improve messaging when multiple formats
private void ResetStepTypes(params string[] strs)
{
advTreeStepTypes.Nodes.Clear();
lstCheckedStepTypes.Clear();
lstCheckedStepTypesStr.Clear();
Node newnode = new DevComponents.AdvTree.Node();
newnode.Text = str;
advTreeStepTypes.Nodes.Add(newnode);
foreach (string str in strs)
{
Node newnode = new DevComponents.AdvTree.Node();
newnode.Text = str;
advTreeStepTypes.Nodes.Add(newnode);
}
buildStepTypePannelTitle();
}
@ -2486,7 +2522,11 @@ namespace Volian.Controls.Library
{
if (formatName != dvi.ActiveFormat.Name)
{
ResetStepTypes("...folders selected include multiple formats");
//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);
return;
}
}