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 APCPIDTable : ParameterTable { public APCPIDTable() : base() { } private DoubleParam _p; public DoubleParam P { get => _p; set { _p = value; NotifyOfPropertyChange(nameof(P)); } } private DoubleParam _i; public DoubleParam I { get => _i; set { _i = value; NotifyOfPropertyChange(nameof(I)); } } private DoubleParam _d; public DoubleParam D { get => _d; set { _d = value; NotifyOfPropertyChange(nameof(D)); } } private DoubleParam _a; public DoubleParam A { get => _a; set { _a = value; NotifyOfPropertyChange(nameof(A)); } } private DoubleParam _offset; public DoubleParam Offset { get => _offset; set { _offset = value; NotifyOfPropertyChange(nameof(Offset)); } } private DoubleParam _ch; public DoubleParam CH { get => _ch; set { _ch = value; NotifyOfPropertyChange(nameof(CH)); } } private DoubleParam _cl; public DoubleParam CL { get => _cl; set { _cl = value; NotifyOfPropertyChange(nameof(CL)); } } public APCPIDTable(ParameterDataBase recipeData) { if (recipeData.Steps.Count <= 0) return; SetCurrentRecipeStep(recipeData, recipeData.Steps[0]); } public APCPIDTable(ParameterDataBase recipeData, int selectedStepNo) { ParameterTable step = recipeData.Steps.Where(x => x.StepNo == selectedStepNo).FirstOrDefault(); SetCurrentRecipeStep(recipeData, step); } } }