Forex_Strategy_Builder.Edit_Translation.SearchPhrase C# (CSharp) Method

SearchPhrase() static private method

Searches a phrase.
static private SearchPhrase ( string phrase ) : void
phrase string
return void
        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;
                }
            }
        }