using System.Windows;
using System.Windows.Input;
using CommonServiceLocator;
using Valg.EVA.Skanning.UserInterfaceElements.Help;

using Prism.Commands;
using Prism.Events;

namespace Valg.EVA.Skanning.UserInterfaceElements
{
    public class EvaWindow : Window
    {
        public EvaWindow()
        {
            ShowHelpCommand = new DelegateCommand(ShowHelp);
            InputBindings.Add(new KeyBinding(ShowHelpCommand, Key.F1, ModifierKeys.None));
        }

        public ICommand ShowHelpCommand { get; }

        private void ShowHelp()
        {
            ServiceLocator.Current.GetInstance<IEventAggregator>()
                .ShowHelpWindow(this);
        }
    }
}

