コード例 #1
0
ファイル: Form1.cs プロジェクト: thefoofighter/M_View
 private void loadIMDBArrayListInfo(IMDb imdb, ArrayList list, TextBox txtBox)
 {
     txtBox.Clear();
     for (int i = 0; i < list.Count; i++)
     {
         txtBox.Text += list[i].ToString() + ", ";
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: thefoofighter/M_View
        private void nextSelection()
        {
            error = false;
            downloaded = true;
            counter++;
            for (int i = 0; i < paths.Length; i++)
            {
                if (counter == i)
                {

                    movieName = new DirectoryInfo(paths[i]).Name;
                    if (downloaded)
                    {
                        status.Text = statWorking + "| " + movieName + " |";
                    }
                    IMDb imdb = new IMDb(movieName, true);
                    ArrayList list = new ArrayList();

                    titleTb.Text = imdb.Title;
                    yearTb.Text = " "+imdb.Year;
                    runningTimeTb.Text = " " + imdb.Runtime;
                    ratingTb.Text = " " + imdb.Rating;
                    MpaaTb.Text = " "+imdb.MpaaRating;
                    imdbUrl = imdb.ImdbURL;

                    list = imdb.Genres;
                    loadIMDBArrayListInfo(imdb, list,genreTb);
                    list = imdb.Directors;
                    loadIMDBArrayListInfo(imdb, list, directorTb);
                    list = imdb.Writers;
                    loadIMDBArrayListInfo(imdb, list, writersTb);
                    list = imdb.Cast;
                    loadIMDBArrayListInfo(imdb, list, castTb);

                    plotTb.Text = imdb.Plot;
                    try
                    {
                        filmImgSrc.Load(imdb.Poster);
                    }
                    catch (Exception u)
                    {
                        MessageBox.Show("Couldn't load the Movie image!\nTry the Reload Button or make sure the folder name is an actual movie name!\n\nException Text : \n" + u.ToString(), "Image failed to load! Soz :(", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        error = true;
                    }
                }
                else if (counter >= paths.Length)
                {
                    counter = paths.Length - 1;
                }
            }
            downloaded = false;
            if (downloaded == false)
            {
                status.Text = statLoaded + "| " + movieName + " |";
            }
            if (error == true)
            {
                status.Text = statError;
            }
        }