private void UpdateButtonState()
{
ConcordLine sel = (ConcordLine)m_cbLine.SelectedItem;
m_searchContentLabel.Text = ITextStrings.ConcordanceSearchTextLabel;
switch (sel.Line)
{
case ConcordanceLines.kGramCategory:
case ConcordanceLines.kWordCategory:
case ConcordanceLines.kTags:
m_cbSearchText.Enabled = true;
m_cbSearchText.Visible = true;
FillSearchComboList(sel.Line);
m_tbSearchText.Visible = m_btnRegExp.Visible = false;
DisableDetailedSearchControls();
if (sel.Line != ConcordanceLines.kTags)
m_searchContentLabel.Text = ITextStrings.ConcordanceSearchCatLabel;
else
m_searchContentLabel.Text = ITextStrings.ConcordanceSearchTagLabel;
break;
case ConcordanceLines.kBaseline:
SyncWritingSystemComboToSelectedLine(sel);
SetDefaultButtonState();
// the Baseline currently tries to match in an entire paragraph.
// so disable "at start" and "at end" and "whole item" matchers.
if (!m_rbtnAnywhere.Checked && !m_rbtnUseRegExp.Checked)
m_rbtnAnywhere.Checked = true;
m_rbtnAtEnd.Enabled = false;
m_rbtnAtStart.Enabled = false;
m_rbtnWholeItem.Enabled = false;
break;
default:
SyncWritingSystemComboToSelectedLine(sel);
SetDefaultButtonState();
break;
}
}