// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// The open overlay panel command.
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Commands
{
using System;
using System.Windows.Input;
using Caliburn.Micro;
using HandBrakeWPF.ViewModels.Interfaces;
///
/// The open overlay panel command.
///
public class OpenOverlayPanelCommand : ICommand
{
///
/// The execute.
///
///
/// The parameter.
///
public void Execute(object parameter)
{
IOverlayPanel overlayPanel = parameter as IOverlayPanel;
if (overlayPanel != null)
{
IShellViewModel shellViewModel = IoC.Get();
if (shellViewModel != null)
{
shellViewModel.ShowOverlay(overlayPanel);
}
}
}
///
/// The can execute.
///
///
/// The parameter.
///
///
/// The .
///
public bool CanExecute(object parameter)
{
return true;
}
///
/// The can execute changed.
///
public event EventHandler CanExecuteChanged;
}
}