Exemplo n.º 1
0
        /// <summary>
        /// Clone this object
        /// </summary>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public SubtitleBehaviours Clone()
        {
            SubtitleBehaviours cloned = new SubtitleBehaviours
            {
                SelectedBehaviour        = this.selectedBehaviour,
                SelectedLangauges        = new BindingList <string>(),
                AddClosedCaptions        = this.addClosedCaptions,
                AddForeignAudioScanTrack = this.addForeignAudioScanTrack,
            };

            foreach (var item in this.SelectedLangauges)
            {
                cloned.SelectedLangauges.Add(item);
            }

            return(cloned);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Update this preset.
 /// The given parameters should be copy-constructed.
 /// </summary>
 /// <param name="task">
 /// The task.
 /// </param>
 /// <param name="audioBehaviours">
 /// The audio behaviours.
 /// </param>
 /// <param name="subtitleBehaviours">
 /// The subtitle behaviours.
 /// </param>
 public void Update(EncodeTask task, AudioBehaviours audioBehaviours, SubtitleBehaviours subtitleBehaviours)
 {
     this.Task = task;
     this.AudioTrackBehaviours = audioBehaviours;
     this.SubtitleTrackBehaviours = subtitleBehaviours;
 }
Exemplo n.º 3
0
        /// <summary>
        /// Prepare the Preset window to create a Preset Object later.
        /// </summary>
        /// <param name="task">
        /// The Encode Task.
        /// </param>
        /// <param name="title">
        /// The title.
        /// </param>
        /// <param name="audioBehaviours">
        /// The audio Behaviours.
        /// </param>
        /// <param name="subtitleBehaviours">
        /// The subtitle Behaviours.
        /// </param>
        public void Setup(EncodeTask task, Title title, AudioBehaviours audioBehaviours, SubtitleBehaviours subtitleBehaviours)
        {
            this.Preset.Task = new EncodeTask(task);
            this.Preset.AudioTrackBehaviours = audioBehaviours.Clone();
            this.Preset.SubtitleTrackBehaviours = subtitleBehaviours.Clone();
            this.selectedTitle = title;

            switch (task.Anamorphic)
            {
                default:
                    this.SelectedPictureSettingMode = PresetPictureSettingsMode.Custom;
                    break;
                case Anamorphic.Strict:
                    this.SelectedPictureSettingMode = PresetPictureSettingsMode.SourceMaximum;
                    break;
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SubtitleBehaviours"/> class.
 /// </summary>
 /// <param name="behaviours">
 /// The behaviours.
 /// </param>
 public SubtitleBehaviours(SubtitleBehaviours behaviours)
 {
     this.SelectedBehaviour = behaviours.selectedBehaviour;
     this.SelectedLangauges = new BindingList <string>(behaviours.SelectedLangauges);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SubtitleBehaviours"/> class.
 /// </summary>
 /// <param name="behaviours">
 /// The behaviours.
 /// </param>
 public SubtitleBehaviours(SubtitleBehaviours behaviours)
 {
     this.SelectedBehaviour = behaviours.selectedBehaviour;
     this.SelectedLangauges = new BindingList<string>(behaviours.SelectedLangauges);
 }
Exemplo n.º 6
0
        /// <summary>
        /// Clone this object
        /// </summary>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public SubtitleBehaviours Clone()
        {
            SubtitleBehaviours cloned = new SubtitleBehaviours
            {
                SelectedBehaviour = this.selectedBehaviour,
                SelectedLangauges = new BindingList<string>(),
                AddClosedCaptions = this.addClosedCaptions,
                AddForeignAudioScanTrack = this.addForeignAudioScanTrack,
            };

            foreach (var item in this.SelectedLangauges)
            {
                cloned.SelectedLangauges.Add(item);
            }

            return cloned;
        }