예제 #1
0
        private void getMovies(string search)
        {
            frmMovieList myMovieList = new frmMovieList();

            myMovieList.SearchString = search;
            if (myMovieList.ShowDialog() == DialogResult.OK)
            {
                if (myMovieList.selectedMovie.Posters.Count > 0)
                {
                    frmCoverList myCoverList = new frmCoverList();
                    myCoverList.selectedMovie = myMovieList.selectedMovie;
                    if (myCoverList.ShowDialog() == DialogResult.OK)
                    {
                        myCoverList.selectedMovie.SelectedCover = myCoverList.selectedCover;
                        if (TvixInfo.UseFanart)
                        {
                            frmFanartList myFanartList = new frmFanartList();
                            myFanartList.selectedMovie = myCoverList.selectedMovie;

                            if (myFanartList.ShowDialog() == DialogResult.OK)
                            {
                            }
                        }
                        UpdateMovieBackground(myCoverList.selectedMovie);
                    }
                    myCoverList.Dispose();
                }
                else
                {
                    MovieProvider provider = TvixInfo.MovieProvider;

                    provider.Language = TvixInfo.Language;

                    provider.GetData(myMovieList.selectedMovie);
                    myMovieList.selectedMovie.Cover = p_theme[ItemType.VideoCover].Background.Image;

                    p_theme[ItemType.VideoBox].Background.Image = myMovieList.selectedMovie.Cover;
                    p_theme.ApplyBackgroundVideo(myMovieList.selectedMovie, CurrentFolderPath);
                    if (TvixInfo.AutoRenameMovie)
                    {
                        RenameMovie(myMovieList.selectedMovie.Title);
                    }
                    coverPic.Image = p_theme[ItemType.VideoBox];
                    //BackgroundBigPic.Image
                    loadFolderPic(CurrentFolderPath);
                    loadBackgroundPic(CurrentFolderPath);
                    provider.Dispose();
                }
            }
            myMovieList.Dispose();
        }
예제 #2
0
        private void BackgroundBigPic_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                currentMovie.LoadFromXml(CurrentFolderPath);

                frmCoverList myCoverList = new frmCoverList();
                myCoverList.selectedMovie = currentMovie;
                if (myCoverList.ShowDialog() == DialogResult.OK)
                {
                    myCoverList.selectedMovie.SelectedCover = myCoverList.selectedCover;
                    if (TvixInfo.UseFanart)
                    {
                        frmFanartList myFanartList = new frmFanartList();
                        myFanartList.selectedMovie = myCoverList.selectedMovie;
                        if (myFanartList.ShowDialog() == DialogResult.OK)
                        {
                        }
                    }
                    UpdateMovieBackground(myCoverList.selectedMovie);
                }
            }
            catch (FileNotFoundException ex)
            {
                //nothing to do... file "info.xml" not found...
            }

            //ImageManager _imgMan = new ImageManager();
            //String _folderPath = ((TreeNodePath)((folderBrowser).SelectedNode)).Path + "\\";

            //// définition du resize
            //ResizeFilter _resizeFilter = new ResizeFilter();

            //if (BackgroundBigPic.Width == 720)
            //{
            //    BackgroundBigPic.Width = 360;
            //    BackgroundBigPic.Height = 202;

            //}
            //else
            //{
            //    BackgroundBigPic.Width = 720;
            //    BackgroundBigPic.Height = 405;
            //}
            //_resizeFilter.Width = BackgroundBigPic.Width;
            //_resizeFilter.Height = BackgroundBigPic.Height;
            //_resizeFilter.KeepAspectRatio = false;

            //// chargement et resize de l'image
            //BackgroundBigPic.Image = _resizeFilter.ExecuteFilter(FromStream(_folderPath.Replace("\\\\", "\\") + p_folderBackgroundName));
        }