// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// Defines the SourceMenuCommand type.
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Commands
{
using System;
using System.Windows.Input;
///
/// The source menu command.
///
public class SourceMenuCommand : ICommand
{
#region Constants and Fields
///
/// The execute action.
///
private readonly Action executeAction;
#endregion
#region Constructors and Destructors
///
/// Initializes a new instance of the class.
///
///
/// The execute action.
///
public SourceMenuCommand(Action executeAction)
{
this.executeAction = executeAction;
}
#endregion
#region Events
///
/// The can execute changed.
///
public event EventHandler CanExecuteChanged { add { } remove { } }
#endregion
#region Implemented Interfaces
///
/// The can execute.
///
///
/// The parameter.
///
///
/// The System.Boolean.
///
public bool CanExecute(object parameter)
{
return true;
}
///
/// The execute.
///
///
/// The parameter.
///
public void Execute(object parameter)
{
this.executeAction();
}
#endregion
}
}