using Caliburn.Micro.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using Aitex.Core.RT.Event;
using Aitex.Core.RT.SCCore;
using MECF.Framework.Common.DataCenter;


namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
{
    public enum EnumGasFlowCalculator
    {
        Normal,
        RecipeGasFlowCalculatorMfc17ChangeToMfc1
    }
    public static class RecipeGasFlowCalculatorFactory
    {
        public static IRecipeGasFlowCalculator GetGasFlowCalculator(string module)
        {
            IRecipeGasFlowCalculator calculator;
            var gasFlowCalculator = GetRecipeGasFlowCalculator(module);
            
            //传入参数时，上层需要注册对应服务，
            calculator= IoC.Get<IRecipeGasFlowCalculator>(gasFlowCalculator);
            return calculator;
        }

        private static string GetRecipeGasFlowCalculator(string module)
        {
            var rName = "PN2";

            var scValue = (string)QueryDataClient.Instance.Service.GetConfig($"PM.{module}.OperationView");
            if (String.IsNullOrEmpty(scValue))
                return rName;

            return scValue;
        }
    }
}
