// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// The Meta Data Tab
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
using System;
using Caliburn.Micro;
using HandBrakeWPF.EventArgs;
using HandBrakeWPF.Services.Encode.Model;
using HandBrakeWPF.Services.Encode.Model.Models;
using HandBrakeWPF.Services.Interfaces;
using HandBrakeWPF.Services.Presets.Model;
using HandBrakeWPF.Services.Scan.Model;
using HandBrakeWPF.ViewModels.Interfaces;
///
/// The meta data view model.
///
public class MetaDataViewModel : ViewModelBase, IMetaDataViewModel
{
private EncodeTask task;
///
/// Initializes a new instance of the class.
///
///
/// The window Manager.
///
///
/// The user Setting Service.
///
public MetaDataViewModel(IWindowManager windowManager, IUserSettingService userSettingService)
{
this.task = new EncodeTask();
}
public event EventHandler TabStatusChanged { add { } remove { } }
///
/// Gets or sets the meta data.
///
public MetaData MetaData
{
get
{
return this.task.MetaData;
}
set
{
this.task.MetaData = value;
this.NotifyOfPropertyChange(() => this.MetaData);
}
}
///
/// Setup the window after a scan.
///
///
/// The source.
///
///
/// The selected title.
///
///
/// The Current preset
///
///
/// The task.
///
public void SetSource(Source source, Title selectedTitle, Preset currentPreset, EncodeTask encodeTask)
{
return; // Disabled for now.
// this.task = encodeTask;
// this.task.MetaData = new MetaData(selectedTitle.Metadata);
// this.NotifyOfPropertyChange(() => this.MetaData);
}
///
/// Set the selected preset
///
///
/// The preset.
///
///
/// The task.
///
public void SetPreset(Preset preset, EncodeTask encodeTask)
{
}
///
/// Update all the UI controls based on the encode task passed in.
///
///
/// The task.
///
public void UpdateTask(EncodeTask encodeTask)
{
this.task = encodeTask;
this.NotifyOfPropertyChange(() => this.MetaData);
}
public bool MatchesPreset(Preset preset)
{
return true;
}
}
}