using FLY.Thick.Base.Common;
using MultiLayout.UiModule;
using System.Windows;
using System.Windows.Controls;
using Unity;

namespace FLY.Thick.Base.UI.UiModule
{
    /// <summary>
    /// DynAreaThick.xaml 的交互逻辑
    /// </summary>
    public partial class DynAreaThick : UserControl
    {
        private DynArea dynArea;
        private FLY.Thick.Base.IService.IInitParamService initParamService;
        private IUnityContainer container;
        public DynAreaThick()
        {
            InitializeComponent();
        }

        [InjectionMethod]
        public void Init(
            IUnityContainer container,
            FLY.Thick.Base.IService.ITDGageService gageService,
            FLY.Thick.Base.IService.IInitParamService initParamService
            )
        {
            this.container = container;
            this.dynArea = gageService.DynArea;
            this.initParamService = initParamService;

            this.DataContext = this.dynArea;
            grid_initparam.DataContext = this.initParamService;
        }
    }

    public class UiModule2_DynAreaThick : IUiModule2
    {
        public string Title => "测厚.AD值状态";

        public ComponentType Type => ComponentType.DynArea;

        public bool IsUnique => true;

        public FrameworkElement GetComponent(int id, IUnityContainer container)
        {
            DynAreaThick graph = new DynAreaThick();
            container.BuildUp(graph);
            return graph;
        }

        public FrameworkElement GetThumbnail()
        {
            return new System.Windows.Controls.Grid();
        }

        public void MatchParam(int[] IDs)
        {

        }
    }
}
