// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// Defines the TitleSpecificViewModel type.
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.ViewModels
{
using System.ComponentModel.Composition;
using HandBrakeWPF.ViewModels.Interfaces;
///
/// The Title Specific View Model
///
[Export(typeof(ITitleSpecificViewModel))]
public class TitleSpecificViewModel : ViewModelBase, ITitleSpecificViewModel
{
#region Constants and Fields
///
/// The selected title.
///
private int? selectedTitle;
#endregion
#region Constructors and Destructors
///
/// Initializes a new instance of the class.
///
public TitleSpecificViewModel()
{
this.SelectedTitle = 0;
}
#endregion
#region Properties
///
/// Gets or sets SelectedTitle.
///
public int? SelectedTitle
{
get
{
return this.selectedTitle;
}
set
{
this.selectedTitle = value;
this.NotifyOfPropertyChange(() => this.SelectedTitle);
}
}
#endregion
#region Public Methods
///
/// Cancel the request to scan.
///
public void Cancel()
{
this.selectedTitle = null;
this.TryClose();
}
///
/// Open the selected title.
///
public void Open()
{
this.TryClose();
}
#endregion
}
}