public void Clone(FileNameFormat format) { this.Format.Clear(); foreach (FileNamePortion portion in format.Format) { this.Format.Add(new FileNamePortion(portion)); } this.EpisodeFormat = new TvEpisodeFormat(format.EpisodeFormat); }
public FileNameControlViewModel(FileNameFormat format, ContentType type) { this.ContentType = type; this.FileNameFormat = new FileNameFormat(format); this.FileNameFormat.PropertyChanged += Format_PropertyChanged; this.FileNameFormat.EpisodeFormat.PropertyChanged += Format_PropertyChanged; this.FileNameFormat.Format.CollectionChanged += Format_CollectionChanged; foreach (FileNamePortion portion in this.FileNameFormat.Format) portion.PropertyChanged += Format_PropertyChanged; UpdatePreview(); }
/// <summary> /// Constructor for copying instance /// </summary> /// <param name="format"></param> public FileNameFormat(FileNameFormat format) : this(format.ContentType) { Clone(format); }
/// <summary> /// Constructor for copying instance /// </summary> /// <param name="format"></param> public FileNameFormat(FileNameFormat format) : this(format.ContentType) { Clone(format); }
public void Clone(FileNameFormat format) { this.Format.Clear(); foreach (FileNamePortion portion in format.Format) this.Format.Add(new FileNamePortion(portion)); this.EpisodeFormat = new TvEpisodeFormat(format.EpisodeFormat); }