Ejemplo n.º 1
0
        /// <summary>
        /// called at the completion of a drop operation. we grab the list of media files
        /// and
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EpisodeMaintenance_DragDrop(object sender, DragEventArgs e)
        {
            MediaFileNameParser parser     = new MediaFileNameParser();
            List <MediaFile>    mediaItems = new List <MediaFile>();

            foreach (string fileName in GetMediaFiles(e))
            {
                MediaFile mfi = parser.Parse(fileName);
                if (mfi.FileType == MediaFileType.TvEpisode)
                {
                    if (IsCompatible(mfi, showDetails))
                    {
                        mediaItems.Add(mfi);
                    }
                }
            }
            TvEpisodeImportDialog importDialog = new TvEpisodeImportDialog();

            importDialog.MediaItemsSelected += new SelectedMediaItemsHandler(importDialog_MediaItemsSelected);
            importDialog.MediaItems          = mediaItems;
            importDialog.Show(this);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// called at the completion of a drop operation. we grab the list of media files
 /// and 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void EpisodeMaintenance_DragDrop(object sender, DragEventArgs e)
 {
     MediaFileNameParser parser = new MediaFileNameParser();
     List<MediaFile> mediaItems = new List<MediaFile>();
     foreach (string fileName in GetMediaFiles(e))
     {
         MediaFile mfi = parser.Parse(fileName);
         if (mfi.FileType == MediaFileType.TvEpisode)
         {
             if (IsCompatible(mfi, showDetails))
             {
                 mediaItems.Add(mfi);
             }
         }
     }
     TvEpisodeImportDialog importDialog = new TvEpisodeImportDialog();
     importDialog.MediaItemsSelected += new SelectedMediaItemsHandler(importDialog_MediaItemsSelected);
     importDialog.MediaItems = mediaItems;
     importDialog.Show(this);
 }