Battle_Script_Pro.Form1.PressedFindNew C# (CSharp) Method

PressedFindNew() private method

private PressedFindNew ( bool &search ) : void
search bool
return void
        private void PressedFindNew(out bool search)
        {
            int startIndex = 0;
            int endIndex = 0;
            int start = scripts[tabControl1.SelectedIndex].SelectionStart + scripts[tabControl1.SelectedIndex].SelectionLength;
            if (openFARForm.txtSearch.Text.Length > 0)
            {
                startIndex = FindMyText(openFARForm.txtSearch.Text.Trim(), start, scripts[tabControl1.SelectedIndex].Text.Length);
                if (startIndex == -1)
                {
                    start = 0;
                    startIndex = FindMyText(openFARForm.txtSearch.Text.Trim(), start, scripts[tabControl1.SelectedIndex].Text.Length);
                    if (startIndex == -1)
                    {
                        search = false;
                        return;
                    }
                }
            }
            if (startIndex >= 0)
            {
                endIndex = openFARForm.txtSearch.Text.Length;
                start = startIndex + endIndex;
            }
            search = true;
        }
Form1