예제 #1
0
        public FormFileNamerPreferences(Preferences prefs)
        {
            _userPrefs = prefs;
            _prefsCopy = _userPrefs.Clone();

            _movieJob = MockJobFactory.CreateMovieJob();
            _movieNamer = new FileNamer(_movieJob, _prefsCopy);

            _tvShowJob = MockJobFactory.CreateTVShowJob();
            _tvShowNamer = new FileNamer(_tvShowJob, _prefsCopy);

            InitializeComponent();
            Load += OnLoad;
            this.EnableSelectAll();
        }
예제 #2
0
        public Preferences CopyFrom(Preferences other)
        {
            Movies.CopyFrom(other.Movies);
            TVShows.CopyFrom(other.TVShows);

            Codecs.Clear();
            foreach (var k in other.Codecs.Keys)
            {
                Codecs[k] = other.Codecs[k];
            }

            ReplaceSpaces = other.ReplaceSpaces;
            ReplaceSpacesWith = other.ReplaceSpacesWith;

            return this;
        }
예제 #3
0
 public FileNamer(Job job, Preferences prefs)
 {
     _job = job;
     _prefs = prefs;
 }
예제 #4
0
 private void SavePreferences(Preferences prefs)
 {
     PluginUtils.SavePreferences(AssemblyInfo, prefs);
 }
예제 #5
0
 protected bool Equals(Preferences other)
 {
     return Equals(Movies, other.Movies) &&
            Equals(TVShows, other.TVShows) &&
            Codecs.SequenceEqual(other.Codecs) &&
            ReplaceSpaces.Equals(other.ReplaceSpaces) &&
            string.Equals(ReplaceSpacesWith, other.ReplaceSpacesWith);
 }