private void FindUpdate()
{
if (this.m_findposition >= 0 && this.m_findposition < this.m_findresults.Count)
{
DocFindResult result = this.m_findresults[this.m_findposition];
TreeNode tn = null;
if (result.Target.Name != null)
{
this.m_mapTree.TryGetValue(result.Target.Name.ToLower(), out tn);
this.Navigate(tn, result.Target);
if (result.Offset >= 0)
{
this.toolStripMenuItemViewText_Click(this, EventArgs.Empty);
this.textBoxHTML.Select(result.Offset, result.Length);
this.textBoxHTML.ScrollToCaret();
this.textBoxHTML.Focus();
}
}
}
this.toolStripButtonFindPrev.Enabled = (this.m_findposition > 0);
this.toolStripButtonFindNext.Enabled = (this.m_findposition < this.m_findresults.Count - 1 && this.m_findresults.Count > 0);
}