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.Shapes;

namespace FLY.Thick.FilmCasting.UI.UiModule
{
    /// <summary>
    /// WdScanGraphConfig.xaml 的交互逻辑
    /// </summary>
    public partial class WdScanGraphConfig : FLY.ControlLibrary.WindowBigClose
    {
        ScanGraphItemParam graphparam;
        ScanGraphVm scanGraphVm;
        public WdScanGraphConfig()
        {
            InitializeComponent();
        }

        public void Init(ScanGraphItemParam graphparam, ScanGraphVm scanGraphVm)
        {
            this.scanGraphVm = scanGraphVm;
            this.graphparam = graphparam;

            this.grid_scanGraphVm.DataContext = scanGraphVm;
            this.DataContext = graphparam;
        }


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

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

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

        private void btnLockClick(object sender, RoutedEventArgs e)
        {
            scanGraphVm.ChangeLock();
        }

        private void btnResetNumberClick(object sender, RoutedEventArgs e)
        {
            scanGraphVm.ResetNumber();
        }
    }

    
}
