using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Haestad.Framework.UI.Integration;
using System.Windows;
using System.Windows.Input;
using System.Windows.Controls;

namespace Haestad.WPFRibbonPrototype
{
    internal class BackstageRibbonUICommand : RibbonBackstageUICommandBase
    {
        public BackstageRibbonUICommand(ICommand command, string name, string labelKey,
            string toolTipTitleKey, string toolTipDescriptionKey, string graphicResourceKey)
        : base(command, name, labelKey, toolTipTitleKey, toolTipDescriptionKey, graphicResourceKey)
        {

        }
        public BackstageRibbonUICommand(ICommand command, string name, string labelKey, string toolTipTitleKey,
            string toolTipDescriptionKey, string graphicResourceKey, string largeGraphicResourceKey)
        : base(command, name, labelKey, toolTipTitleKey, toolTipDescriptionKey, graphicResourceKey, largeGraphicResourceKey)
        {

        }
        public BackstageRibbonUICommand(ICommand command, string name, string labelKey, string toolTipTitleKey, string toolTipDescriptionKey,
            string graphicResourceKey, string largeGraphicResourceKey, RibbonHotKey hotKey)
        : base(command, name, labelKey, toolTipTitleKey, toolTipDescriptionKey, graphicResourceKey, largeGraphicResourceKey, hotKey)
        {

        }

        public override IList<IRibbonUICommand> BackstageUserControlCommands
        {
            get
            {
                IList<IRibbonUICommand> commands = new List<IRibbonUICommand>();

                commands.Add(ButtonCommand);

                return commands;
            }
        }

        protected override void ConfigureBackstageUserControl()
        {
        }

        protected override UserControl NewBackstageUserControl()
        {
            return new TestWPFUserControl();
        }

        private IRibbonUICommand ButtonCommand
        {
            get
            {
                if (m_buttonCommand == null)
                {
                    ICommand nullCommand = new NullCommand();

                    m_buttonCommand = new RibbonUICommand(
                        nullCommand,
                        StandardTestCommandNames.BackstageUserControlWPF,
                        StandardTestCommandNames.BackstageUserControlWPF,
                        "ToolTip Title for: " + StandardTestCommandNames.BackstageUserControlWPF,
                        "ToolTip description for: " + StandardTestCommandNames.BackstageUserControlWPF,
                        String.Empty);
                }

                return m_buttonCommand;
            }
        }

        private IRibbonUICommand m_buttonCommand;
    }
}
