void SearchPhrase(string phrase)
{
phrase = phrase.ToLower();
phrase = phrase.Trim();
if (phrase == "")
return;
for (int i = scrollBar.Value + 1; i < phrases; i++)
{
if (asMain[i].ToLower().Contains(phrase) || asAlt[i].ToLower().Contains(phrase))
{
scrollBar.Value = Math.Min(i, phrases - TEXTBOXES);
return;
}
}
for (int i = 0; i < scrollBar.Value + 1; i++)
{
if (asMain[i].ToLower().Contains(phrase) || asAlt[i].ToLower().Contains(phrase))
{
scrollBar.Value = Math.Min(i, phrases - TEXTBOXES);
return;
}
}
}