| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554 | 
							- using Aitex.Core.RT.Log;
 
- using Aitex.Core.UI.ControlDataContext;
 
- using Aitex.Core.Util;
 
- using Caliburn.Micro;
 
- using Caliburn.Micro.Core;
 
- using MECF.Framework.Common.CommonData;
 
- using MECF.Framework.Common.ControlDataContext;
 
- using MECF.Framework.Common.DataCenter;
 
- using MECF.Framework.Common.Utilities;
 
- using MECF.Framework.UI.Client.CenterViews.Configs.SystemConfig;
 
- using MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory;
 
- using MECF.Framework.UI.Client.CenterViews.Dialogs;
 
- using MECF.Framework.UI.Client.ClientBase;
 
- using OpenSEMI.ClientBase;
 
- using SciChart.Charting.Visuals;
 
- using SciChart.Charting.Visuals.Annotations;
 
- using SciChart.Charting.Visuals.Axes;
 
- using SciChart.Charting.Visuals.RenderableSeries;
 
- using SciChart.Data.Model;
 
- using System;
 
- using System.Collections.Concurrent;
 
- using System.Collections.Generic;
 
- using System.Collections.ObjectModel;
 
- using System.Data;
 
- using System.Diagnostics;
 
- using System.Drawing;
 
- using System.Linq;
 
- using System.Threading;
 
- using System.Threading.Tasks;
 
- using System.Windows;
 
- using System.Windows.Controls;
 
- using Action = System.Action;
 
- using Media = System.Windows.Media;
 
- using SciChart.Charting.Model.ChartData;
 
- namespace MECF.Framework.UI.Client.CenterViews.DataLogs.ProcessHistory
 
- {
 
-     public class StepInfo
 
-     {
 
-         public DateTime StartTime { get; set; }
 
-         public DateTime StepEndTime { get; set; }
 
-         public DateTime EndTime { get; set; }
 
-         public string StepNo { get; set; }
 
-         public string StepName { get; set; }
 
-         public double StepTime { get; set; }
 
-         public bool IsChecked { get; set; } = true;
 
-         public string SubRecipeStepNumber { get; set; }
 
-         public string SubRecipeStepName { get; set; }
 
-         public string SubRecipeStepTime { get; set; }
 
-         public string SubRecipeLoopInfo { get; set; }
 
-         public string TempCorrection { get; set; }
 
-         public string TempPid { get; set; }
 
-     }
 
-     public class ProcessDetailViewModel<T> : ModuleUiViewModelBase where T : IComparable
 
-     {
 
-         public class TimeChartDataLine : ChartDataLine<T>
 
-         {
 
-             public string Module { get; set; }
 
-             public DateTime StartTime { get; set; }
 
-             public DateTime EndTime { get; set; }
 
-             public TimeChartDataLine(string dataName, string module, DateTime startTime, DateTime endTime) : base(dataName)
 
-             {
 
-                 StartTime = startTime;
 
-                 EndTime = endTime;
 
-                 Module = module;
 
-             }
 
-         }
 
-         public class QueryIndexer
 
-         {
 
-             public TimeChartDataLine DataLine { get; set; }
 
-             public List<string> DataList { get; set; }
 
-             public DateTime TimeToken { get; set; }
 
-         }
 
-         public bool IsPermission { get => this.Permission == 3; }
 
-         private ProcessDetailView view;
 
-         /// <summary>
 
-         /// 正在导出数据事件。
 
-         /// </summary>
 
-         private event EventHandler Exporting;
 
-         private CancellationTokenSource _cancellationTokenSource;
 
-         #region Property
 
-         private const int MAX_PARAMETERS = 20;
 
-         private Queue<Color> colorQueue = new Queue<Color>(new Color[]{Color.Red,Color.Orange,Color.Yellow,Color.Green,Color.Blue,Color.Pink,Color.Purple,Color.Aqua,Color.Bisque,Color.Brown,Color.BurlyWood,Color.CadetBlue,
 
-             Color.CornflowerBlue,Color.DarkBlue,Color.DarkCyan,Color.DarkGray,Color.DarkGreen,Color.DarkKhaki,Color.DarkMagenta,Color.DarkOliveGreen, Color.DarkOrange,
 
-             Color.DarkSeaGreen,Color.DarkSlateBlue,Color.DarkSlateGray,Color.DarkViolet,Color.DeepPink,Color.DeepSkyBlue,Color.DimGray, Color.DodgerBlue,Color.ForestGreen, Color.Gold,
 
-             Color.Gray,Color.GreenYellow,Color.HotPink,Color.Indigo,Color.Khaki,Color.LightBlue,Color.LightCoral,Color.LightGreen, Color.LightPink,Color.LightSalmon,Color.LightSkyBlue,
 
-             Color.LightSlateGray,Color.LightSteelBlue,Color.LimeGreen,Color.MediumOrchid,Color.MediumPurple,Color.MediumSeaGreen,Color.MediumSlateBlue,Color.MediumSpringGreen,
 
-             Color.MediumTurquoise,Color.Moccasin,Color.NavajoWhite,Color.Olive,Color.OliveDrab,Color.OrangeRed,Color.Orchid,Color.PaleGoldenrod,Color.PaleGreen,
 
-             Color.PeachPuff,Color.Peru,Color.Plum,Color.PowderBlue,Color.RosyBrown,Color.RoyalBlue,Color.SaddleBrown,Color.Salmon,Color.SeaGreen, Color.Sienna,
 
-             Color.SkyBlue,Color.SlateBlue,Color.SlateGray,Color.SpringGreen,Color.Teal,Color.Aquamarine,Color.Tomato,Color.Turquoise,Color.Violet,Color.Wheat, Color.YellowGreen});
 
-         private ObservableCollection<ParameterNode> _ParameterNodes;
 
-         public ObservableCollection<ParameterNode> ParameterNodes
 
-         {
 
-             get { return _ParameterNodes; }
 
-             set { _ParameterNodes = value; NotifyOfPropertyChange("ParameterNodes"); }
 
-         }
 
-         public ObservableCollection<IRenderableSeries> SelectedData { get; set; }
 
-         public List<ProcessHistoryLot> RecipeDatas { get; set; }
 
-         private static object _lockSelection = new object();
 
-         private AutoRange _autoRange;
 
-         public AutoRange ChartAutoRange
 
-         {
 
-             get { return _autoRange; }
 
-             set
 
-             {
 
-                 _autoRange = value;
 
-                 NotifyOfPropertyChange(nameof(ChartAutoRange));
 
-             }
 
-         }
 
-         private IRange _timeRange;
 
-         public IRange VisibleRangeTime
 
-         {
 
-             get { return _timeRange; }
 
-             set
 
-             {
 
-                 _timeRange = value;
 
-                 NotifyOfPropertyChange(nameof(VisibleRangeTime));
 
-             }
 
-         }
 
-         private IRange _VisibleRangeValue;
 
-         public IRange VisibleRangeValue
 
-         {
 
-             get { return _VisibleRangeValue; }
 
-             set { _VisibleRangeValue = value; NotifyOfPropertyChange(nameof(VisibleRangeValue)); }
 
-         }
 
-         private PeriodicJob _thread;
 
-         private ConcurrentBag<QueryIndexer> _lstTokenTimeData = new ConcurrentBag<QueryIndexer>();
 
-         private Dictionary<string, string> _processDetailDisplayDic = new Dictionary<string, string>();
 
-         private string _resolution;
 
-         private AnnotationCollection _annotations;
 
-         public AnnotationCollection Annotations
 
-         {
 
-             get => _annotations;
 
-             set
 
-             {
 
-                 _annotations = value;
 
-                 InvokePropertyChanged(nameof(Annotations));
 
-             }
 
-         }
 
-         //StartTime,EndTime,StepNo,StepName
 
-         private List<StepInfo> _stepInfo = new List<StepInfo>();
 
-         public List<StepInfo> StepInfo
 
-         {
 
-             get { return _stepInfo; }
 
-             set { _stepInfo = value; this.NotifyOfPropertyChange(nameof(StepInfo)); }
 
-         }
 
-         public bool IsStepVisiable => RecipeDatas.Count == 1;
 
-         public DateTime StepStartTime { get; set; }
 
-         public DateTime StepEndTime { get; set; }
 
-         private bool _isAdding;
 
-         private string _stepName;
 
-         public string StepNameDisPlay
 
-         {
 
-             get { return _stepName; }
 
-             set
 
-             {
 
-                 if (_stepName != value)
 
-                 {
 
-                     _stepName = value;
 
-                     NotifyOfPropertyChange(nameof(StepNameDisPlay));
 
-                 }
 
-             }
 
-         }
 
-         private string _recipeNameDisPlay;
 
-         public string RecipeNameDisPlay
 
-         {
 
-             get { return _recipeNameDisPlay; }
 
-             set
 
-             {
 
-                 if (_recipeNameDisPlay != value)
 
-                 {
 
-                     _recipeNameDisPlay = value;
 
-                     NotifyOfPropertyChange(nameof(RecipeNameDisPlay));
 
-                 }
 
-             }
 
-         }
 
-         private DateTime _pointTime;
 
-         public DateTime PointTime
 
-         {
 
-             get { return _pointTime; }
 
-             set
 
-             {
 
-                 if (_pointTime != value)
 
-                 {
 
-                     _pointTime = value;
 
-                     NotifyOfPropertyChange(nameof(PointTime));
 
-                 }
 
-             }
 
-         }
 
-         private string _lastPointX = string.Empty;
 
-         #endregion
 
-         #region Function
 
-         public ProcessDetailViewModel(List<ProcessHistoryLot> recipes)
 
-         {
 
-             DisplayName = "Process Detail";
 
-             RecipeDatas = recipes;
 
-             ParameterNodes = GetParameters();
 
-             if (recipes == null || recipes.Count == 0)
 
-             {
 
-                 return;
 
-             }
 
-             SelectedData = new ObservableCollection<IRenderableSeries>();
 
-             var now = DateTime.Now;
 
-             VisibleRangeTime = new DateRange(DateTime.Now.AddMinutes(60), DateTime.Now.AddMinutes(-60));
 
-             VisibleRangeValue = new DoubleRange(0, 10);
 
-             Annotations = new AnnotationCollection();
 
-             _thread = new PeriodicJob(200, MonitorData, "ProcessDetail", true);
 
-             RecipeDatas.ToList().ForEach(recipe =>
 
-             {
 
-                 QueryStep(recipe.StartTime, recipe.EndTime);
 
-             });
 
-             if (StepInfo != null && StepInfo.Count > 0)
 
-             {
 
-                 StepStartTime = StepInfo.FirstOrDefault().StartTime;
 
-                 StepEndTime = StepInfo.LastOrDefault().EndTime;
 
-             }
 
-         }
 
-         protected override void OnViewLoaded(object view)
 
-         {
 
-             base.OnViewLoaded(view);
 
-             this.view = (ProcessDetailView)view;
 
-         }
 
-         protected override void OnActivate()
 
-         {
 
-             _resolution = "f1";
 
-             if (QueryDataClient.Instance.Service.GetConfig($"System.DataHistoryResolution") != null)
 
-                 _resolution = $"f{QueryDataClient.Instance.Service.GetConfig($"System.DataHistoryResolution")}";
 
-             base.OnActivate();
 
-         }
 
-         public void QueryStep(DateTime starTime, DateTime endTime)//, string recipeName去掉查询recipeName名称,有嵌套调用
 
-         {
 
-             starTime = starTime.AddMinutes(-1);
 
-             endTime = endTime.AddMinutes(1);
 
-             string sql = $"SELECT * FROM \"process_data\" where (\"process_begin_time\" >= '{starTime:yyyy/MM/dd HH:mm:ss.fff}' and \"process_end_time\" <= '{endTime:yyyy/MM/dd HH:mm:ss.fff}') order by \"process_begin_time\" DESC;";
 
-             DataTable dbData = QueryDataClient.Instance.Service.QueryData(sql);
 
-             if (dbData != null && dbData.Rows.Count > 0)
 
-             {
 
-                 List<ProcessDataLot> ProcessDataLotList = new List<ProcessDataLot>();
 
-                 for (int i = 0; i < dbData.Rows.Count; i++)
 
-                 {
 
-                     ProcessDataLot item = new ProcessDataLot();
 
-                     item.GUID = dbData.Rows[i]["guid"].ToString();
 
-                     item.RecipeName = dbData.Rows[i]["recipe_name"].ToString();
 
-                     item.ProcessStatus = dbData.Rows[i]["process_status"].ToString();
 
-                     item.WaferDataGUID = dbData.Rows[i]["wafer_data_guid"].ToString();
 
-                     item.ProcessIn = dbData.Rows[i]["process_in"].ToString();
 
-                     if (!dbData.Rows[i]["process_begin_time"].Equals(DBNull.Value))
 
-                     {
 
-                         item.ProcessBeginTime = (DateTime)dbData.Rows[i]["process_begin_time"];
 
-                     }
 
-                     if (!dbData.Rows[i]["process_end_time"].Equals(DBNull.Value))
 
-                     {
 
-                         item.ProcessEndTime = (DateTime)dbData.Rows[i]["process_end_time"];
 
-                     }
 
-                     ProcessDataLotList.Add(item);
 
-                 }
 
-                 Annotations.Add(VerLine(Media.Brushes.Blue, ProcessDataLotList[0].ProcessBeginTime, Media.Brushes.Blue, $"{ProcessDataLotList[0].RecipeName}"));
 
-                 Annotations.Add(VerLine(Media.Brushes.Blue, ProcessDataLotList[0].ProcessEndTime, Media.Brushes.Blue, $"Recipe End"));
 
-                 string sql2 = $"SELECT * FROM \"recipe_step_data\" where";
 
-                 sql2 += $" \"recipe_step_data\".\"process_data_guid\" = '{ProcessDataLotList[0].GUID.ToString()}'";
 
-                 sql2 += " order by \"step_begin_time\" ASC;";
 
-                 using (var table = QueryDataClient.Instance.Service.QueryData(sql2))
 
-                 {
 
-                     if (!(table == null || table.Rows.Count == 0))
 
-                     {
 
-                         for (int i = 0; i < table.Rows.Count; i++)
 
-                         {
 
-                             var item = table.Rows[i];
 
-                             string startStepTime = "";
 
-                             string endStepTime = "";
 
-                             double stepTime = 0;
 
-                             if (!item["step_begin_time"].Equals(DBNull.Value))
 
-                                 startStepTime = ((DateTime)item["step_begin_time"]).ToString("yyyy/MM/dd HH:mm:ss.fff");
 
-                             if (!item["step_end_time"].Equals(DBNull.Value))
 
-                                 endStepTime = ((DateTime)item["step_end_time"]).ToString("yyyy/MM/dd HH:mm:ss.fff");
 
-                             if (!item["step_time"].Equals(DBNull.Value))
 
-                             {
 
-                                 stepTime = (float)item["step_time"];
 
-                             }
 
-                             string stepNo = item["step_number"].ToString();
 
-                             string stepName = item["step_name"].ToString();
 
-                             if (DateTime.TryParse(startStepTime, out DateTime StartTime) && DateTime.TryParse(endStepTime, out DateTime EndTime))
 
-                             {
 
-                                 //Annotations.Add(VerLine(Media.Brushes.AliceBlue, StartTime, Media.Brushes.Blue, $"{stepNo}"));
 
-                                 if (EndTime < StartTime.AddSeconds(stepTime))
 
-                                 {
 
-                                     EndTime = StartTime.AddSeconds(stepTime);
 
-                                 }
 
-                                 _stepInfo.Add(new StepInfo() { StartTime = StartTime, EndTime = EndTime, StepName = stepName, StepTime = stepTime, StepNo = stepNo });
 
-                             }
 
-                         }
 
-                     }
 
-                 }
 
-             }
 
-         }
 
-         public static VerticalLineAnnotation VerLine(Media.Brush stroke, DateTime x, Media.Brush color, string text)
 
-         {
 
-             var label = new AnnotationLabel()
 
-             {
 
-                 LabelPlacement = LabelPlacement.TopRight,
 
-                 FontSize = 12,
 
-                 RotationAngle = 0,
 
-                 Foreground = color,
 
-                 Text = text
 
-             };
 
-             var line = new VerticalLineAnnotation()
 
-             {
 
-                 Stroke = stroke,
 
-                 StrokeThickness = 1,
 
-                 X1 = x,
 
-                 IsEditable = false,
 
-                 VerticalAlignment = VerticalAlignment.Stretch,
 
-                 AnnotationLabels = new ObservableCollection<AnnotationLabel>() { label },
 
-             };
 
-             return line;
 
-         }
 
-         protected bool MonitorData()
 
-         {
 
-             try
 
-             {
 
-                 if (_isAdding)
 
-                     return true;
 
-                 bool allUpdated = true;
 
-                 for (int j = 0; j < ParameterNodes.Count; j++)
 
-                 {
 
-                     ParameterNode par = ParameterNodes[j];
 
-                     par.IsVisibilityParentNode = Visibility.Hidden;
 
-                 }
 
-                 lock (_lockSelection)
 
-                 {
 
-                     foreach (var item in _lstTokenTimeData)
 
-                     {
 
-                         DateTime timeFrom = item.TimeToken;
 
-                         if (timeFrom >= item.DataLine.EndTime)
 
-                             continue;
 
-                         allUpdated = false;
 
-                         ChartAutoRange = AutoRange.Always;
 
-                         DateTime timeTo = timeFrom.AddMinutes(60);
 
-                         if (timeTo.DayOfYear > timeFrom.DayOfYear)
 
-                             timeTo = new DateTime(timeFrom.Year, timeFrom.Month, timeFrom.Day).AddDays(1);
 
-                         if (timeTo > item.DataLine.EndTime)
 
-                             timeTo = item.DataLine.EndTime;
 
-                         item.TimeToken = timeTo;
 
-                         GetData(item.DataList, timeFrom, timeTo, item.DataLine.Module, item.DataLine.DataSource);
 
-                         #region Update   VisualMin、VisualMax、DataStatisticsInfo
 
-                         Application.Current.Dispatcher.BeginInvoke(new Action(() =>
 
-                         {
 
-                             double min = ((DoubleRange)VisibleRangeValue).Min;
 
-                             double max = ((DoubleRange)VisibleRangeValue).Max;
 
-                             int PointCount = 0;
 
-                             foreach (var selectedData in SelectedData)
 
-                             {
 
-                                 var seriesItem = selectedData as ChartDataLine<T>;
 
-                                 if (seriesItem == null)
 
-                                     continue;
 
-                                 double sumValue = 0;
 
-                                 double minValue = 100000;
 
-                                 double maxValue = 0;
 
-                                 double averageValue = 0;
 
-                                 double stdevValue = 0;
 
-                                 double sigma3Value = 0;
 
-                                 var pointValueList = seriesItem.Points.Select(x => x.Item2).ToList();
 
-                                 for (int i = 0; i < pointValueList.Count; i++)
 
-                                 {
 
-                                     sumValue += pointValueList[i];
 
-                                     if (pointValueList[i] < minValue)
 
-                                         minValue = pointValueList[i];
 
-                                     if (pointValueList[i] > maxValue)
 
-                                         maxValue = pointValueList[i];
 
-                                 }
 
-                                 averageValue = sumValue / pointValueList.Count;
 
-                                 for (int i = 0; i < pointValueList.Count; i++)
 
-                                 {
 
-                                     stdevValue += Math.Pow(pointValueList[i] - averageValue, 2);
 
-                                 }
 
-                                 stdevValue = stdevValue / pointValueList.Count;
 
-                                 sigma3Value = Math.Sqrt(stdevValue) * 3;
 
-                                 (seriesItem.Tag as ParameterNode).AverageValue = averageValue.ToString("F2");
 
-                                 (seriesItem.Tag as ParameterNode).MinValue = minValue.ToString("F2");
 
-                                 (seriesItem.Tag as ParameterNode).MaxValue = maxValue.ToString("F2");
 
-                                 (seriesItem.Tag as ParameterNode).Sigma3Value = sigma3Value.ToString("F2");
 
-                                 min = minValue;
 
-                                 max = maxValue;
 
-                                 PointCount = pointValueList.Count;
 
-                             }
 
-                             VisibleRangeValue = new DoubleRange(min, max);
 
-                         }));
 
-                         #endregion
 
-                     }
 
-                 }
 
-                 if (allUpdated)
 
-                 {
 
-                     lock (_lockSelection)
 
-                     {
 
-                         while (_lstTokenTimeData.Count > 0)
 
-                         {
 
-                             _lstTokenTimeData.TryTake(out _);
 
-                         }
 
-                         ChartAutoRange = AutoRange.Never;
 
-                     }
 
-                 }
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.Error(ex.Message);
 
-             }
 
-             return true;
 
-         }
 
-         public ObservableCollection<ParameterNode> GetParameters()
 
-         {
 
-             ObservableCollection<ParameterNode> rootNode = new ObservableCollection<ParameterNode>();
 
-             try
 
-             {
 
-                 Dictionary<string, string> displayDic = QueryDataClient.Instance.Service.GetData("System.ProcessDetailDisplay") as Dictionary<string, string>;
 
-                 if (displayDic == null)
 
-                     return rootNode;
 
-                 List<string> dataList = new List<string>();
 
-                 foreach (var key in displayDic.Keys)
 
-                 {
 
-                     string[] item = key.Split('.');
 
-                     if (item != null)
 
-                     {
 
-                         if (item.Length == 2)
 
-                         {
 
-                             _processDetailDisplayDic.Add($"{item[1]}", displayDic[key]);
 
-                             dataList.Add($"{item[0]}.{item[1]}");
 
-                         }
 
-                         else if (item.Length == 3)
 
-                         {
 
-                             _processDetailDisplayDic.Add($"{item[1]} {item[2]}", displayDic[key]);
 
-                             dataList.Add($"{item[0]}.{item[1]}.{item[2]}");
 
-                         }
 
-                         //if (item[0] == "MFC") // MFC.MFCN1.Set
 
-                         //{
 
-                         //    if (item.Length > 2)
 
-                         //    {
 
-                         //        _processDetailDisplayDic.Add($"{item[1]} {item[2]}", displayDic[key]);
 
-                         //        dataList.Add($"{item[0]}.{item[1]}.{item[2]}");
 
-                         //    }
 
-                         //}
 
-                         //else if (item[0] == "MFM") // MFM.MFMH2.Actual
 
-                         //{
 
-                         //    if (item.Length > 2)
 
-                         //    {
 
-                         //        _processDetailDisplayDic.Add($"{item[1]} {item[2]}", displayDic[key]);
 
-                         //        dataList.Add($"{item[0]}.{item[1]}.{item[2]}");
 
-                         //    }
 
-                         //}
 
-                         //else if (item[0] == "Heater") // Heater.Paddle Set.TopZone
 
-                         //{
 
-                         //    if (item.Length > 2)
 
-                         //    {
 
-                         //        _processDetailDisplayDic.Add($"{item[1]} {item[2]}", displayDic[key]);
 
-                         //        dataList.Add($"{item[0]}.{item[1]}.{item[2]}");
 
-                         //    }
 
-                         //}
 
-                         //else // APC.Position Actual
 
-                         //{
 
-                         //    if (item.Length == 2)
 
-                         //    {
 
-                         //        _processDetailDisplayDic.Add($"{item[1]}", displayDic[key]);
 
-                         //        dataList.Add($"{item[0]}.{item[1]}");
 
-                         //    }
 
-                         //    else if (item.Length == 3)
 
-                         //    {
 
-                         //        _processDetailDisplayDic.Add($"{item[1]}.{item[2]}", displayDic[key]);
 
-                         //        dataList.Add($"{item[0]}.{item[1]}.{item[2]}");
 
-                         //    }
 
-                         //}
 
-                     }
 
-                 }
 
-                 //_keyValuePairs.Add("ChamberPressure", "PM1.ChamberPressure");
 
-                 //_keyValuePairs.Add("Position.Set", "PM1.APC.PositionSetPoint");
 
-                 //_keyValuePairs.Add("Position.Actual", "PM1.APC.PositionFeedback");
 
-                 //_keyValuePairs.Add("Pressure.Set", "PM1.APC.PressureSetPoint");
 
-                 //_keyValuePairs.Add("Pressure.Actual", "PM1.APC.PressureFeedback");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCD1.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCD1.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCJ1.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCJ1.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCM1.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCM1.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCM2.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCM2.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN1.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN1.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN2.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN2.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN3.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN3.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNR.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNR.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNX.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNX.GasName")}.Actual");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNY.GasName")}.Set");
 
-                 //dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNY.GasName")}.Actual");
 
-                 //dataList.Add($"MFM.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFM.MfmD1.Name")}.Set");
 
-                 //dataList.Add($"MFM.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFM.MfmD1.Name")}.Actual");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCD1.GasName")}.Set", "PM1.MfcD1.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCD1.GasName")}.Actual", "PM1.MfcD1.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCJ1.GasName")}.Set", "PM1.MfcJ1.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCJ1.GasName")}.Actual", "PM1.MfcJ1.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCM1.GasName")}.Set", "PM1.MfcM1.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCM1.GasName")}.Actual", "PM1.MfcM1.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCM2.GasName")}.Set", "PM1.MfcM2.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCM2.GasName")}.Actual", "PM1.MfcM2.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN1.GasName")}.Set", "PM1.MfcN1.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN1.GasName")}.Actual", "PM1.MfcN1.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN2.GasName")}.Set", "PM1.MfcN2.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN2.GasName")}.Actual", "PM1.MfcN2.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN3.GasName")}.Set", "PM1.MfcN3.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCN3.GasName")}.Actual", "PM1.MfcN3.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNR.GasName")}.Set", "PM1.MfcNR.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNR.GasName")}.Actual", "PM1.MfcNR.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNX.GasName")}.Set", "PM1.MfcNX.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNX.GasName")}.Actual", "PM1.MfcNX.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNY.GasName")}.Set", "PM1.MfcNY.SetPoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFCNY.GasName")}.Actual", "PM1.MfcNY.Feedback");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFM.MfmD1.Name")}.Set", "PM1.MfmD1._setpoint");
 
-                 //_keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFM.MfmD1.Name")}.Actual", "PM1.MfmD1.Feedback");
 
-                 //for (int i = 11; i <= 16; i++)
 
-                 //{
 
-                 //    dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFC{i}.GasName")}.Set");
 
-                 //    dataList.Add($"MFC.{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFC{i}.GasName")}.Actual");
 
-                 //    _keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFC{i}.GasName")}.Set", $"PM1.Mfc{i}.SetPoint");
 
-                 //    _keyValuePairs.Add($"{SystemConfigProvider.Instance.GetValueByName($"PM1.MFC.MFC{i}.GasName")}.Actual", $"PM1.Mfc{i}.Feedback");
 
-                 //}
 
-                 //for (int i = 1; i < 10; i += 2)
 
-                 //{
 
-                 //    dataList.Add($"Heater.Inner {SystemConfigProvider.Instance.GetValueByName($"PM1.Heater.Heater{i}.DisplayName")}.Set");
 
-                 //    dataList.Add($"Heater.Inner {SystemConfigProvider.Instance.GetValueByName($"PM1.Heater.Heater{i}.DisplayName")}.Actual");
 
-                 //    _keyValuePairs.Add($"Inner {SystemConfigProvider.Instance.GetValueByName($"PM1.Heater.Heater{i}.DisplayName")}.Set", $"PM1.Heater{i}.TempSetPoint");
 
-                 //    _keyValuePairs.Add($"Inner {SystemConfigProvider.Instance.GetValueByName($"PM1.Heater.Heater{i}.DisplayName")}.Actual", $"PM1.Heater{i}.TempFeedback");
 
-                 //}
 
-                 //for (int i = 2; i <= 10; i += 2)
 
-                 //{
 
-                 //    dataList.Add($"Heater.Outer {SystemConfigProvider.Instance.GetValueByName($"PM1.Heater.Heater{i}.DisplayName")}.Set");
 
-                 //    dataList.Add($"Heater.Outer {SystemConfigProvider.Instance.GetValueByName($"PM1.Heater.Heater{i}.DisplayName")}.Actual");
 
-                 //    _keyValuePairs.Add($"Outer {SystemConfigProvider.Instance.GetValueByName($"PM1.Heater.Heater{i}.DisplayName")}.Set", $"PM1.Heater{i}.TempSetPoint");
 
-                 //    _keyValuePairs.Add($"Outer {SystemConfigProvider.Instance.GetValueByName($"PM1.Heater.Heater{i}.DisplayName")}.Actual", $"PM1.Heater{i}.TempFeedback");
 
-                 //}
 
-                 Dictionary<string, ParameterNode> indexer = new Dictionary<string, ParameterNode>();
 
-                 foreach (string dataName in dataList)
 
-                 {
 
-                     string[] nodeName = dataName.Split('.');
 
-                     ParameterNode parentNode = null;
 
-                     string pathName = "";
 
-                     for (int i = 0; i < nodeName.Length; i++)
 
-                     {
 
-                         pathName = (i == 0 || i == 1) ? nodeName[i] : (pathName + " " + nodeName[i]);
 
-                         if (!indexer.ContainsKey(pathName))
 
-                         {
 
-                             indexer[pathName] = new ParameterNode() { Name = pathName, ChildNodes = new ObservableCollection<ParameterNode>(), ParentNode = parentNode };
 
-                             if (parentNode == null)
 
-                             {
 
-                                 rootNode.Add(indexer[pathName]);
 
-                             }
 
-                             else
 
-                             {
 
-                                 parentNode.ChildNodes.Add(indexer[pathName]);
 
-                             }
 
-                         }
 
-                         parentNode = indexer[pathName];
 
-                     }
 
-                 }
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.Write(ex);
 
-             }
 
-             return rootNode;
 
-         }
 
-         private void GetData(List<string> keys, DateTime from, DateTime to, string module, string dataSource)
 
-         {
 
-             string sql = "select time AS InternalTimeStamp";
 
-             foreach (var dataKey in keys)
 
-             {
 
-                 var dataId = _processDetailDisplayDic.ContainsKey(dataKey) ? _processDetailDisplayDic[dataKey] : dataKey;
 
-                 sql += "," + string.Format("\"{0}\"", dataId);
 
-             }
 
-             sql += string.Format(" from \"{0}\" where time > {1} and time <= {2} order by time asc",
 
-                 from.ToString("yyyyMMdd") + "." + module, from.Ticks, to.Ticks);
 
-             DataTable dataTable = QueryDataClient.Instance.Service.QueryData(sql);
 
-             Dictionary<string, List<HistoryDataItem>> historyData = new Dictionary<string, List<HistoryDataItem>>();
 
-             if (dataTable == null || dataTable.Rows.Count == 0)
 
-                 return;
 
-             DateTime dt = new DateTime();
 
-             Dictionary<int, string> colName = new Dictionary<int, string>();
 
-             for (int colNo = 0; colNo < dataTable.Columns.Count; colNo++)
 
-             {
 
-                 colName.Add(colNo, dataTable.Columns[colNo].ColumnName);
 
-                 historyData[dataTable.Columns[colNo].ColumnName] = new List<HistoryDataItem>();
 
-             }
 
-             for (int rowNo = 0; rowNo < dataTable.Rows.Count; rowNo++)
 
-             {
 
-                 var row = dataTable.Rows[rowNo];
 
-                 for (int i = 0; i < dataTable.Columns.Count; i++)
 
-                 {
 
-                     HistoryDataItem data = new HistoryDataItem();
 
-                     if (i == 0)
 
-                     {
 
-                         dt = new DateTime((long)row[i]);
 
-                         continue;
 
-                     }
 
-                     else
 
-                     {
 
-                         string dataId = colName[i];
 
-                         if (row[i] is DBNull || row[i] == null)
 
-                         {
 
-                             data.dateTime = dt;
 
-                             data.dbName = colName[i];
 
-                             data.value = 0;
 
-                         }
 
-                         else if (row[i] is bool)
 
-                         {
 
-                             data.dateTime = dt;
 
-                             data.dbName = colName[i];
 
-                             data.value = (bool)row[i] ? 1 : 0;
 
-                         }
 
-                         else
 
-                         {
 
-                             data.dateTime = dt;
 
-                             data.dbName = colName[i];
 
-                             var value = float.Parse(row[i].ToString()).ToString(_resolution);
 
-                             data.value = float.Parse(value);
 
-                         }
 
-                     }
 
-                     historyData[data.dbName].Add(data);
 
-                 }
 
-             }
 
-             foreach (var item in historyData)
 
-             {
 
-                 item.Value.Sort((x, y) => DateTime.Compare(x.dateTime, y.dateTime));
 
-             }
 
-             Application.Current.Dispatcher.BeginInvoke(new Action(() =>
 
-             {
 
-                 try
 
-                 {
 
-                     var items = SelectedData.Where(x => (x as ChartDataLine<T>).DataSource == dataSource).ToList();
 
-                     foreach (var item in items)
 
-                     {
 
-                         var seriesItem = item as ChartDataLine<T>;
 
-                         if (seriesItem == null)
 
-                             continue;
 
-                         foreach (var data in historyData)
 
-                         {
 
-                             var dataKey = _processDetailDisplayDic.ContainsKey(seriesItem.DataName) ? _processDetailDisplayDic[seriesItem.DataName] : seriesItem.DataName;
 
-                             if (data.Key != dataKey)
 
-                                 continue;
 
-                             seriesItem.Capacity += data.Value.Count;
 
-                             DateTime beginTime = StepStartTime;
 
-                             for (int i = 0; i < data.Value.Count; i++)
 
-                             {
 
-                                 var historyDataItem = data.Value[i];
 
-                                 if (typeof(T) == typeof(double))
 
-                                 {
 
-                                     double xData;
 
-                                     xData = Math.Round((historyDataItem.dateTime - beginTime).TotalMilliseconds / 1000, 0, MidpointRounding.AwayFromZero);
 
-                                     seriesItem.Append((T)Convert.ChangeType(xData, typeof(T)), historyDataItem.value);
 
-                                 }
 
-                                 else
 
-                                     seriesItem.Append((T)Convert.ChangeType(historyDataItem.dateTime, typeof(T)), historyDataItem.value);
 
-                             }
 
-                         }
 
-                     }
 
-                     RefresCharView();
 
-                 }
 
-                 catch (Exception ex)
 
-                 {
 
-                     LOG.Write(ex);
 
-                 }
 
-             }));
 
-         }
 
-         private void SelectedDataChanged()
 
-         {
 
-             foreach (var item in SelectedData)
 
-             {
 
-                 if (item.Stroke.Equals(System.Windows.Media.Color.FromArgb(255, 0, 0, 255)))
 
-                 {
 
-                     Color drawingColor = colorQueue.Peek();
 
-                     item.Stroke = System.Windows.Media.Color.FromRgb(drawingColor.R, drawingColor.G, drawingColor.B);
 
-                     colorQueue.Enqueue(colorQueue.Dequeue());
 
-                 }
 
-             }
 
-         }
 
-         public void TxtMouseLeftButtonDown(ParameterNode node)
 
-         {
 
-             node.Selected = !node.Selected;
 
-             ParameterCheck(node);
 
-         }
 
-         public void ParameterCheck(ParameterNode node)
 
-         {
 
-             bool result = RefreshTreeStatusToChild(node);
 
-             if (!result)
 
-             {
 
-                 node.Selected = !node.Selected;
 
-                 DialogBox.ShowWarning($"The max number of parameters is {MAX_PARAMETERS}.");
 
-             }
 
-             else
 
-             {
 
-                 RefreshTreeStatusToParent(node);
 
-             }
 
-         }
 
-         /// <summary>
 
-         /// Refresh tree node status from current to children, and add data to SelectedData
 
-         /// </summary>
 
-         private bool RefreshTreeStatusToChild(ParameterNode node)
 
-         {
 
-             if (node.ChildNodes.Count > 0)
 
-             {
 
-                 for (int i = 0; i < node.ChildNodes.Count; i++)
 
-                 {
 
-                     ParameterNode n = node.ChildNodes[i];
 
-                     n.Selected = node.Selected;
 
-                     if (!RefreshTreeStatusToChild(n))
 
-                     {
 
-                         //uncheck left node
 
-                         for (int j = i; j < node.ChildNodes.Count; j++)
 
-                         {
 
-                             node.ChildNodes[j].Selected = !node.Selected;
 
-                         }
 
-                         return false;
 
-                     }
 
-                 }
 
-             }
 
-             else //leaf node
 
-             {
 
-                 bool lockTaken = false;
 
-                 try
 
-                 {
 
-                     Monitor.TryEnter(_lockSelection, 1000, ref lockTaken);
 
-                     if (lockTaken)
 
-                     //lock (_lockSelection)
 
-                     {
 
-                         var item = SelectedData.FirstOrDefault(x => (x as ChartDataLine<T>).DataName == node.Name);
 
-                         bool isExist = item != null;
 
-                         if (isExist && !node.Selected)//删除
 
-                         {
 
-                             SelectedData = new ObservableCollection<IRenderableSeries>(SelectedData.Where(d => (d as ChartDataLine<T>).DataName != node.Name));
 
-                         }
 
-                         else
 
-                         {
 
-                             if (node.Selected)
 
-                             {
 
-                                 if (SelectedData.Count >= MAX_PARAMETERS)
 
-                                     return false;
 
-                                 var dataId = _processDetailDisplayDic.ContainsKey(node.Name) ? _processDetailDisplayDic[node.Name] : node.Name;
 
-                                 var module = dataId.Split('.').ToList()[0];
 
-                                 _isAdding = true;
 
-                                 foreach (var recipe in RecipeDatas)
 
-                                 {
 
-                                     TimeChartDataLine line;
 
-                                     if (IsStepVisiable)
 
-                                         line = new TimeChartDataLine(node.Name.Replace("Tube", "PM1"), module, StepStartTime, StepEndTime);
 
-                                     else
 
-                                         line = new TimeChartDataLine(node.Name.Replace("Tube", "PM1"), module, recipe.StartTime, recipe.EndTime);
 
-                                     line.DataSource = $"{recipe.BatchID}.{recipe.RecipeName}";
 
-                                     line.Tag = node;
 
-                                     if (isExist)
 
-                                     {
 
-                                         line.Stroke = item.Stroke;
 
-                                         line.ClearData();
 
-                                         SelectedData.Remove(item);
 
-                                     }
 
-                                     SelectedData.Add(line);
 
-                                     AddToMonitor(line);
 
-                                 }
 
-                                 _isAdding = false;
 
-                                 if (!isExist)
 
-                                     SelectedDataChanged();
 
-                             }
 
-                         }
 
-                         this.NotifyOfPropertyChange(nameof(SelectedData));
 
-                         //}
 
-                     }
 
-                 }
 
-                 finally
 
-                 {
 
-                     if (lockTaken)
 
-                     {
 
-                         Monitor.Exit(_lockSelection);
 
-                     }
 
-                 }
 
-             }
 
-             return true;
 
-         }
 
-         private void AddToMonitor(TimeChartDataLine line)
 
-         {
 
-             QueryIndexer indexer = new QueryIndexer()
 
-             {
 
-                 DataLine = line,
 
-                 DataList = new List<string>() { line.DataName },
 
-                 TimeToken = line.StartTime,
 
-             };
 
-             _lstTokenTimeData.Add(indexer);
 
-         }
 
-         /// <summary>
 
-         /// Refresh tree node status from current to parent
 
-         /// </summary>
 
-         /// <param name="node"></param>
 
-         /// <returns></returns>
 
-         private void RefreshTreeStatusToParent(ParameterNode node)
 
-         {
 
-             if (node.ParentNode != null)
 
-             {
 
-                 if (node.Selected)
 
-                 {
 
-                     bool flag = true;
 
-                     for (int i = 0; i < node.ParentNode.ChildNodes.Count; i++)
 
-                     {
 
-                         if (!node.ParentNode.ChildNodes[i].Selected)
 
-                         {
 
-                             flag = false;  //as least one child is unselected
 
-                             break;
 
-                         }
 
-                     }
 
-                     if (flag)
 
-                         node.ParentNode.Selected = true;
 
-                 }
 
-                 else
 
-                 {
 
-                     node.ParentNode.Selected = false;
 
-                 }
 
-                 RefreshTreeStatusToParent(node.ParentNode);
 
-             }
 
-         }
 
-         #region Parameter Grid Control
 
-         public void DeleteAll()
 
-         {
 
-             //uncheck all tree nodes
 
-             foreach (ChartDataLine<T> cp in SelectedData)
 
-             {
 
-                 (cp.Tag as ParameterNode).Selected = false;
 
-                 RefreshTreeStatusToParent(cp.Tag as ParameterNode);
 
-             }
 
-             SelectedData.Clear();
 
-         }
 
-         private void SetParameterNode(ObservableCollection<ParameterNode> nodes, bool isChecked)
 
-         {
 
-             foreach (ParameterNode n in nodes)
 
-             {
 
-                 n.Selected = isChecked;
 
-                 SetParameterNode(n.ChildNodes, isChecked);
 
-             }
 
-         }
 
-         public void Delete(ChartDataLine<T> cp)
 
-         {
 
-             if (cp != null && SelectedData.Contains(cp))
 
-             {
 
-                 //uncheck tree node
 
-                 (cp.Tag as ParameterNode).Selected = false;
 
-                 RefreshTreeStatusToParent(cp.Tag as ParameterNode);
 
-                 SelectedData.Remove(cp);
 
-             }
 
-         }
 
-         public async void ExportAll()
 
-         {
 
-             try
 
-             {
 
-                 if (SelectedData.Count == 0)
 
-                 {
 
-                     MessageBox.Show($"Please select the data you want to export.", "Export", MessageBoxButton.OK,
 
-                         MessageBoxImage.Warning);
 
-                     return;
 
-                 }
 
-                 Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
 
-                 dlg.DefaultExt = ".xlsx"; // Default file extension 
 
-                 dlg.Filter = "Excel数据表格文件(*.xlsx)|*.xlsx"; // Filter files by extension 
 
-                 dlg.FileName = $"{DisplayName}_{string.Join(",", RecipeDatas.Select(x => x.RecipeName).ToArray())}_{DateTime.Now:yyyyMMdd_HHmmss}";
 
-                 Nullable<bool> result = dlg.ShowDialog();// Show open file dialog box
 
-                 if (result == true) // Process open file dialog box results
 
-                 {
 
-                     Exporting?.Invoke(this, System.EventArgs.Empty);
 
-                     _cancellationTokenSource = new CancellationTokenSource();
 
-                     var sw = new Stopwatch();
 
-                     sw.Restart();
 
-                     System.Data.DataSet ds = new System.Data.DataSet();
 
-                     ds.Tables.Add(new System.Data.DataTable($"{DisplayName}_{DateTime.Now:yyyyMMdd_HHmmss}"));
 
-                     ds.Tables[0].Columns.Add("Recipe Info");
 
-                     ds.Tables[0].Columns[0].DataType = typeof(string);
 
-                     ds.Tables[0].Columns.Add("Date");
 
-                     ds.Tables[0].Columns[1].DataType = typeof(string);
 
-                     ds.Tables[0].Columns.Add("Time");
 
-                     ds.Tables[0].Columns[2].DataType = typeof(string);
 
-                     ds.Tables[0].Columns.Add("Step ID");
 
-                     ds.Tables[0].Columns[3].DataType = typeof(string);
 
-                     ds.Tables[0].Columns.Add("Step Name");
 
-                     ds.Tables[0].Columns[4].DataType = typeof(string);
 
-                     Dictionary<T, double[]> timeValue = new Dictionary<T, double[]>();
 
-                     await Task.Run(() =>
 
-                     {
 
-                         for (int i = 0; i < SelectedData.Count; i++)
 
-                         {
 
-                             List<Tuple<T, double>> data = (SelectedData[i] as ChartDataLine<T>).Points;
 
-                             foreach (var tuple in data)
 
-                             {
 
-                                 if (!timeValue.ContainsKey(tuple.Item1))
 
-                                     timeValue[tuple.Item1] = new double[SelectedData.Count];
 
-                                 timeValue[tuple.Item1][i] = tuple.Item2;
 
-                             }
 
-                             ds.Tables[0].Columns.Add((SelectedData[i] as ChartDataLine<T>).DataName);
 
-                             ds.Tables[0].Columns[i + 5].DataType = typeof(double);
 
-                         }
 
-                         var recipeInfoRow = ds.Tables[0].NewRow();
 
-                         recipeInfoRow[0] = $"Recipe:{string.Join(",", RecipeDatas.Select(x => x.RecipeName).ToArray())}";
 
-                         ds.Tables[0].Rows.Add(recipeInfoRow);
 
-                         recipeInfoRow = ds.Tables[0].NewRow();
 
-                         recipeInfoRow[0] = $"Start Time";
 
-                         recipeInfoRow[1] = string.Join(",", RecipeDatas.Select(x => x.StartTime).ToArray());
 
-                         recipeInfoRow[2] = string.Join(",", RecipeDatas.Select(x => x.StartTime).ToArray());
 
-                         ds.Tables[0].Rows.Add(recipeInfoRow);
 
-                         recipeInfoRow = ds.Tables[0].NewRow();
 
-                         recipeInfoRow[0] = $"End Time";
 
-                         recipeInfoRow[1] = string.Join(",", RecipeDatas.Select(x => x.EndTime).ToArray());
 
-                         recipeInfoRow[2] = string.Join(",", RecipeDatas.Select(x => x.EndTime).ToArray());
 
-                         ds.Tables[0].Rows.Add(recipeInfoRow);
 
-                         DateTime startTime = StepStartTime;
 
-                         QueryDataClientFromTable(ds);
 
-                     }, _cancellationTokenSource.Token).ContinueWith(t =>
 
-                  {
 
-                      if (t.IsCanceled || t.IsFaulted)
 
-                          return;
 
-                  });
 
-                     if (_cancellationTokenSource?.Token.IsCancellationRequested == true)
 
-                         return;
 
-                     if (!ExcelHelper.ExportToExcel(dlg.FileName, ds, out string reason))
 
-                     {
 
-                         MessageBox.Show($"Export failed, {reason}", "Export", MessageBoxButton.OK, MessageBoxImage.Warning);
 
-                         return;
 
-                     }
 
-                     MessageBox.Show($"Export succeed, file save as {dlg.FileName}", "Export", MessageBoxButton.OK, MessageBoxImage.Information);
 
-                 }
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.Write(ex);
 
-                 MessageBox.Show("Write failed," + ex.Message, "export failed", MessageBoxButton.OK, MessageBoxImage.Warning);
 
-             }
 
-         }
 
-         public void DGSelectionChanged(object sender, EventArgs e)
 
-         {
 
-             var temp = (DataGrid)sender;
 
-             var tempSelected = (IRenderableSeries)temp.SelectedItem;
 
-             tempSelected.IsVisible = !tempSelected.IsVisible;
 
-         }
 
-         private void QueryDataClientFromTable(DataSet ds)
 
-         {
 
-             DateTime startTime = StepStartTime;
 
-             DateTime endTime = StepEndTime;
 
-             if (StepStartTime.Date == StepEndTime.Date)
 
-             {
 
-                 SaveDataToTable(ds, startTime, endTime);
 
-             }
 
-             else
 
-             {
 
-                 endTime = new DateTime(startTime.Year, startTime.Month, startTime.Day, 23, 59, 59);
 
-                 while (endTime < StepEndTime)
 
-                 {
 
-                     SaveDataToTable(ds, startTime, endTime);
 
-                     startTime = new DateTime(startTime.Year, startTime.Month, startTime.Day, 0, 0, 0).AddDays(1);
 
-                     endTime = new DateTime(startTime.Year, startTime.Month, startTime.Day, 23, 59, 59);
 
-                 }
 
-                 SaveDataToTable(ds, startTime, StepEndTime);
 
-             }
 
-         }
 
-         private void SaveDataToTable(DataSet ds, DateTime startTime, DateTime endTime)
 
-         {
 
-             string stepID = "", stepName = "";
 
-             string pmsql = "select time AS InternalTimeStamp";
 
-             List<string> keys = SelectedData.Select(x => (x as ChartDataLine<T>).DataName).ToList();
 
-             DataTable pmDataTable = null;
 
-             if (keys != null && keys.Count > 0)
 
-             {
 
-                 List<string> pmList = new List<string>();
 
-                 foreach (var dataKey in keys)
 
-                 {
 
-                     var dataId = _processDetailDisplayDic.ContainsKey(dataKey) ? _processDetailDisplayDic[dataKey] : dataKey;
 
-                     var module = dataId.Split('.').ToList()[0];
 
-                     if (module.ToLower() == "pm1")
 
-                     {
 
-                         pmList.Add(dataId);
 
-                         pmsql += "," + string.Format("\"{0}\"", dataId);
 
-                     }
 
-                 }
 
-                 if (pmList.Count > 0)
 
-                 {
 
-                     pmsql += string.Format(" from \"{0}\" where time > {1} and time <= {2} order by time asc",
 
-                         startTime.ToString("yyyyMMdd") + "." + "PM1", startTime.Ticks, endTime.Ticks);
 
-                     pmDataTable = QueryDataClient.Instance.Service.QueryData(pmsql);
 
-                     if (pmDataTable == null)
 
-                     {
 
-                         MessageBox.Show($"Export failed, sql:{pmsql}", "Export", MessageBoxButton.OK, MessageBoxImage.Warning);
 
-                         return;
 
-                     }
 
-                 }
 
-             }
 
-             string systemsql = "select time AS InternalTimeStamp";
 
-             DataTable systemDataTable = null;
 
-             if (keys != null && keys.Count > 0)
 
-             {
 
-                 List<string> systemList = new List<string>();
 
-                 foreach (var dataKey in keys)
 
-                 {
 
-                     var dataId = _processDetailDisplayDic.ContainsKey(dataKey) ? _processDetailDisplayDic[dataKey] : dataKey;
 
-                     var module = dataId.Split('.').ToList()[0];
 
-                     if (module.ToLower() == "system")
 
-                     {
 
-                         systemsql += "," + string.Format("\"{0}\"", dataId);
 
-                         systemList.Add(dataId);
 
-                     }
 
-                 }
 
-                 if (systemList.Count > 0)
 
-                 {
 
-                     systemsql += string.Format(" from \"{0}\" where time > {1} and time <= {2} order by time asc",
 
-                         startTime.ToString("yyyyMMdd") + "." + "System", startTime.Ticks, endTime.Ticks);
 
-                     systemDataTable = QueryDataClient.Instance.Service.QueryData(systemsql);
 
-                     if (systemDataTable == null)
 
-                     {
 
-                         MessageBox.Show($"Export failed, sql:{systemsql}", "Export", MessageBoxButton.OK, MessageBoxImage.Warning);
 
-                         return;
 
-                     }
 
-                 }
 
-             }
 
-             int maxRow = 0;
 
-             if ((pmDataTable == null || pmDataTable.Rows.Count == 0))
 
-             {
 
-                 if (systemDataTable != null)
 
-                 {
 
-                     maxRow = systemDataTable.Rows.Count;
 
-                 }
 
-             }
 
-             else if ((systemDataTable == null || systemDataTable.Rows.Count == 0))
 
-             {
 
-                 if (pmDataTable != null)
 
-                 {
 
-                     maxRow = pmDataTable.Rows.Count;
 
-                 }
 
-             }
 
-             else
 
-             {
 
-                 maxRow = pmDataTable.Rows.Count > systemDataTable.Rows.Count ? systemDataTable.Rows.Count : pmDataTable.Rows.Count;
 
-             }
 
-             for (int i = 0; i < maxRow; i++)
 
-             {
 
-                 var pmRow = pmDataTable != null ? pmDataTable.Rows[i] : null;
 
-                 var systemRow = systemDataTable != null ? systemDataTable.Rows[i] : null;
 
-                 //float timeIndex = 0;
 
-                 //float.TryParse(item.Key.ToString(), out timeIndex);
 
-                 //DateTime dateTimeKey = startTime.AddMilliseconds(timeIndex * 1000); ;// DateTime.Parse(item.Key.ToString());
 
-                 DateTime dateTimeKey = new DateTime(pmRow != null ? (long)pmRow[0] : (long)systemRow[0]);
 
-                 var tempStepInfo = _stepInfo.FirstOrDefault(x => x.StartTime < dateTimeKey && x.EndTime > dateTimeKey);
 
-                 if (tempStepInfo != null)// && dateTimeKey > _stepInfo[iIndex].StartTime
 
-                 {
 
-                     stepID = tempStepInfo.StepNo;
 
-                     stepName = tempStepInfo.StepName;
 
-                 }
 
-                 var row = ds.Tables[0].NewRow();
 
-                 row[1] = dateTimeKey.ToString("yyyy/MM/dd");
 
-                 row[2] = dateTimeKey.ToString("HH:mm:ss:fff");
 
-                 row[3] = stepID;
 
-                 row[4] = stepName;
 
-                 for (int j = 5; j < ds.Tables[0].Columns.Count; j++)
 
-                 {
 
-                     string colName = ds.Tables[0].Columns[j].ColumnName;
 
-                     DataRow dataRow = null;
 
-                     var dataId = _processDetailDisplayDic.ContainsKey(colName) ? _processDetailDisplayDic[colName] : colName;
 
-                     var module = dataId.Split('.').ToList()[0];
 
-                     int index = 0;
 
-                     if (module == "PM1")
 
-                     {
 
-                         dataRow = pmRow;
 
-                         foreach (var item in pmDataTable.Columns)
 
-                         {
 
-                             if (((DataColumn)item).ColumnName == dataId)
 
-                             {
 
-                                 break;
 
-                             }
 
-                             index++;
 
-                         }
 
-                     }
 
-                     else if (module == "System")
 
-                     {
 
-                         dataRow = systemRow;
 
-                         foreach (var item in systemDataTable.Columns)
 
-                         {
 
-                             if (((DataColumn)item).ColumnName == dataId)
 
-                             {
 
-                                 break;
 
-                             }
 
-                             index++;
 
-                         }
 
-                     }
 
-                     if (dataRow[index] is DBNull || dataRow[index] == null)
 
-                     {
 
-                         row[j] = dataRow[index];
 
-                     }
 
-                     else if (dataRow[index] is bool)
 
-                     {
 
-                         row[j] = (bool)dataRow[index] ? 1 : 0;
 
-                     }
 
-                     else
 
-                     {
 
-                         var value = float.Parse(dataRow[index].ToString()).ToString(_resolution);
 
-                         row[j] = float.Parse(value);
 
-                     }
 
-                 }
 
-                 ds.Tables[0].Rows.Add(row);
 
-             }
 
-         }
 
-         public void Export(ChartDataLine<T> cp)
 
-         {
 
-             try
 
-             {
 
-                 Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
 
-                 dlg.DefaultExt = ".xlsx"; // Default file extension 
 
-                 dlg.Filter = "Excel数据表格文件(*.xlsx)|*.xlsx"; // Filter files by extension 
 
-                 dlg.FileName = $"{cp.DataName}_{DateTime.Now:yyyyMMdd_HHmmss}";
 
-                 Nullable<bool> result = dlg.ShowDialog();// Show open file dialog box
 
-                 if (result == true) // Process open file dialog box results
 
-                 {
 
-                     System.Data.DataSet ds = new System.Data.DataSet();
 
-                     ds.Tables.Add(new System.Data.DataTable(cp.DataName));
 
-                     ds.Tables[0].Columns.Add("Time");
 
-                     ds.Tables[0].Columns[0].DataType = typeof(DateTime);
 
-                     ds.Tables[0].Columns.Add(cp.DataName);
 
-                     ds.Tables[0].Columns[1].DataType = typeof(double);
 
-                     DateTime startTime = StepStartTime;
 
-                     foreach (var item in cp.Points)
 
-                     {
 
-                         var row = ds.Tables[0].NewRow();
 
-                         row[0] = startTime.AddMilliseconds(Convert.ToDouble(item.Item1) * 1000);
 
-                         row[1] = item.Item2;
 
-                         ds.Tables[0].Rows.Add(row);
 
-                     }
 
-                     if (!ExcelHelper.ExportToExcel(dlg.FileName, ds, out string reason))
 
-                     {
 
-                         MessageBox.Show($"Export failed, {reason}", "Export", MessageBoxButton.OK, MessageBoxImage.Warning);
 
-                         return;
 
-                     }
 
-                     MessageBox.Show($"Export succeed, file save as {dlg.FileName}", "Export", MessageBoxButton.OK, MessageBoxImage.Information);
 
-                 }
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.Write(ex);
 
-                 MessageBox.Show("Write failed," + ex.Message, "export failed", MessageBoxButton.OK, MessageBoxImage.Warning);
 
-             }
 
-         }
 
-         public void SelectColor(ChartDataLine<T> cp)
 
-         {
 
-             if (cp == null)
 
-                 return;
 
-             var dlg = new System.Windows.Forms.ColorDialog();
 
-             if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
 
-             {
 
-                 cp.Stroke = new System.Windows.Media.Color() { A = dlg.Color.A, B = dlg.Color.B, G = dlg.Color.G, R = dlg.Color.R };
 
-             }
 
-         }
 
-         public void CloseCmd()
 
-         {
 
-             ((Window)GetView()).Close();
 
-         }
 
-         #endregion
 
-         #region SciChart Move
 
-         public void RefresCharView()
 
-         {
 
-             this.view.sciChart.ZoomExtents();
 
-         }
 
-         public void ToLeftClick()
 
-         {
 
-             //var view = GetView() as ProcessDetailView;
 
-             this.view.sciChart.ChartModifier.XAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMin);
 
-         }
 
-         public void ToRightClick()
 
-         {
 
-             //var view = GetView() as ProcessDetailView;
 
-             this.view.sciChart.ChartModifier.XAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMax);
 
-         }
 
-         public void ZoomInClick()
 
-         {
 
-             //var view = GetView() as ProcessDetailView;
 
-             this.view.sciChart.ChartModifier.XAxis.ZoomBy(-0.1, -0.1);
 
-             this.view.sciChart.ChartModifier.YAxis.ZoomBy(-0.1, -0.1);
 
-         }
 
-         public void ZoomOutClick()
 
-         {
 
-             //var view = GetView() as ProcessDetailView;
 
-             this.view.sciChart.ChartModifier.XAxis.ZoomBy(0.1, 0.1);
 
-             this.view.sciChart.ChartModifier.YAxis.ZoomBy(0.1, 0.1);
 
-         }
 
-         public void XZoomInClick()
 
-         {
 
-             this.view.sciChart.ChartModifier.XAxis.ZoomBy(-0.1, -0.1);
 
-         }
 
-         public void XZoomOutClick()
 
-         {
 
-             this.view.sciChart.ChartModifier.XAxis.ZoomBy(0.1, 0.1);
 
-         }
 
-         public void ToMoveUpClick()
 
-         {
 
-             //var view = GetView() as ProcessDetailView;
 
-             this.view.sciChart.ChartModifier.YAxis.Scroll(-50, SciChart.Charting.ClipMode.ClipAtMin);
 
-         }
 
-         public void ToMoveDownClick()
 
-         {
 
-             //var view = GetView() as ProcessDetailView;
 
-             this.view.sciChart.ChartModifier.YAxis.Scroll(50, SciChart.Charting.ClipMode.ClipAtMax);
 
-         }
 
-         public void SelectStep()
 
-         {
 
-             ObservableCollection<Option> Items = new ObservableCollection<Option>();
 
-             foreach (var item in StepInfo)
 
-             {
 
-                 Items.Add(new Option() { Name = $"{item.StepNo} {item.StepName}", Index = int.Parse(item.StepNo) });
 
-             }
 
-             ItemsSelectDialogViewModel itemsSelectDialogView = new ItemsSelectDialogViewModel();
 
-             itemsSelectDialogView.Items = Items;
 
-             itemsSelectDialogView.ColumnsCount = Items.Count / 10 + 1;
 
-             WindowManager windowManager = IoC.Get<IWindowManager>() as WindowManager;
 
-             if ((bool)(windowManager as WindowManager)?.ShowDialogWithNoWindow(itemsSelectDialogView))
 
-             {
 
-                 var startItem = StepInfo.FirstOrDefault(step => step.StepNo == Items.FirstOrDefault(x => x.IsChecked)?.Index.ToString());
 
-                 var endItem = StepInfo.FirstOrDefault(step => step.StepNo == Items.LastOrDefault(x => x.IsChecked)?.Index.ToString());
 
-                 if (startItem == null)
 
-                 {
 
-                     DialogBox.ShowError("Please select begin step!");
 
-                     return;
 
-                 }
 
-                 if (endItem == null)
 
-                 {
 
-                     DialogBox.ShowError("Please select end step!");
 
-                     return;
 
-                 }
 
-                 if (Items.Where(x => x.IsChecked).Count() > 2)
 
-                 {
 
-                     DialogBox.ShowError("The selected step numbers must be 1 or 2.");
 
-                     return;
 
-                 }
 
-                 StepStartTime = startItem.StartTime;
 
-                 StepEndTime = endItem.EndTime;
 
-                 List<ParameterNode> allCheckNode = new List<ParameterNode>();
 
-                 ParameterNodes.ToList().ForEach(x =>
 
-                 {
 
-                     allCheckNode.AddRange(GetAllCheckedLeafNode(x));
 
-                 });
 
-                 allCheckNode.ForEach(x => { ParameterCheck(x); });
 
-             }
 
-         }
 
-         private List<ParameterNode> GetAllCheckedLeafNode(ParameterNode parameterNode)
 
-         {
 
-             List<ParameterNode> retNodes = new List<ParameterNode>();
 
-             if (parameterNode.ChildNodes != null && parameterNode.ChildNodes.Count > 0)
 
-             {
 
-                 foreach (var item in parameterNode.ChildNodes)
 
-                 {
 
-                     retNodes.AddRange(GetAllCheckedLeafNode(item));
 
-                 }
 
-             }
 
-             else
 
-             {
 
-                 if (parameterNode.Selected)
 
-                     retNodes.Add(parameterNode);
 
-             }
 
-             return retNodes;
 
-         }
 
-         private void GridMouseLeftButtonDown(ChartDataLine<T> chartDataLine)
 
-         {
 
-             chartDataLine.IsVisible = !chartDataLine.IsVisible;
 
-         }
 
-         #endregion
 
-         public void GetCursorPoint(IEnumerable<SeriesInfo> infos)
 
-         {
 
-             if (infos.Any())
 
-             {
 
-                 var seriesinfo = infos.First();
 
-                 if (string.IsNullOrEmpty(seriesinfo.FormattedXValue) || _lastPointX == seriesinfo.FormattedXValue) return;
 
-                 _lastPointX = seriesinfo.FormattedXValue;
 
-                 PointTime = StepStartTime.AddMilliseconds(long.Parse(seriesinfo.FormattedXValue) * 1000);
 
-                 if (PointTime == DateTime.MinValue) return;
 
-                 var step = _stepInfo.Find(r => r.StartTime <= PointTime && r.EndTime > PointTime);
 
-                 if (step == null) StepNameDisPlay = string.Empty;
 
-                 else
 
-                 {
 
-                     StepNameDisPlay = $"{step.StepNo}:{step.StepName}";
 
-                 }
 
-                 var name = (seriesinfo.RenderableSeries as ChartDataLine<T>).DataSource.Split('.');
 
-                 if (name.Length == 2)
 
-                 {
 
-                     RecipeNameDisPlay = name[1];
 
-                 }
 
-                 else RecipeNameDisPlay = string.Empty;
 
-             }
 
-         }
 
-         #endregion
 
-     }
 
-     public class ProcessDataLot : NotifiableItem
 
-     {
 
-         private string _guid;
 
-         public string GUID
 
-         {
 
-             get => _guid;
 
-             set
 
-             {
 
-                 _guid = value;
 
-                 InvokePropertyChanged(nameof(GUID));
 
-             }
 
-         }
 
-         private DateTime _processBeginTime;
 
-         public DateTime ProcessBeginTime
 
-         {
 
-             get => _processBeginTime;
 
-             set
 
-             {
 
-                 _processBeginTime = value;
 
-                 InvokePropertyChanged(nameof(ProcessBeginTime));
 
-             }
 
-         }
 
-         private DateTime _processEndTime;
 
-         public DateTime ProcessEndTime
 
-         {
 
-             get => _processEndTime;
 
-             set
 
-             {
 
-                 _processEndTime = value;
 
-                 InvokePropertyChanged(nameof(ProcessEndTime));
 
-             }
 
-         }
 
-         private string _recipeName;
 
-         public string RecipeName
 
-         {
 
-             get => _recipeName;
 
-             set
 
-             {
 
-                 _recipeName = value;
 
-                 InvokePropertyChanged(nameof(RecipeName));
 
-             }
 
-         }
 
-         private string _processStatus;
 
-         public string ProcessStatus
 
-         {
 
-             get => _processStatus;
 
-             set
 
-             {
 
-                 _processStatus = value;
 
-                 InvokePropertyChanged(nameof(ProcessStatus));
 
-             }
 
-         }
 
-         private string _waferDataguid;
 
-         public string WaferDataGUID
 
-         {
 
-             get => _waferDataguid;
 
-             set
 
-             {
 
-                 _waferDataguid = value;
 
-                 InvokePropertyChanged(nameof(WaferDataGUID));
 
-             }
 
-         }
 
-         private string _processIn;
 
-         public string ProcessIn
 
-         {
 
-             get => _processIn;
 
-             set
 
-             {
 
-                 _processIn = value;
 
-                 InvokePropertyChanged(nameof(ProcessIn));
 
-             }
 
-         }
 
-         private int _recipeSettingTime;
 
-         public int RecipeSettingTime
 
-         {
 
-             get => _recipeSettingTime;
 
-             set
 
-             {
 
-                 _recipeSettingTime = value;
 
-                 InvokePropertyChanged(nameof(RecipeSettingTime));
 
-             }
 
-         }
 
-     }
 
- }
 
 
  |