Battle_Script_Pro.Form1.PressedReplaceAll C# (CSharp) Method

PressedReplaceAll() private method

private PressedReplaceAll ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void PressedReplaceAll(object sender, EventArgs e)
        {
            bool search = true;
            bool firstTime = true;
            int start = 0;
            while (search)
            {
                if (!scripts[tabControl1.SelectedIndex].SelectedText.Equals(openFARForm.txtSearch.Text))
                {
                    NewPressedFind(out search, start, out start);
                }
                if (search)
                {
                    scripts[tabControl1.SelectedIndex].SelectedText = openFARForm.txtReplace.Text;
                    firstTime = false;
                }
                else
                {
                    if (firstTime)
                    {
                        MessageBox.Show("The requested string could not be found.");
                        return;
                    }
                }
            }
            scripts[tabControl1.SelectedIndex].Focus();
        }
Form1