C2020-010: For search: ‘Accessory Sections’ to ‘Word Sections’ and disable Word Sections for Transition Searches

This commit is contained in:
2020-05-13 12:28:53 +00:00
parent b473844dcc
commit 9b363aa847
2 changed files with 157 additions and 151 deletions

View File

@@ -164,6 +164,7 @@ namespace Volian.Controls.Library
void tabSearchTypes_SelectedTabChanged(object sender, TabStripTabChangedEventArgs e)
{
wordSectionTreeNode.Enabled = true;
btnSearch.Enabled = true;
if (e.NewTab == tabROSearch)
{
@@ -171,6 +172,8 @@ namespace Volian.Controls.Library
}
else if (e.NewTab == tabTranSearch)
{
wordSectionTreeNode.Enabled = false; // C2020-010: Disable Word Section choice for Transition search
wordSectionTreeNode.Checked = false;
btnSearch.Enabled = (cbxTranCategory.Items.Count > 0); // B2017-038 disable search button if no format selected
//enable-disable doc version nodes based on version type if selected
if (cbxTranVersion.SelectedIndex > -1)
@@ -408,6 +411,7 @@ namespace Volian.Controls.Library
{
TmrRefresh.Enabled = true;
}
DevComponents.AdvTree.Node wordSectionTreeNode = null; // C2020-010: Disable Word Section choice for Transition search
public void AdvTreeStepTypesFillIn()
{
DevComponents.AdvTree.Node topnode = new DevComponents.AdvTree.Node();
@@ -433,15 +437,17 @@ namespace Volian.Controls.Library
{
DevComponents.AdvTree.Node newnode;
advTreeStepTypes.Nodes.Clear();
// Add a dummy node for searching Accessory Sections (MS Word sections)
// Add a dummy node for searching Word Sections (MS Word sections)
//newnode = new DevComponents.AdvTree.Node();
//newnode.Text = "Accessory Sections";
//newnode.Text = "Word Sections";
//newnode.Selectable = true;
//newnode.CheckBoxAlignment = DevComponents.AdvTree.eCellPartAlignment.NearCenter;
//newnode.CheckBoxStyle = eCheckBoxStyle.CheckBox;
//newnode.CheckBoxThreeState = false;
//newnode.CheckBoxVisible = true;
newnode = NewAdvTreeNode("Accessory Sections", true, true);
newnode = NewAdvTreeNode("Word Sections", true, true); // C2020-010: Change Accessory Sections to Word Sections
wordSectionTreeNode = newnode;
wordSectionTreeNode.Enabled = !(tabSearchTypes.SelectedTab == tabTranSearch);
advTreeStepTypes.Nodes.Add(newnode);
foreach (StepDataRetval sdr in lstSrchStpTypes)
{
@@ -1854,10 +1860,10 @@ namespace Volian.Controls.Library
n.Style = DevComponents.AdvTree.NodeStyles.Apple;
if (sd == null)
{
if (!lstCheckedStepTypesStr.Contains("Accessory Sections"))
if (!lstCheckedStepTypesStr.Contains("Word Sections"))
{
lstCheckedStepTypes.Add(0); //use zero to identify attachment search
lstCheckedStepTypesStr.Add("Accessory Sections");
lstCheckedStepTypesStr.Add("Word Sections");
}
}
else
@@ -1874,7 +1880,7 @@ namespace Volian.Controls.Library
n.Style = null;
if (sd == null)
{
lstCheckedStepTypesStr.Remove("Accessory Sections");
lstCheckedStepTypesStr.Remove("Word Sections");
lstCheckedStepTypes.Remove(0);
}
else