using FLY.Thick.Base.IService;
using FLY.Thick.Base.UI.OnInit;
using Misc;
using MultiLayout;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
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;
using Unity;

namespace FLY.Thick.Base.UI.CustomSection
{
    /// <summary>
    /// UcSectionScanGraph.xaml 的交互逻辑
    /// </summary>
    public partial class UcSectionScanGraph : UserControl
    {
        ParamDictionary paramDictionary;
        IUnityContainer container;
        FlyLayoutManager manager;
        UcSectionScanGraphVm viewModel;

        public int XStep { get; set; }
        public UcSectionScanGraph()
        {
            InitializeComponent();
        }

        [Unity.InjectionMethod]
        public void Init(
            IUnityContainer container,
            ParamDictionary paramDictionary,
            FlyLayoutManager manager)
        {
            this.container = container;
            this.paramDictionary = paramDictionary;
            this.manager = manager;
            viewModel = new UcSectionScanGraphVm();
            viewModel.Init(paramDictionary);
            this.DataContext = viewModel;
        }


    }

    public class UcSectionScanGraphVm : INotifyPropertyChanged
    {

        public event PropertyChangedEventHandler PropertyChanged;


        /// <summary>
        /// X轴间隔
        /// </summary>
        public int XStep { get; set; }

        public UcSectionScanGraphVm()
        {

        }

        public void Init(ParamDictionary paramDictionary)
        {
            paramDictionary.SetBinding(this, nameof(XStep), XStep);
        }

    }
}
