using FLY.OBJComponents.IService;
using Misc;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;

namespace FLY.DownBlowing.Common
{
    public class TempArea : INotifyPropertyChanged, IPropertyOpt
    {
        public TempArea()
        {

        }
        public void Init(string number) 
        {
            Number = number;
            TemperaturesBinding();
        }
        /// <summary>
        /// 名称:M,A,B,C,D,E
        /// </summary>
        public string Number { get; set; }

        #region 辅助代码生成
        /// <summary>
        /// 温度显示1
        /// </summary>
        [Description("温度显示1")]
        public float TempPV1 { get; set; }

        /// <summary>
        /// 温度显示2
        /// </summary>
        [Description("温度显示2")]
        public float TempPV2 { get; set; }

        /// <summary>
        /// 温度显示3
        /// </summary>
        [Description("温度显示3")]
        public float TempPV3 { get; set; }

        /// <summary>
        /// 温度显示4
        /// </summary>
        [Description("温度显示4")]
        public float TempPV4 { get; set; }

        /// <summary>
        /// 温度显示5
        /// </summary>
        [Description("温度显示5")]
        public float TempPV5 { get; set; }

        /// <summary>
        /// 温度显示6
        /// </summary>
        [Description("温度显示6")]
        public float TempPV6 { get; set; }

        /// <summary>
        /// 温度1输入
        /// </summary>
        [Description("温度1输入")]
        public float TempSV1 { get; set; }

        /// <summary>
        /// 温度2输入
        /// </summary>
        [Description("温度2输入")]
        public float TempSV2 { get; set; }

        /// <summary>
        /// 温度3输入
        /// </summary>
        [Description("温度3输入")]
        public float TempSV3 { get; set; }

        /// <summary>
        /// 温度4输入
        /// </summary>
        [Description("温度4输入")]
        public float TempSV4 { get; set; }

        /// <summary>
        /// 温度5输入
        /// </summary>
        [Description("温度5输入")]
        public float TempSV5 { get; set; }

        /// <summary>
        /// 温度6输入
        /// </summary>
        [Description("温度6输入")]
        public float TempSV6 { get; set; }

        /// <summary>
        /// 通道选择1
        /// </summary>
        [Description("通道选择1")]
        public float Channel1 { get; set; }

        /// <summary>
        /// 通道选择2
        /// </summary>
        [Description("通道选择2")]
        public float Channel2 { get; set; }

        /// <summary>
        /// 通道选择3
        /// </summary>
        [Description("通道选择3")]
        public float Channel3 { get; set; }

        /// <summary>
        /// 通道选择4
        /// </summary>
        [Description("通道选择4")]
        public float Channel4 { get; set; }

        /// <summary>
        /// 通道选择5
        /// </summary>
        [Description("通道选择5")]
        public float Channel5 { get; set; }

        /// <summary>
        /// 通道选择6
        /// </summary>
        [Description("通道选择6")]
        public float Channel6 { get; set; }

        /// <summary>
        /// 比例输入1
        /// </summary>
        [Description("比例输入1")]
        public float PSet1 { get; set; }

        /// <summary>
        /// 比例输入2
        /// </summary>
        [Description("比例输入2")]
        public float PSet2 { get; set; }

        /// <summary>
        /// 比例输入3
        /// </summary>
        [Description("比例输入3")]
        public float PSet3 { get; set; }

        /// <summary>
        /// 比例输入4
        /// </summary>
        [Description("比例输入4")]
        public float PSet4 { get; set; }

        /// <summary>
        /// 比例输入5
        /// </summary>
        [Description("比例输入5")]
        public float PSet5 { get; set; }

        /// <summary>
        /// 比例输入6
        /// </summary>
        [Description("比例输入6")]
        public float PSet6 { get; set; }

        /// <summary>
        /// 比例修改通知1
        /// </summary>
        [Description("比例修改通知1")]
        public bool IsPChanged1 { get; set; }

        /// <summary>
        /// 比例修改通知2
        /// </summary>
        [Description("比例修改通知2")]
        public bool IsPChanged2 { get; set; }

        /// <summary>
        /// 比例修改通知3
        /// </summary>
        [Description("比例修改通知3")]
        public bool IsPChanged3 { get; set; }

        /// <summary>
        /// 比例修改通知4
        /// </summary>
        [Description("比例修改通知4")]
        public bool IsPChanged4 { get; set; }

        /// <summary>
        /// 比例修改通知5
        /// </summary>
        [Description("比例修改通知5")]
        public bool IsPChanged5 { get; set; }

        /// <summary>
        /// 比例修改通知6
        /// </summary>
        [Description("比例修改通知6")]
        public bool IsPChanged6 { get; set; }

        /// <summary>
        /// 积分输入1
        /// </summary>
        [Description("积分输入1")]
        public float ISet1 { get; set; }

        /// <summary>
        /// 积分输入2
        /// </summary>
        [Description("积分输入2")]
        public float ISet2 { get; set; }

        /// <summary>
        /// 积分输入3
        /// </summary>
        [Description("积分输入3")]
        public float ISet3 { get; set; }

        /// <summary>
        /// 积分输入4
        /// </summary>
        [Description("积分输入4")]
        public float ISet4 { get; set; }

        /// <summary>
        /// 积分输入5
        /// </summary>
        [Description("积分输入5")]
        public float ISet5 { get; set; }

        /// <summary>
        /// 积分输入6
        /// </summary>
        [Description("积分输入6")]
        public float ISet6 { get; set; }

        /// <summary>
        /// 积分修改通知1
        /// </summary>
        [Description("积分修改通知1")]
        public bool IsIChanged1 { get; set; }

        /// <summary>
        /// 积分修改通知2
        /// </summary>
        [Description("积分修改通知2")]
        public bool IsIChanged2 { get; set; }

        /// <summary>
        /// 积分修改通知3
        /// </summary>
        [Description("积分修改通知3")]
        public bool IsIChanged3 { get; set; }

        /// <summary>
        /// 积分修改通知4
        /// </summary>
        [Description("积分修改通知4")]
        public bool IsIChanged4 { get; set; }

        /// <summary>
        /// 积分修改通知5
        /// </summary>
        [Description("积分修改通知5")]
        public bool IsIChanged5 { get; set; }

        /// <summary>
        /// 积分修改通知6
        /// </summary>
        [Description("积分修改通知6")]
        public bool IsIChanged6 { get; set; }

        /// <summary>
        /// 微分输入1
        /// </summary>
        [Description("微分输入1")]
        public float DSet1 { get; set; }

        /// <summary>
        /// 微分输入2
        /// </summary>
        [Description("微分输入2")]
        public float DSet2 { get; set; }

        /// <summary>
        /// 微分输入3
        /// </summary>
        [Description("微分输入3")]
        public float DSet3 { get; set; }

        /// <summary>
        /// 微分输入4
        /// </summary>
        [Description("微分输入4")]
        public float DSet4 { get; set; }

        /// <summary>
        /// 微分输入5
        /// </summary>
        [Description("微分输入5")]
        public float DSet5 { get; set; }

        /// <summary>
        /// 微分输入6
        /// </summary>
        [Description("微分输入6")]
        public float DSet6 { get; set; }

        /// <summary>
        /// 微分修改通知1
        /// </summary>
        [Description("微分修改通知1")]
        public bool IsDChanged1 { get; set; }

        /// <summary>
        /// 微分修改通知2
        /// </summary>
        [Description("微分修改通知2")]
        public bool IsDChanged2 { get; set; }

        /// <summary>
        /// 微分修改通知3
        /// </summary>
        [Description("微分修改通知3")]
        public bool IsDChanged3 { get; set; }

        /// <summary>
        /// 微分修改通知4
        /// </summary>
        [Description("微分修改通知4")]
        public bool IsDChanged4 { get; set; }

        /// <summary>
        /// 微分修改通知5
        /// </summary>
        [Description("微分修改通知5")]
        public bool IsDChanged5 { get; set; }

        /// <summary>
        /// 微分修改通知6
        /// </summary>
        [Description("微分修改通知6")]
        public bool IsDChanged6 { get; set; }

        /// <summary>
        /// 温度修正1
        /// </summary>
        [Description("温度修正1")]
        public float TempCorr1 { get; set; }

        /// <summary>
        /// 温度修正2
        /// </summary>
        [Description("温度修正2")]
        public float TempCorr2 { get; set; }

        /// <summary>
        /// 温度修正3
        /// </summary>
        [Description("温度修正3")]
        public float TempCorr3 { get; set; }

        /// <summary>
        /// 温度修正4
        /// </summary>
        [Description("温度修正4")]
        public float TempCorr4 { get; set; }

        /// <summary>
        /// 温度修正5
        /// </summary>
        [Description("温度修正5")]
        public float TempCorr5 { get; set; }

        /// <summary>
        /// 温度修正6
        /// </summary>
        [Description("温度修正6")]
        public float TempCorr6 { get; set; }

        /// <summary>
        /// 温度修正修改通知
        /// </summary>
        [Description("温度修正修改通知")]
        public bool IsTempCorrChanged { get; set; }

        /// <summary>
        /// 冷却设定1
        /// </summary>
        [Description("冷却设定1")]
        public float CoolingSet1 { get; set; }

        /// <summary>
        /// 冷却设定2
        /// </summary>
        [Description("冷却设定2")]
        public float CoolingSet2 { get; set; }

        /// <summary>
        /// 冷却设定3
        /// </summary>
        [Description("冷却设定3")]
        public float CoolingSet3 { get; set; }

        /// <summary>
        /// 冷却设定4
        /// </summary>
        [Description("冷却设定4")]
        public float CoolingSet4 { get; set; }

        /// <summary>
        /// 整定开关1
        /// </summary>
        [Description("整定开关1")]
        public bool IsSelfAdjustingSet1 { get; set; }

        /// <summary>
        /// 整定开关2
        /// </summary>
        [Description("整定开关2")]
        public bool IsSelfAdjustingSet2 { get; set; }

        /// <summary>
        /// 整定开关3
        /// </summary>
        [Description("整定开关3")]
        public bool IsSelfAdjustingSet3 { get; set; }

        /// <summary>
        /// 整定开关4
        /// </summary>
        [Description("整定开关4")]
        public bool IsSelfAdjustingSet4 { get; set; }

        /// <summary>
        /// 整定开关5
        /// </summary>
        [Description("整定开关5")]
        public bool IsSelfAdjustingSet5 { get; set; }

        /// <summary>
        /// 整定开关6
        /// </summary>
        [Description("整定开关6")]
        public bool IsSelfAdjustingSet6 { get; set; }

        /// <summary>
        /// 整定显示1
        /// </summary>
        [Description("整定显示1")]
        public float IsSelfAdjusting1 { get; set; }

        /// <summary>
        /// 整定显示2
        /// </summary>
        [Description("整定显示2")]
        public float IsSelfAdjusting2 { get; set; }

        /// <summary>
        /// 整定显示3
        /// </summary>
        [Description("整定显示3")]
        public float IsSelfAdjusting3 { get; set; }

        /// <summary>
        /// 整定显示4
        /// </summary>
        [Description("整定显示4")]
        public float IsSelfAdjusting4 { get; set; }

        /// <summary>
        /// 整定显示5
        /// </summary>
        [Description("整定显示5")]
        public float IsSelfAdjusting5 { get; set; }

        /// <summary>
        /// 整定显示6
        /// </summary>
        [Description("整定显示6")]
        public float IsSelfAdjusting6 { get; set; }

        /// <summary>
        /// 比例显示1
        /// </summary>
        [Description("比例显示1")]
        public float P1 { get; set; }

        /// <summary>
        /// 比例显示2
        /// </summary>
        [Description("比例显示2")]
        public float P2 { get; set; }

        /// <summary>
        /// 比例显示3
        /// </summary>
        [Description("比例显示3")]
        public float P3 { get; set; }

        /// <summary>
        /// 比例显示4
        /// </summary>
        [Description("比例显示4")]
        public float P4 { get; set; }

        /// <summary>
        /// 比例显示5
        /// </summary>
        [Description("比例显示5")]
        public float P5 { get; set; }

        /// <summary>
        /// 比例显示6
        /// </summary>
        [Description("比例显示6")]
        public float P6 { get; set; }

        /// <summary>
        /// 积分显示1
        /// </summary>
        [Description("积分显示1")]
        public float I1 { get; set; }

        /// <summary>
        /// 积分显示2
        /// </summary>
        [Description("积分显示2")]
        public float I2 { get; set; }

        /// <summary>
        /// 积分显示3
        /// </summary>
        [Description("积分显示3")]
        public float I3 { get; set; }

        /// <summary>
        /// 积分显示4
        /// </summary>
        [Description("积分显示4")]
        public float I4 { get; set; }

        /// <summary>
        /// 积分显示5
        /// </summary>
        [Description("积分显示5")]
        public float I5 { get; set; }

        /// <summary>
        /// 积分显示6
        /// </summary>
        [Description("积分显示6")]
        public float I6 { get; set; }

        /// <summary>
        /// 微分显示1
        /// </summary>
        [Description("微分显示1")]
        public float D1 { get; set; }

        /// <summary>
        /// 微分显示2
        /// </summary>
        [Description("微分显示2")]
        public float D2 { get; set; }

        /// <summary>
        /// 微分显示3
        /// </summary>
        [Description("微分显示3")]
        public float D3 { get; set; }

        /// <summary>
        /// 微分显示4
        /// </summary>
        [Description("微分显示4")]
        public float D4 { get; set; }

        /// <summary>
        /// 微分显示5
        /// </summary>
        [Description("微分显示5")]
        public float D5 { get; set; }

        /// <summary>
        /// 微分显示6
        /// </summary>
        [Description("微分显示6")]
        public float D6 { get; set; }

        /// <summary>
        /// 温度输入设置1
        /// </summary>
        [Description("温度输入设置1")]
        public float TempSVSet1 { get; set; }

        /// <summary>
        /// 温度输入设置2
        /// </summary>
        [Description("温度输入设置2")]
        public float TempSVSet2 { get; set; }

        /// <summary>
        /// 温度输入设置3
        /// </summary>
        [Description("温度输入设置3")]
        public float TempSVSet3 { get; set; }

        /// <summary>
        /// 温度输入设置4
        /// </summary>
        [Description("温度输入设置4")]
        public float TempSVSet4 { get; set; }

        /// <summary>
        /// 温度输入设置5
        /// </summary>
        [Description("温度输入设置5")]
        public float TempSVSet5 { get; set; }

        /// <summary>
        /// 温度输入设置6
        /// </summary>
        [Description("温度输入设置6")]
        public float TempSVSet6 { get; set; }

        /// <summary>
        /// 温度输入被修改1
        /// </summary>
        [Description("温度输入被修改1")]
        public bool IsTempSetChanged1 { get; set; }

        /// <summary>
        /// 温度输入被修改2
        /// </summary>
        [Description("温度输入被修改2")]
        public bool IsTempSetChanged2 { get; set; }

        /// <summary>
        /// 温度输入被修改3
        /// </summary>
        [Description("温度输入被修改3")]
        public bool IsTempSetChanged3 { get; set; }

        /// <summary>
        /// 温度输入被修改4
        /// </summary>
        [Description("温度输入被修改4")]
        public bool IsTempSetChanged4 { get; set; }

        /// <summary>
        /// 温度输入被修改5
        /// </summary>
        [Description("温度输入被修改5")]
        public bool IsTempSetChanged5 { get; set; }

        /// <summary>
        /// 温度输入被修改6
        /// </summary>
        [Description("温度输入被修改6")]
        public bool IsTempSetChanged6 { get; set; }

        /// <summary>
        /// 冷却指示1
        /// </summary>
        [Description("冷却指示1")]
        public float IsCooling1 { get; set; }

        /// <summary>
        /// 冷却指示2
        /// </summary>
        [Description("冷却指示2")]
        public float IsCooling2 { get; set; }

        /// <summary>
        /// 冷却指示3
        /// </summary>
        [Description("冷却指示3")]
        public float IsCooling3 { get; set; }

        /// <summary>
        /// 冷却指示4
        /// </summary>
        [Description("冷却指示4")]
        public float IsCooling4 { get; set; }

        /// <summary>
        /// 加热指示1
        /// </summary>
        [Description("加热指示1")]
        public float IsHeating1 { get; set; }

        /// <summary>
        /// 加热指示2
        /// </summary>
        [Description("加热指示2")]
        public float IsHeating2 { get; set; }

        /// <summary>
        /// 加热指示3
        /// </summary>
        [Description("加热指示3")]
        public float IsHeating3 { get; set; }

        /// <summary>
        /// 加热指示4
        /// </summary>
        [Description("加热指示4")]
        public float IsHeating4 { get; set; }

        /// <summary>
        /// 加热指示5
        /// </summary>
        [Description("加热指示5")]
        public float IsHeating5 { get; set; }

        /// <summary>
        /// 加热指示6
        /// </summary>
        [Description("加热指示6")]
        public float IsHeating6 { get; set; }

        /// <summary>
        /// 加热开关1
        /// </summary>
        [Description("加热开关1")]
        public bool IsHeatingSet1 { get; set; }

        /// <summary>
        /// 加热开关2
        /// </summary>
        [Description("加热开关2")]
        public bool IsHeatingSet2 { get; set; }

        /// <summary>
        /// 加热开关3
        /// </summary>
        [Description("加热开关3")]
        public bool IsHeatingSet3 { get; set; }

        /// <summary>
        /// 加热开关4
        /// </summary>
        [Description("加热开关4")]
        public bool IsHeatingSet4 { get; set; }

        /// <summary>
        /// 加热开关5
        /// </summary>
        [Description("加热开关5")]
        public bool IsHeatingSet5 { get; set; }

        /// <summary>
        /// 加热开关6
        /// </summary>
        [Description("加热开关6")]
        public bool IsHeatingSet6 { get; set; }

        /// <summary>
        /// 全温度输入
        /// </summary>
        [Description("全温度输入")]
        public float AllTempSet { get; set; }

        /// <summary>
        /// 全温度输入被修改
        /// </summary>
        [Description("全温度输入被修改")]
        public bool IsAllTempSetChanged { get; set; }

        /// <summary>
        /// 全温度开关
        /// </summary>
        [Description("全温度开关")]
        public bool IsAllTempSame { get; set; }

        /// <summary>
        /// 熔温
        /// </summary>
        [Description("熔温")]
        public float MeltingTemp { get; set; }

        /// <summary>
        /// 熔压高报警!!!请检查
        /// </summary>
        [Description("熔压高报警!!!请检查")]
        [IsError()]
        public bool Warning001 { get; set; }

        #endregion
        public event PropertyChangedEventHandler PropertyChanged;


        public string[] GetSyncPropNames()
        {
            return null;
        }

        public string[] GetNoSyncPropNames()
        {
            return new string[] {
                nameof(Number),
                nameof(Temperatures)
            };
        }

        public List<TempCell> Temperatures { get; } = new List<TempCell>();

        /// <summary>
        /// 料仓,混料参数 绑定到 对应的队列
        /// </summary>
        void TemperaturesBinding()
        {
            Temperatures.Clear();

            for (int i = 0; i < 6; i++)
            {
                int no = i + 1;
                TempCell temperature = new TempCell();
                temperature.Number = no.ToString();

                Misc.BindingOperations.SetBinding(this, $"TempPV{no}", temperature, nameof(temperature.TempPV));
                Misc.BindingOperations.SetBinding(this, $"TempSV{no}", temperature, nameof(temperature.TempSV));

                Misc.BindingOperations.SetBinding(this, $"Channel{no}", temperature, nameof(temperature.Channel), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"PSet{no}", temperature, nameof(temperature.PSet), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"IsPChanged{no}", temperature, nameof(temperature.IsPChanged), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"ISet{no}", temperature, nameof(temperature.ISet), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"IsIChanged{no}", temperature, nameof(temperature.IsIChanged), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"DSet{no}", temperature, nameof(temperature.DSet), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"IsDChanged{no}", temperature, nameof(temperature.IsDChanged), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"TempCorr{no}", temperature, nameof(temperature.TempCorr), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"CoolingSet{no}", temperature, nameof(temperature.CoolingSet), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"IsSelfAdjustingSet{no}", temperature, nameof(temperature.IsSelfAdjustingSet), Misc.BindingOperations.BindingMode.TwoWay);

                Misc.BindingOperations.SetBinding(this, $"IsSelfAdjusting{no}", temperature, nameof(temperature.IsSelfAdjusting_float));

                Misc.BindingOperations.SetBinding(this, $"P{no}", temperature, nameof(temperature.P));
                Misc.BindingOperations.SetBinding(this, $"I{no}", temperature, nameof(temperature.I));
                Misc.BindingOperations.SetBinding(this, $"D{no}", temperature, nameof(temperature.D));
                
                Misc.BindingOperations.SetBinding(this, $"IsCooling{no}", temperature, nameof(temperature.IsCooling_float));
                Misc.BindingOperations.SetBinding(this, $"IsHeating{no}", temperature, nameof(temperature.IsHeating_float));
                Misc.BindingOperations.SetBinding(this, $"IsHeatingSet{no}", temperature, nameof(temperature.IsHeatingSet), Misc.BindingOperations.BindingMode.TwoWay);

                Misc.BindingOperations.SetBinding(this, $"TempSVSet{no}", temperature, nameof(temperature.TempSVSet), Misc.BindingOperations.BindingMode.TwoWay);
                Misc.BindingOperations.SetBinding(this, $"IsTempSetChanged{no}", temperature, nameof(temperature.IsTempSetChanged), Misc.BindingOperations.BindingMode.TwoWay);

                Temperatures.Add(temperature);
            }


        }
    }

    public class TempCell : INotifyPropertyChanged
    {
        /// <summary>
        /// 序号
        /// </summary>
        public string Number { get; set; }
        /// <summary>
        /// 温度显示
        /// </summary>
        [Description("温度显示")]
        public float TempPV { get; set; }

        /// <summary>
        /// 温度输入
        /// </summary>
        [Description("温度输入")]
        public float TempSV { get; set; }

        /// <summary>
        /// 通道选择
        /// </summary>
        [Description("通道选择")]
        public float Channel { get; set; }

        /// <summary>
        /// 比例输入
        /// </summary>
        [Description("比例输入")]
        public float PSet { get; set; }


        /// <summary>
        /// 比例修改通知
        /// </summary>
        [Description("比例修改通知")]
        public bool IsPChanged { get; set; }

        /// <summary>
        /// 积分输入
        /// </summary>
        [Description("积分输入")]
        public float ISet { get; set; }


        /// <summary>
        /// 积分修改通知
        /// </summary>
        [Description("积分修改通知")]
        public bool IsIChanged { get; set; }


        /// <summary>
        /// 微分输入
        /// </summary>
        [Description("微分输入")]
        public float DSet { get; set; }


        /// <summary>
        /// 微分修改通知
        /// </summary>
        [Description("微分修改通知")]
        public bool IsDChanged { get; set; }


        /// <summary>
        /// 温度修正
        /// </summary>
        [Description("温度修正")]
        public float TempCorr { get; set; }


        /// <summary>
        /// 冷却设定
        /// </summary>
        [Description("冷却设定")]
        public float CoolingSet { get; set; }


        /// <summary>
        /// 整定开关
        /// </summary>
        [Description("整定开关")]
        public bool IsSelfAdjustingSet { get; set; }


        /// <summary>
        /// 整定显示
        /// </summary>
        [Description("整定显示")]
        public bool IsSelfAdjusting => IsSelfAdjusting_float == 1;

        public float IsSelfAdjusting_float { get; set; }

        /// <summary>
        /// 比例显示
        /// </summary>
        [Description("比例显示")]
        public float P { get; set; }


        /// <summary>
        /// 积分显示
        /// </summary>
        [Description("积分显示")]
        public float I { get; set; }


        /// <summary>
        /// 微分显示
        /// </summary>
        [Description("微分显示")]
        public float D { get; set; }



        /// <summary>
        /// 冷却指示
        /// </summary>
        [Description("冷却指示")]
        public bool IsCooling => IsCooling_float == 1;

        public float IsCooling_float { get; set; }
        /// <summary>
        /// 加热指示
        /// </summary>
        [Description("加热指示")]
        public bool IsHeating => IsHeating_float == 1;
        public float IsHeating_float { get; set; }

        /// <summary>
        /// 加热开关
        /// </summary>
        [Description("加热开关")]
        public bool IsHeatingSet { get; set; }


        /// <summary>
        /// 温度输入设置
        /// </summary>
        [Description("温度输入设置")]
        public float TempSVSet { get; set; }
        /// <summary>
        /// 温度输入被修改通知
        /// </summary>
        [Description("温度输入被修改通知")]
        public bool IsTempSetChanged { get; set; }


        public event PropertyChangedEventHandler PropertyChanged;
    }
}