internal movieData chooseMovie(Movie m, List<movieData> movies)
        {
            movieData md = new movieData();
            md.Name = m.title;
            md.Year = m.year;
            if (movies.Count == 0) return md;
            if (movies.Count == 1) return movies[0];

            foreach (movieData movie in movies) {
                if (m.compareTitles(movie)) return movie;
            }

            SelectMovie movieDlg = new SelectMovie();
            movieDlg.Text = String.Format("Select movie for {0} ({1})", m.title, m.year);
            movieDlg.setMovieData(m);

            foreach (movieData movie in movies) {
                movieDlg.addMovie(movie);
            }

            if (movieDlg.ShowDialog() == DialogResult.OK) {
                md = movieDlg.selectedMovie;
            }
            movieDlg.Dispose();
            return md;
        }
        internal movieData chooseMovie(Movie m, List <movieData> movies)
        {
            movieData md = new movieData();

            md.Name = m.title;
            md.Year = m.year;
            if (movies.Count == 0)
            {
                return(md);
            }
            if (movies.Count == 1)
            {
                return(movies[0]);
            }

            foreach (movieData movie in movies)
            {
                if (m.compareTitles(movie))
                {
                    return(movie);
                }
            }

            SelectMovie movieDlg = new SelectMovie();

            movieDlg.Text = String.Format("Select movie for {0} ({1})", m.title, m.year);
            movieDlg.setMovieData(m);

            foreach (movieData movie in movies)
            {
                movieDlg.addMovie(movie);
            }

            if (movieDlg.ShowDialog() == DialogResult.OK)
            {
                md = movieDlg.selectedMovie;
            }
            movieDlg.Dispose();
            return(md);
        }