C2025-005 PROMS – Searching Step Elements

When searching for step elements (the Find Selected Step Elements option is selected) and multiple procedure sets are selected, but the procedure sets use different formats, PROMS puts a message in the Results area that says "folders selected contain multiple formats". Need to expand this messaging to provide more clear information regarding which formats are causing the issue, so that they can more easily decide which sets to de-select rather than doing so randomly.  There is also a refresh issue where deselecting everything, it will not always refresh properly.
This commit is contained in:
Matthew Schill 2025-01-29 15:26:29 -05:00
parent fe268b6122
commit 057915baaa

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();
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;
}
}