Exemplo n.º 1
0
        public ShowSelector(EpisodeFile episodeFile)
        {
            this.episodeFile = episodeFile;
            this.EpisodeSelection = new DispatchedCollection<ShowEpisodeItem>();
            this.EpisodeSelection.CollectionChanged += (s, e) => OnPropertyChanged("EpisodeSelection");

        }
Exemplo n.º 2
0
        internal EpisodeFile AddFile(string item, HashSet<string> copySet = null, HashSet<string> moveSet = null)
        {
            //only add if this file doesn't exists yet.
            if (this.Files.Any(fi => string.Equals(fi.FilePath, item, StringComparison.OrdinalIgnoreCase)))
            {
                Trace.WriteLine("File '{0}' is already in processing", item);
                return null;
            }

            var file = new EpisodeFile(this, item, copySet, moveSet);

            if (copySet != null || moveSet != null)
            {
                // make auto-process on
                file.PropertyChanged += AutoProcessFile;
            }

            if (Application.Current.Dispatcher.CheckAccess())
            {
                this.Files.Add(file);
            }
            else
            {

                Application.Current.Dispatcher.BeginInvoke(new Action(() => this.Files.Add(file)));
            }

            return file;

        }
Exemplo n.º 3
0
 public ShowEpisodeItem(EpisodeFile file, Episode episode)
 {
     this.file = file;
     this.episode = episode;
 }