diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs')
-rw-r--r-- | win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs b/win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs new file mode 100644 index 000000000..582cca925 --- /dev/null +++ b/win/CS/HandBrakeWPF/Commands/CloseOverlayPanelCommand.cs @@ -0,0 +1,58 @@ +// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="CloseOverlayPanelCommand.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// The open overlay panel command.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Commands
+{
+ using System;
+ using System.Windows.Input;
+
+ using Caliburn.Micro;
+
+ using HandBrakeWPF.ViewModels.Interfaces;
+
+ /// <summary>
+ /// The open overlay panel command.
+ /// </summary>
+ public class CloseOverlayPanelCommand : ICommand
+ {
+ /// <summary>
+ /// The execute.
+ /// </summary>
+ /// <param name="parameter">
+ /// The parameter.
+ /// </param>
+ public void Execute(object parameter)
+ {
+ IShellViewModel shellViewModel = IoC.Get<IShellViewModel>();
+ if (shellViewModel != null)
+ {
+ shellViewModel.HideOverlay();
+ }
+ }
+
+ /// <summary>
+ /// The can execute.
+ /// </summary>
+ /// <param name="parameter">
+ /// The parameter.
+ /// </param>
+ /// <returns>
+ /// The <see cref="bool"/>.
+ /// </returns>
+ public bool CanExecute(object parameter)
+ {
+ return true;
+ }
+
+ /// <summary>
+ /// The can execute changed.
+ /// </summary>
+ public event EventHandler CanExecuteChanged;
+ }
+}
|