Battle_Script_Pro.Form1.Goto C# (CSharp) Method

Goto() private method

private Goto ( ) : void
return void
        private void Goto()
        {
            Form3 newForm = new Form3();
            newForm.ShowDialog();
            int number = newForm.LineNumber;
            bool success = newForm.Success;
            if (success)
            {
                int j = 0;
                string text = scripts[tabControl1.SelectedIndex].Text;
                if (number > scripts[tabControl1.SelectedIndex].Lines.Length)
                {
                    number = scripts[tabControl1.SelectedIndex].Lines.Length;
                }
                for (int i = 1; i < number; i++)
                {
                    j = text.IndexOf('\n', j + 1);
                    if (j == -1)
                    {
                        break;
                    }
                }
                if (number > 1)
                {
                    scripts[tabControl1.SelectedIndex].Select(j + 1, 0);
                }
                else
                {
                    scripts[tabControl1.SelectedIndex].Select(j, 0);
                }
            }
        }
Form1