using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace Zerolauncher.dialog
{
    /// <summary>
    /// BaseDialog.xaml 的交互逻辑
    /// </summary>
    public partial class BaseDialog : Window
    {

        //Storyboard storyboard;

        public BaseDialog(UserControl control)
        {
            InitializeComponent();
            //storyboard = FindResource("BlinkAnimation") as Storyboard;
            mControl.Children.Add(control);
        }

        //protected override void OnDeactivated(EventArgs e)
        //{
        //    base.OnDeactivated(e);
        //    // 当窗口失去焦点时，开始播放闪烁动画
        //    storyboard.Begin(this);
        //}

        private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            // 实现窗口的拖动
            DragMove();
        }

        private void AirButton_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }
    }
}
