using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AIRS
{
    /// <summary>
    /// TitleControl.xaml 的交互逻辑
    /// </summary>
    public partial class TitleControl : UserControl
    {
        public Boolean isclosed = true;

        public TitleControl()
        {
            InitializeComponent();
        }

        private void start_grade_MouseMove(object sender, MouseEventArgs e)
        {
            imggrade.Width = 74;
            lblgrade.FontSize = 13;
            lblgrade.Content = " 开始检测";
            lblgrade.Foreground = new SolidColorBrush(Color.FromRgb(0xF5, 0x9A, 0x23));
        }

        private void start_grade_MouseLeave(object sender, MouseEventArgs e)
        {
            imggrade.Width = 70;
            lblgrade.FontSize = 12;
            lblgrade.Content = "开始检测";
            lblgrade.Foreground = new SolidColorBrush(Colors.White);
        }

        private void canfill_MouseMove(object sender, MouseEventArgs e)
        {
            imgfill.Width = 74;
            lblfill.FontSize = 13;
            lblfill.Content = " 全屏查看";
            lblfill.Foreground = new SolidColorBrush(Color.FromRgb(0xF5,0x9A,0x23));
        }

        private void canfill_MouseLeave(object sender, MouseEventArgs e)
        {
            imgfill.Width = 70;
            lblfill.FontSize = 12;
            lblfill.Content = "全屏查看";
            lblfill.Foreground = new SolidColorBrush(Colors.White);
        }

        /*private void out_export_MouseMove(object sender, MouseEventArgs e)
        {
            imgexport.Width = 74;
            lblexport.FontSize = 13;
            lblexport.Content = " 生成报告";
            lblexport.Foreground = new SolidColorBrush(Color.FromRgb(0xF5,0x9A,0x23));
        }

        private void out_export_MouseLeave(object sender, MouseEventArgs e)
        {
            imgexport.Width = 70;
            lblexport.FontSize = 12;
            lblexport.Content = "生成报告";
            lblexport.Foreground = new SolidColorBrush(Colors.White);
        }*/

        private void history_MouseMove(object sender, MouseEventArgs e)
        {
            imghistory.Width = 74;
            lblhistory.FontSize = 13;
            lblhistory.Content = " 历史评级";
            lblhistory.Foreground = new SolidColorBrush(Color.FromRgb(0xF5,0x9A,0x23));
        }

        private void history_MouseLeave(object sender, MouseEventArgs e)
        {
            imghistory.Width = 70;
            lblhistory.FontSize = 12;
            lblhistory.Content = "历史评级";
            lblhistory.Foreground = new SolidColorBrush(Colors.White);
        }

        private void Canvas_MouseMove(object sender, MouseEventArgs e)
        {
            Point pp = e.GetPosition((IInputElement)sender);
           // Console.WriteLine(pp.X.ToString() + "  " + pp.Y.ToString());
            if(pp.X>0 && pp.X<=25)
            {
                imgmin.Visibility = Visibility.Hidden;
                imgmin1.Visibility = Visibility.Visible;
                imgmax.Visibility = Visibility.Visible;
                imgmax1.Visibility = Visibility.Hidden;
                imgclosed.Visibility = Visibility.Visible;
                imgclosed1.Visibility = Visibility.Hidden;
            }
            else if (pp.X > 25 && pp.X <= 50)
            {
                imgmin.Visibility = Visibility.Visible;
                imgmin1.Visibility = Visibility.Hidden;
                imgmax.Visibility = Visibility.Hidden;
                imgmax1.Visibility = Visibility.Visible;
                imgclosed.Visibility = Visibility.Visible;
                imgclosed1.Visibility = Visibility.Hidden;
            }
            else if (pp.X > 50 && pp.X <= 75)
            {
                imgmin.Visibility = Visibility.Visible;
                imgmin1.Visibility = Visibility.Hidden;
                imgmax.Visibility = Visibility.Visible;
                imgmax1.Visibility = Visibility.Hidden;
                if (isclosed)
                {
                    imgclosed.Visibility = Visibility.Hidden;
                    imgclosed1.Visibility = Visibility.Visible;
                }
                else
                {
                    imgclosed.Visibility = Visibility.Visible;
                    imgclosed1.Visibility = Visibility.Hidden;
                }
            }
        }

        private void canaction_MouseLeave(object sender, MouseEventArgs e)
        {
            imgmin.Visibility = Visibility.Visible;
            imgmin1.Visibility = Visibility.Hidden;
            imgmax.Visibility = Visibility.Visible;
            imgmax1.Visibility = Visibility.Hidden;
            imgclosed.Visibility = Visibility.Visible;
            imgclosed1.Visibility = Visibility.Hidden;
        }

        private void task_MouseMove(object sender, MouseEventArgs e)
        {
            imgtask.Width = 74;
            lbltask.FontSize = 13;
            lbltask.Content = " 任务";
            lbltask.Foreground = new SolidColorBrush(Color.FromRgb(0xF5, 0x9A, 0x23));
        }

        private void task_MouseLeave(object sender, MouseEventArgs e)
        {
            imgtask.Width = 70;
            lbltask.FontSize = 12;
            lbltask.Content = "任务";
            lbltask.Foreground = new SolidColorBrush(Colors.White);
        }

        /*private void field_MouseMove(object sender, MouseEventArgs e)
        {
            imgfield.Width = 74;
            lblfield.FontSize = 13;
            lblfield.Content = " 视场截取";
            lblfield.Foreground = new SolidColorBrush(Color.FromRgb(0xF5, 0x9A, 0x23));
        }

        private void field_MouseLeave(object sender, MouseEventArgs e)
        {
            imgfield.Width = 70;
            lblfield.FontSize = 12;
            lblfield.Content = "视场截取";
            lblfield.Foreground = new SolidColorBrush(Colors.White);
        }*/

    }
}
