protected override void OnActivated(EventArgs e)
{
if (this.Scintilla.Selection.Length > 0)
{
this.chkSearchSelectionF.Enabled = true;
this.chkSearchSelectionR.Enabled = true;
}
else
{
this.chkSearchSelectionF.Enabled = false;
this.chkSearchSelectionR.Enabled = false;
this.chkSearchSelectionF.Checked = false;
this.chkSearchSelectionR.Checked = false;
}
// if they leave the dialog and come back any "Search Selection"
// range they might have had is invalidated
this._searchRange = null;
this.lblStatus.Text = string.Empty;
this.MoveFormAwayFromSelection();
base.OnActivated(e);
}