B2021-100: RNO Only/Word Sections enabling/disabling of options
This commit is contained in:
parent
d503cf96f9
commit
99db97598d
@ -2058,7 +2058,10 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
buildStepTypePannelTitle();
|
buildStepTypePannelTitle();
|
||||||
|
// B2021-100: Enable/disable the RNO Only checkbox & WORD Sections tree node in Step Elements to Search.
|
||||||
|
// The only time the RNO Only checkbox is disabled is if the only selection in Step Elements to Search is WORD Sections.
|
||||||
|
cbxRnoOnly.Enabled = true;
|
||||||
|
if (OnlyWordSectTypeSel()) cbxRnoOnly.Checked = cbxRnoOnly.Enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void xpStepTypes_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
private void xpStepTypes_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
|
||||||
@ -2167,12 +2170,31 @@ namespace Volian.Controls.Library
|
|||||||
Clipboard.SetDataObject(myDO);
|
Clipboard.SetDataObject(myDO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private bool OnlyWordSectTypeSel()
|
||||||
|
{
|
||||||
|
// B2021-100: Enable/disable the RNO Only checkbox & WORD Sections tree node in Step Elements to Search.
|
||||||
|
// lstCheckedStepTypes[x] = 0 for Word sections:
|
||||||
|
if (lstCheckedStepTypes != null && lstCheckedStepTypes.Count == 1 && lstCheckedStepTypes[0] == 0) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
private void CbxRnoOnly_Click(object sender, System.EventArgs e)
|
private void CbxRnoOnly_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
// C2021-028: RNO Only search, disable Word section tree node:
|
// C2021-028: RNO Only search, disable Word section tree node:
|
||||||
wordSectionTreeNode.Enabled = !(tabSearchTypes.SelectedTab == tabTranSearch || !cbxRnoOnly.Checked);
|
// B2021 - 100: Enable / disable the RNO Only checkbox &WORD Sections tree node in Step Elements to Search.
|
||||||
|
if (tabSearchTypes.SelectedTab == tabTranSearch) return;
|
||||||
|
|
||||||
|
wordSectionTreeNode.Enabled = true;
|
||||||
|
if (!cbxRnoOnly.Checked) // checked turning on
|
||||||
|
{
|
||||||
|
// Set enabling on WORD Sections tree node in Step Elements to Search. If either no items are selected in tree or
|
||||||
|
// just WORD Section is selected, then disable the WORD Section tree node. Otherwise, i.e. other step types are selected
|
||||||
|
// in tree, thus they must be searched using RNO Only so need to disable anything.
|
||||||
|
wordSectionTreeNode.Enabled = !(OnlyWordSectTypeSel() || (lstCheckedStepTypes != null && lstCheckedStepTypes.Count == 0));
|
||||||
if (!wordSectionTreeNode.Enabled) wordSectionTreeNode.Checked = false;
|
if (!wordSectionTreeNode.Enabled) wordSectionTreeNode.Checked = false;
|
||||||
}
|
}
|
||||||
|
else // turning off - WORD Sections tree node is enabled.
|
||||||
|
wordSectionTreeNode.Enabled = true;
|
||||||
|
}
|
||||||
private void cmFndTxtPaste_Click(object sender, EventArgs e)
|
private void cmFndTxtPaste_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// Need to check which combo box activated the context menu so that we know where to take/put selected text
|
// Need to check which combo box activated the context menu so that we know where to take/put selected text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user