123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- 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 TempAutoPIDTable : ParameterTable
- {
- public TempAutoPIDTable() : base()
- {
- }
- public TempAutoPIDTable(ParameterDataBase recipeData)
- {
- if (recipeData.Steps.Count <= 0) return;
- SetCurrentRecipeStep(recipeData, recipeData.Steps[0]);
- }
- public TempAutoPIDTable(ParameterDataBase recipeData, int selectedStepNo)
- {
- ParameterTable step = recipeData.Steps.Where(x => x.StepNo == selectedStepNo).FirstOrDefault();
- SetCurrentRecipeStep(recipeData, step);
- }
- public void SetTempPIDData(string value)
- {
- if (string.IsNullOrEmpty(value)) return;
- string[] strTempPID = value.Split('|');
- foreach (var item in strTempPID)
- {
- if (string.IsNullOrEmpty(item)) continue;
- string[] subTempPID = item.Split(';');
- Dictionary<string, string> dictTempPID = new Dictionary<string, string>();
- foreach (var pid in subTempPID)
- {
- if (string.IsNullOrEmpty(item)) continue;
- var keyValue = pid.Split(':');
- if (keyValue == null || keyValue.Length != 2) continue;
- dictTempPID[keyValue[0]] = keyValue[1];
- }
-
- }
- }
- }
- }
|