//Searches for recurring Patterns
        private void FindPattern()
        {
            //gets the Bounds of the recurring Pattern
            Tuple <int, int> bounds = grid.FindPattern();

            //sets the status finished to true
            finished = true;

            //updates the patternStart and patternEnd Attributes
            patternStart = bounds.Item1;
            patternEnd   = bounds.Item2;

            //saves the UpdateForm Method as an action
            Action action = UpdateForm;

            //Calls the UpdateForm Function in the Main Thread
            this.Invoke(action);
        }