示例#1
0
        public static Dictionary <MovieBean, MovieBean> getImportedMovies(List <MovieBean> oldMovies)
        {
            BatchMovieImporter importer = new BatchMovieImporter();

            foreach (MovieBean bean in oldMovies)
            {
                importer.dictionary.Add(bean, bean);
            }

            importer.ShowDialog();
            return(importer.dictionary);
        }
示例#2
0
        private void moviesToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            //thinking a form with a progress bar
            //send through a copieed list of movies
            //retirn a dictioanary<old movie, newMovie>
            //then here, go through the dictionary and files.insert(old, new)
            //yeah, let's try that.

            Dictionary <MovieBean, MovieBean> d = BatchMovieImporter.getImportedMovies(files.movies);

            foreach (KeyValuePair <MovieBean, MovieBean> entry in d)
            {
                frmMain.files.insertMovie(entry.Key, entry.Value);
            }
            refreshMovies(null);
        }