// RibbonSearchUICommand.cs
// Copyright (c) 2016 Bentley Systems, Incorporated. All Rights Reserved.

using Haestad.Support.Library;
using Haestad.Support.Support;
using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Input;
using System.Windows.Threading;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.RibbonView;

namespace Haestad.Framework.UI.Integration
{
    /// <summary>
    /// A base class for headless UI commands that can be used to register hot keys that are not associated
    /// with any Ribbon UI elements and that perform actions upon the Ribbon. Such commands are invisible to ribbon search.
    /// </summary>
    internal class RibbonSearchUICommand : HeadlessUICommandBase
    {
        #region Constructor
        internal RibbonSearchUICommand(RadComboBox searchCombo)
        {
            SearchCombo = searchCombo;
        }
        #endregion

        #region Public Methods
        public override void Execute(object parameter)
        {
            SearchCombo.Focus();
        }
        #endregion

        #region Protected Override Methods
        protected override RibbonHotKey NewHotKey()
        {
            return RibbonHotKey.F3;
        }
        #endregion

        #region Protected Properties
        protected RadComboBox SearchCombo
        {
            get;
            set;
        }
        #endregion
    }
}
