~Added option for selecting all procedure sets when performing a global search #14
@ -40,6 +40,9 @@ namespace Volian.Controls.Library
|
|||||||
// B2022-026 RO Memeory reduction logic change - defined dummy node text variable to ensure consistancy
|
// B2022-026 RO Memeory reduction logic change - defined dummy node text variable to ensure consistancy
|
||||||
private const string DummyNodeText = "VLN_DUMMY_NODE";
|
private const string DummyNodeText = "VLN_DUMMY_NODE";
|
||||||
|
|
||||||
|
// B2023-076: Adding option to select all procedure sets
|
||||||
|
private const string SelectAllProcedureSetsText = "Select All Procedure Sets";
|
||||||
|
|
||||||
// B2019-161 When tracking timing time this action
|
// B2019-161 When tracking timing time this action
|
||||||
private static VolianTimer _TimeActivity = new VolianTimer("DisplaySearch _TmrRefresh_Tick", 399);
|
private static VolianTimer _TimeActivity = new VolianTimer("DisplaySearch _TmrRefresh_Tick", 399);
|
||||||
private Timer _TmrRefresh = null;
|
private Timer _TmrRefresh = null;
|
||||||
@ -402,7 +405,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
public void tabSearchTypes_SelectedTabChanged(object sender, TabStripTabChangedEventArgs e)
|
public void tabSearchTypes_SelectedTabChanged(object sender, TabStripTabChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if(wordSectionTreeNode != null) //B2020-070 NULL reference check
|
if (wordSectionTreeNode != null) //B2020-070 NULL reference check
|
||||||
wordSectionTreeNode.Enabled = true;
|
wordSectionTreeNode.Enabled = true;
|
||||||
btnSearch.Enabled = true;
|
btnSearch.Enabled = true;
|
||||||
xpSetToSearch.Enabled = true;
|
xpSetToSearch.Enabled = true;
|
||||||
@ -575,7 +578,7 @@ namespace Volian.Controls.Library
|
|||||||
string svid = null;
|
string svid = null;
|
||||||
if (fi.FolderDocVersionCount > 0)
|
if (fi.FolderDocVersionCount > 0)
|
||||||
svid = fi.FolderDocVersions[0].VersionID.ToString();
|
svid = fi.FolderDocVersions[0].VersionID.ToString();
|
||||||
if (svid !=null && !versionList.Contains(svid))
|
if (svid != null && !versionList.Contains(svid))
|
||||||
uncheckNodes.Add(n);
|
uncheckNodes.Add(n);
|
||||||
else
|
else
|
||||||
n.Enabled = true;
|
n.Enabled = true;
|
||||||
@ -780,6 +783,16 @@ namespace Volian.Controls.Library
|
|||||||
buildStepTypePannelTitle();
|
buildStepTypePannelTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AllProcedureSets_clicked(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Node pNode = sender as Node;
|
||||||
|
foreach (Node node in advTreeProcSets.Nodes)
|
||||||
|
{
|
||||||
|
node.Checked = pNode.Checked;
|
||||||
|
CheckTreeNodeChildren(node.Nodes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void AllSectionTypes_clicked(object sender, EventArgs e)
|
private void AllSectionTypes_clicked(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Node pNode = sender as Node;
|
Node pNode = sender as Node;
|
||||||
@ -816,6 +829,14 @@ namespace Volian.Controls.Library
|
|||||||
advTreeProcSets.Nodes.Add(topnode);
|
advTreeProcSets.Nodes.Add(topnode);
|
||||||
//advTreeProcSets.AfterNodeInsert += new TreeNodeCollectionEventHandler(advTreeProcSets_AfterNodeInsert);
|
//advTreeProcSets.AfterNodeInsert += new TreeNodeCollectionEventHandler(advTreeProcSets_AfterNodeInsert);
|
||||||
|
|
||||||
|
//B2023-076: Adding option to select all procedure sets
|
||||||
|
DevComponents.AdvTree.Node selectAllNode = new Node();
|
||||||
|
selectAllNode.Text = SelectAllProcedureSetsText;
|
||||||
|
selectAllNode.Tag = SelectAllProcedureSetsText;
|
||||||
|
selectAllNode.CheckBoxVisible = true;
|
||||||
|
selectAllNode.NodeClick += new EventHandler(AllProcedureSets_clicked);
|
||||||
|
topnode.Nodes.Add(selectAllNode);
|
||||||
|
|
||||||
if (fi.SortedChildFolders != null)
|
if (fi.SortedChildFolders != null)
|
||||||
{
|
{
|
||||||
foreach (FolderInfo fic in fi.SortedChildFolders)
|
foreach (FolderInfo fic in fi.SortedChildFolders)
|
||||||
@ -1087,7 +1108,7 @@ namespace Volian.Controls.Library
|
|||||||
newnode.CheckBoxVisible = chxbxvisable;
|
newnode.CheckBoxVisible = chxbxvisable;
|
||||||
|
|
||||||
// Set newnode.Checked = parent.Checked
|
// Set newnode.Checked = parent.Checked
|
||||||
if(newnode.Parent != null)
|
if (newnode.Parent != null)
|
||||||
newnode.Checked = newnode.Parent.Checked;
|
newnode.Checked = newnode.Parent.Checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1330,7 +1351,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
bool same = true;
|
bool same = true;
|
||||||
// get the first rofstId for comparing to the rest:
|
// get the first rofstId for comparing to the rest:
|
||||||
int rofstId = (dvilTmp.Count > 0)? (dvilTmp[0].DocVersionAssociations != null && dvilTmp[0].DocVersionAssociations.Count > 0) ? dvilTmp[0].DocVersionAssociations[0].ROFstID: -1 : -1;
|
int rofstId = (dvilTmp.Count > 0) ? (dvilTmp[0].DocVersionAssociations != null && dvilTmp[0].DocVersionAssociations.Count > 0) ? dvilTmp[0].DocVersionAssociations[0].ROFstID : -1 : -1;
|
||||||
|
|
||||||
// for remaining folder/docversions in the list, check if they have an associated rofst & if so, if it is the same as the first in list.
|
// for remaining folder/docversions in the list, check if they have an associated rofst & if so, if it is the same as the first in list.
|
||||||
for (int i = 1; i < dvilTmp.Count; i++)
|
for (int i = 1; i < dvilTmp.Count; i++)
|
||||||
@ -1945,7 +1966,7 @@ namespace Volian.Controls.Library
|
|||||||
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "all step types");
|
//TypesSelected = "Searched Step Types: " + ((typstr != null) ? typstr : "all step types");
|
||||||
//TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types";
|
//TypesSelected = (typstr != null) ? "Searched Step Types: " + typstr : "Searched All Step Types";
|
||||||
string unitPrefix = string.Empty;
|
string unitPrefix = string.Empty;
|
||||||
if(Mydocversion != null)
|
if (Mydocversion != null)
|
||||||
unitPrefix = Mydocversion.DocVersionConfig.Unit_ProcedureNumber;
|
unitPrefix = Mydocversion.DocVersionConfig.Unit_ProcedureNumber;
|
||||||
if (unitPrefix.EndsWith("#"))
|
if (unitPrefix.EndsWith("#"))
|
||||||
unitPrefix = unitPrefix.Replace("#", string.Empty);
|
unitPrefix = unitPrefix.Replace("#", string.Empty);
|
||||||
@ -2304,6 +2325,8 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if the selected folder has a docversion, handle it:
|
// if the selected folder has a docversion, handle it:
|
||||||
|
if (n.Tag != SelectAllProcedureSetsText)
|
||||||
|
{
|
||||||
FolderInfo fi = (FolderInfo)n.Tag;
|
FolderInfo fi = (FolderInfo)n.Tag;
|
||||||
RefreshLstCheckedDocVersions();
|
RefreshLstCheckedDocVersions();
|
||||||
RefreshStepTypes();// Refresh Step Types after Working Draft is checked.
|
RefreshStepTypes();// Refresh Step Types after Working Draft is checked.
|
||||||
@ -2313,6 +2336,7 @@ namespace Volian.Controls.Library
|
|||||||
Mydocversion = fi.FolderDocVersions[0];
|
Mydocversion = fi.FolderDocVersions[0];
|
||||||
StartAdvTreeStepTypesFillIn();// B2016-258 Hang after selecting a procedure if the Step Type panel is open on the search panel
|
StartAdvTreeStepTypesFillIn();// B2016-258 Hang after selecting a procedure if the Step Type panel is open on the search panel
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
SetupContextMenu();
|
SetupContextMenu();
|
||||||
buildSetToSearchPanelTitle();
|
buildSetToSearchPanelTitle();
|
||||||
@ -2361,6 +2385,8 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
else // it has not been expanded process all below.
|
else // it has not been expanded process all below.
|
||||||
{
|
{
|
||||||
|
//B2023-076: Do not process the "Select All" node
|
||||||
|
if (tn.Text != SelectAllProcedureSetsText)
|
||||||
AddAllChildVersions(fi);
|
AddAllChildVersions(fi);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2643,7 +2669,7 @@ namespace Volian.Controls.Library
|
|||||||
else //lstCheckedStepTypes.Count > 0
|
else //lstCheckedStepTypes.Count > 0
|
||||||
{
|
{
|
||||||
// show how many selected whether panel is expanded or not
|
// show how many selected whether panel is expanded or not
|
||||||
xpStepTypes.TitleText = string.Format("{0} Step Element{1} Selected", lstCheckedStepTypes.Count, (lstCheckedStepTypes.Count > 1)?"s":string.Empty); // B2018-132 changed second {0} to {1}
|
xpStepTypes.TitleText = string.Format("{0} Step Element{1} Selected", lstCheckedStepTypes.Count, (lstCheckedStepTypes.Count > 1) ? "s" : string.Empty); // B2018-132 changed second {0} to {1}
|
||||||
xpStepTypes.TitleStyle.BackColor1.Color = Color.PapayaWhip;
|
xpStepTypes.TitleStyle.BackColor1.Color = Color.PapayaWhip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3278,7 +3304,7 @@ namespace Volian.Controls.Library
|
|||||||
ICollection<ItemInfo> srchres = lbSrchResults.DataSource as ICollection<ItemInfo>;
|
ICollection<ItemInfo> srchres = lbSrchResults.DataSource as ICollection<ItemInfo>;
|
||||||
// C2020-033: If on the Incoming Transitions tab, use that list.
|
// C2020-033: If on the Incoming Transitions tab, use that list.
|
||||||
if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[4]) srchres = lbSrchResultsIncTrans.DataSource as ICollection<ItemInfo>;
|
if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[4]) srchres = lbSrchResultsIncTrans.DataSource as ICollection<ItemInfo>;
|
||||||
OnPrintRequest(new DisplaySearchEventArgs(ReportTitle, TypesSelected, SearchString, srchres,sortedBy));
|
OnPrintRequest(new DisplaySearchEventArgs(ReportTitle, TypesSelected, SearchString, srchres, sortedBy));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void panSearchButtons_Resize(object sender, EventArgs e)
|
private void panSearchButtons_Resize(object sender, EventArgs e)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user