Пример #1
0
 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();
 }
Пример #3
0
 /// <summary>
 /// Constructor for copying instance
 /// </summary>
 /// <param name="format"></param>
 public FileNameFormat(FileNameFormat format)
     : this(format.ContentType)
 {
     Clone(format);
 }
Пример #4
0
 /// <summary>
 /// Constructor for copying instance
 /// </summary>
 /// <param name="format"></param>
 public FileNameFormat(FileNameFormat format) : this(format.ContentType)
 {
     Clone(format);
 }
Пример #5
0
 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);
 }