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

namespace Haestad.WPFRibbonPrototype
{
    public class DockingWindowCommand : ICommand
    {
        public DockingWindowCommand(System.Windows.Forms.IWin32Window ownerForm)
        {
            OwnerForm = ownerForm;
        }

        public bool CanExecute(object parameter)
        {
            // Just to keep the compiler happy; I don't care about CanExecuteChanged.
            if (CanExecuteChanged == null || CanExecuteChanged != null)
                return true;

            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            DockingWindow dockingWindow = new DockingWindow();
            dockingWindow.Show(OwnerForm);
        }

        private System.Windows.Forms.IWin32Window OwnerForm
        {
            get;
            set;
        }

    }
}
