using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
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.Shapes;
using System.ComponentModel;
using FLY.Thick.Base.UI.Converter;
using FLY.ControlLibrary;

namespace FLY.Thick.FilmCasting.UI.UiModule
{
    /// <summary>
    /// Window_graphtrend.xaml 的交互逻辑
    /// </summary>
    public partial class TrendGraphConfig : FLY.ControlLibrary.WindowBigClose    
    {
        TrendGraphItemParam graphparam;
        TrendGraphVm trendGraphVm;
        public TrendGraphConfig()
        {
            InitializeComponent();
        }

        public void Init(TrendGraphItemParam graphparam, TrendGraphVm trendGraphVm)
        {
            this.graphparam = graphparam;
            this.trendGraphVm = trendGraphVm;
            this.DataContext = graphparam;
            this.grid_trend.DataContext = trendGraphVm;

        }
        private void btnPreClick(object sender, RoutedEventArgs e)
        {
            trendGraphVm.PreView();
            
        }

        private void btnNextClick(object sender, RoutedEventArgs e)
        {
            trendGraphVm.NextView();
        }


        private void btnOkClick(object sender, RoutedEventArgs e)
        {
            TrendGraphParams.Current.Save();
        }

        private void btnNewestClick(object sender, RoutedEventArgs e)
        {
            trendGraphVm.ToNewest();
        }

        private void btnLastClick(object sender, RoutedEventArgs e)
        {
            trendGraphVm.LastView();
        }

        private void btnSeachClick(object sender, RoutedEventArgs e)
        {
            trendGraphVm.Search(trendGraphVm.SearchTime);
        }
    }
}
