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(); }
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; }
public FileNamer(Job job, Preferences prefs) { _job = job; _prefs = prefs; }
private void SavePreferences(Preferences prefs) { PluginUtils.SavePreferences(AssemblyInfo, prefs); }
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); }