| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151 | using Caliburn.Micro.Core;using RecipeEditorLib.RecipeModel.Params;using System;using System.Collections.Generic;using System.Collections.ObjectModel;using System.Linq;using System.Text;using System.Threading.Tasks;namespace MECF.Framework.UI.Client.CenterViews.Parameter{    public class TempProfileTable : ParameterTable    {        private string _preheatTime;        public string PreheatTime        {            get => _preheatTime;            set            {                _preheatTime = value;                NotifyOfPropertyChange("PreheatTime");            }        }        private string _checkTime;        public string CheckTime        {            get => _checkTime;            set            {                _checkTime = value;                NotifyOfPropertyChange("CheckTime");            }        }        private DoubleParam _limitU;        public DoubleParam LimitU        {            get => _limitU;            set            {                _limitU = value;                NotifyOfPropertyChange("LimitU");            }        }        private DoubleParam _limitCU;        public DoubleParam LimitCU        {            get => _limitCU;            set            {                _limitCU = value;                NotifyOfPropertyChange("LimitCU");            }        }        private DoubleParam _limitC;        public DoubleParam LimitC        {            get => _limitC;            set            {                _limitC = value;                NotifyOfPropertyChange("LimitC");            }        }        private DoubleParam _limitCL;        public DoubleParam LimitCL        {            get => _limitCL;            set            {                _limitCL = value;                NotifyOfPropertyChange("LimitCL");            }        }        private DoubleParam _limitL;        public DoubleParam LimitL        {            get => _limitL;            set            {                _limitL = value;                NotifyOfPropertyChange("LimitL");            }        }        private string _totalTime;        public string TotalTime        {            get => _totalTime;            set            {                _totalTime = value;                NotifyOfPropertyChange("TotalTime");            }        }        private DoubleParam _alarmLimit;        public DoubleParam AlarmLimit        {            get => _alarmLimit;            set            {                _alarmLimit = value;                NotifyOfPropertyChange("AlarmLimit");            }        }        public TempProfileTable() : base()        {        }        public TempProfileTable(ParameterDataBase recipeData)        {            if (recipeData.Steps.Count <= 0) return;            SetCurrentRecipeStep(recipeData, recipeData.Steps[0]);        }        public TempProfileTable(ParameterDataBase recipeData, int selectedStepNo)        {            ParameterTable step = recipeData.Steps.Where(x => x.StepNo == selectedStepNo).FirstOrDefault();            SetCurrentRecipeStep(recipeData, step);        }        public void SetTempCorrectionData(string value)        {            if (string.IsNullOrEmpty(value)) return;            string[] strTempCorrection = value.Split('|');            foreach (var item in strTempCorrection)            {                if (string.IsNullOrEmpty(item)) continue;                string[] subTempCorrection = item.Split(';');                Dictionary<string, string> dictTempCorrection = new Dictionary<string, string>();                foreach (var pid in subTempCorrection)                {                    if (string.IsNullOrEmpty(item)) continue;                    var keyValue = pid.Split(':');                    if (keyValue == null || keyValue.Length != 2) continue;                    dictTempCorrection[keyValue[0]] = keyValue[1];                }                          }        }    }}
 |