|
@@ -18,6 +18,12 @@ using System.Xml;
|
|
using System.ComponentModel;
|
|
using System.ComponentModel;
|
|
using OpenSEMI.ClientBase;
|
|
using OpenSEMI.ClientBase;
|
|
using MECF.Framework.UI.Client.ClientBase;
|
|
using MECF.Framework.UI.Client.ClientBase;
|
|
|
|
+using System.Threading.Tasks;
|
|
|
|
+using System.Collections.Concurrent;
|
|
|
|
+using Mapster;
|
|
|
|
+using System.Diagnostics;
|
|
|
|
+using SciChart.Charting.Common.Extensions;
|
|
|
|
+using DocumentFormat.OpenXml.EMMA;
|
|
|
|
|
|
namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|
namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|
{
|
|
{
|
|
@@ -331,155 +337,13 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|
public void CloneStep(ref Step destinationStep, Step originalStep)
|
|
public void CloneStep(ref Step destinationStep, Step originalStep)
|
|
{
|
|
{
|
|
int stepNo = destinationStep.StepNo;
|
|
int stepNo = destinationStep.StepNo;
|
|
- destinationStep = (Step)CloneUtil.CloneObjectSetFlag(originalStep, "IsSaved", true);
|
|
|
|
- destinationStep.StepNo = stepNo;
|
|
|
|
- SetDelegateEvent(destinationStep);
|
|
|
|
- ////destinationStep.StepNo = originalStep.StepNo;
|
|
|
|
- //destinationStep.Name = originalStep.Name;
|
|
|
|
- //destinationStep.Time = originalStep.Time;
|
|
|
|
- //destinationStep.SkipWait = originalStep.SkipWait;
|
|
|
|
- //destinationStep.EndBy = originalStep.EndBy;
|
|
|
|
- //destinationStep.MFCSets = originalStep.MFCSets;
|
|
|
|
- //destinationStep.MFMSets = originalStep.MFMSets;
|
|
|
|
- //destinationStep.ValveSets = originalStep.ValveSets;
|
|
|
|
-
|
|
|
|
- ////destinationStep.AlarmActionSets = originalStep.AlarmActionSets;
|
|
|
|
- //foreach (var temkey in originalStep.AlarmActionSets.Keys)
|
|
|
|
- //{
|
|
|
|
- // if (!destinationStep.AlarmActionSets.ContainsKey(temkey))
|
|
|
|
- // {
|
|
|
|
- // destinationStep.AlarmActionSets.Add(temkey, originalStep.AlarmActionSets[temkey]);
|
|
|
|
- // }
|
|
|
|
- // else
|
|
|
|
- // {
|
|
|
|
- // destinationStep.AlarmActionSets[temkey] = originalStep.AlarmActionSets[temkey];
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
|
|
+ //destinationStep = (Step)CloneUtil.CloneObjectSetFlag(originalStep, "IsSaved", true);
|
|
|
|
|
|
- //destinationStep.AlarmConditionTable = originalStep.AlarmConditionTable;
|
|
|
|
- ////destinationStep.TemperatureSets = originalStep.TemperatureSets;
|
|
|
|
|
|
+ //TypeAdapterConfig<Param, Param>.NewConfig().MapToConstructor(true).Ignore(t=>t.IsSaved);
|
|
|
|
+ originalStep.Adapt(destinationStep);
|
|
|
|
|
|
- //foreach (var temkey in originalStep.TemperatureSets.Keys)
|
|
|
|
- //{
|
|
|
|
- // if (!destinationStep.TemperatureSets.ContainsKey(temkey))
|
|
|
|
- // {
|
|
|
|
- // destinationStep.TemperatureSets.Add(temkey, originalStep.TemperatureSets[temkey]);
|
|
|
|
- // }
|
|
|
|
- // else
|
|
|
|
- // {
|
|
|
|
- // destinationStep.TemperatureSets[temkey] = originalStep.TemperatureSets[temkey];
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
-
|
|
|
|
- //destinationStep.TemperatureControlMode = originalStep.TemperatureControlMode;
|
|
|
|
- //destinationStep.TemperatureCorrect = originalStep.TemperatureCorrect;
|
|
|
|
- //destinationStep.TemperaturePID = originalStep.TemperaturePID;
|
|
|
|
- //destinationStep.LoaderCommand = originalStep.LoaderCommand;
|
|
|
|
- //destinationStep.LoaderValue = originalStep.LoaderValue;
|
|
|
|
- //destinationStep.PressCommand = originalStep.PressCommand;
|
|
|
|
- //destinationStep.PressValue = originalStep.PressValue;
|
|
|
|
- //destinationStep.TemperatureProfile = originalStep.TemperatureProfile;
|
|
|
|
- //destinationStep.TemperatureAlarm = originalStep.TemperatureAlarm;
|
|
|
|
-
|
|
|
|
- //destinationStep.CAPTemperatureAlarm = originalStep.CAPTemperatureAlarm;
|
|
|
|
- //destinationStep.CAPSetValue = originalStep.CAPSetValue;
|
|
|
|
- //destinationStep.CAPRampingValue = originalStep.CAPRampingValue;
|
|
|
|
-
|
|
|
|
- //destinationStep.TemperatureStabilize = originalStep.TemperatureStabilize;
|
|
|
|
- //destinationStep.TemperatureReadyCond = originalStep.TemperatureReadyCond;
|
|
|
|
-
|
|
|
|
- //destinationStep.RFSwitch = originalStep.RFSwitch;
|
|
|
|
- //destinationStep.RFSetpoint = originalStep.RFSetpoint;
|
|
|
|
- //destinationStep.RFPowerSetpoint = originalStep.RFPowerSetpoint;
|
|
|
|
- //destinationStep.C1Setpoint = originalStep.C1Setpoint;
|
|
|
|
- //destinationStep.C2Setpoint = originalStep.C2Setpoint;
|
|
|
|
- //destinationStep.ForwardPowerAlarmWatchTable = originalStep.ForwardPowerAlarmWatchTable;
|
|
|
|
- //destinationStep.PrAlarmWatchTable = originalStep.PrAlarmWatchTable;
|
|
|
|
- //destinationStep.PIAlarmWatchTable = originalStep.PIAlarmWatchTable;
|
|
|
|
- //destinationStep.C1AlarmWatchTable = originalStep.C1AlarmWatchTable;
|
|
|
|
- //destinationStep.C2AlarmWatchTable = originalStep.C2AlarmWatchTable;
|
|
|
|
- //destinationStep.VppAlarmWatchTable = originalStep.VppAlarmWatchTable;
|
|
|
|
- //destinationStep.VdcAlarmWatchTable = originalStep.VdcAlarmWatchTable;
|
|
|
|
- ////destinationStep.Command = originalStep.Command;
|
|
|
|
- ////destinationStep.APC_SetPressure = originalStep.APC_SetPressure;
|
|
|
|
- ////destinationStep.EXOUSets = originalStep.EXOUSets;
|
|
|
|
- ////destinationStep.ExternalSensor = originalStep.ExternalSensor;
|
|
|
|
- ////destinationStep.GasLineN2_Flow = originalStep.GasLineN2_Flow;
|
|
|
|
- ////destinationStep.GasLineN3_Flow = originalStep.GasLineN3_Flow;
|
|
|
|
- ////destinationStep.IsnoneConditionCheck = originalStep.IsnoneConditionCheck;
|
|
|
|
- ////destinationStep.ZAxisPosition = originalStep.ZAxisPosition;
|
|
|
|
- ////destinationStep.ZAxisSpeed = originalStep.ZAxisSpeed;
|
|
|
|
- ////destinationStep.RotatePosition = originalStep.RotatePosition;
|
|
|
|
- ////destinationStep.RotateSpeed = originalStep.RotateSpeed;
|
|
|
|
- ////destinationStep.RotateInterval = originalStep.RotateInterval;
|
|
|
|
- ////destinationStep.ReachPressureValue = originalStep.ReachPressureValue;
|
|
|
|
- ////destinationStep.PressureStabilizeSelected = originalStep.PressureStabilizeSelected;
|
|
|
|
- ////destinationStep.PressureSonserValue = originalStep.PressureSonserValue;
|
|
|
|
- ////destinationStep.PressureValveAngle = originalStep.PressureValveAngle;
|
|
|
|
- ////destinationStep.PressureSettingVG = originalStep.PressureSettingVG;
|
|
|
|
- ////destinationStep.PressureAlarmTableNo = originalStep.PressureAlarmTableNo;
|
|
|
|
- ////destinationStep.EventSetting = originalStep.EventSetting;
|
|
|
|
- ////destinationStep.FinishAutoProfile = originalStep.FinishAutoProfile;
|
|
|
|
- ////destinationStep.ReachTemp = originalStep.ReachTemp;
|
|
|
|
- ////destinationStep.ReachPressure = originalStep.ReachPressure;
|
|
|
|
- ////destinationStep.ReachPressureVG = originalStep.ReachPressureVG;
|
|
|
|
- ////destinationStep.PressureStabilizeVG = originalStep.PressureStabilizeVG;
|
|
|
|
- ////destinationStep.ReachTempValue = originalStep.ReachTempValue;
|
|
|
|
- ////destinationStep.TempStabilizeSelected = originalStep.TempStabilizeSelected;
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public void CloneStep(Step destinationStep, Step originalStep)
|
|
|
|
- {
|
|
|
|
- //destinationStep.StepNo = originalStep.StepNo;
|
|
|
|
- //destinationStep.Name = originalStep.Name;
|
|
|
|
- //destinationStep.EndBy = originalStep.EndBy;
|
|
|
|
- //destinationStep.Time = originalStep.Time;
|
|
|
|
- //destinationStep.SkipWait = originalStep.SkipWait;
|
|
|
|
- //destinationStep.Command = originalStep.Command;
|
|
|
|
- //destinationStep.APC_SetPressure = originalStep.APC_SetPressure;
|
|
|
|
- //destinationStep.EXOUSets = originalStep.EXOUSets;
|
|
|
|
- //destinationStep.ExternalSensor = originalStep.ExternalSensor;
|
|
|
|
- //destinationStep.GasLineN2_Flow = originalStep.GasLineN2_Flow;
|
|
|
|
- //destinationStep.GasLineN3_Flow = originalStep.GasLineN3_Flow;
|
|
|
|
- //destinationStep.IsnoneConditionCheck = originalStep.IsnoneConditionCheck;
|
|
|
|
- //destinationStep.ZAxisPosition = originalStep.ZAxisPosition;
|
|
|
|
- //destinationStep.ZAxisSpeed = originalStep.ZAxisSpeed;
|
|
|
|
- //destinationStep.RotatePosition = originalStep.RotatePosition;
|
|
|
|
- //destinationStep.RotateSpeed = originalStep.RotateSpeed;
|
|
|
|
- //destinationStep.RotateInterval = originalStep.RotateInterval;
|
|
|
|
- //destinationStep.MFCSets = originalStep.MFCSets;
|
|
|
|
- //destinationStep.MFMSets = originalStep.MFMSets;
|
|
|
|
- //destinationStep.ValveSets = originalStep.ValveSets;
|
|
|
|
- //destinationStep.ReachPressureValue = originalStep.ReachPressureValue;
|
|
|
|
- //destinationStep.PressureStabilizeSelected = originalStep.PressureStabilizeSelected;
|
|
|
|
- //destinationStep.PressureSonserValue = originalStep.PressureSonserValue;
|
|
|
|
- //destinationStep.PressureValveAngle = originalStep.PressureValveAngle;
|
|
|
|
- //destinationStep.PressureSettingVG = originalStep.PressureSettingVG;
|
|
|
|
- //destinationStep.SlowVacuumValue = originalStep.SlowVacuumValue;
|
|
|
|
-
|
|
|
|
- //destinationStep.PressureAlarmTableNo = originalStep.PressureAlarmTableNo;
|
|
|
|
- //destinationStep.TemperatureCorrect = originalStep.TemperatureCorrect;
|
|
|
|
- //destinationStep.TemperaturePID = originalStep.TemperaturePID;
|
|
|
|
- //destinationStep.LoaderCommand = originalStep.LoaderCommand;
|
|
|
|
- //destinationStep.LoaderValue = originalStep.LoaderValue;
|
|
|
|
- //destinationStep.PressCommand = originalStep.PressCommand;
|
|
|
|
- //destinationStep.PressValue = originalStep.PressValue;
|
|
|
|
- //destinationStep.TemperatureSets = originalStep.TemperatureSets;
|
|
|
|
- //destinationStep.EventSetting = originalStep.EventSetting;
|
|
|
|
- //destinationStep.FinishAutoProfile = originalStep.FinishAutoProfile;
|
|
|
|
- //destinationStep.ReachTemp = originalStep.ReachTemp;
|
|
|
|
- //destinationStep.O2Density = originalStep.O2Density;
|
|
|
|
- //destinationStep.ReachPressure = originalStep.ReachPressure;
|
|
|
|
- //destinationStep.ReachPressureVG = originalStep.ReachPressureVG;
|
|
|
|
- //destinationStep.PressureStabilizeVG = originalStep.PressureStabilizeVG;
|
|
|
|
- //destinationStep.ReachTempValue = originalStep.ReachTempValue;
|
|
|
|
- //destinationStep.O2DensityValue = originalStep.O2DensityValue;
|
|
|
|
- //destinationStep.RotateDirection = originalStep.RotateDirection;
|
|
|
|
- //destinationStep.TempStabilizeSelected = originalStep.TempStabilizeSelected;
|
|
|
|
- destinationStep = (Step)CloneUtil.CloneObject(originalStep);
|
|
|
|
|
|
+ destinationStep.StepNo = stepNo;
|
|
SetDelegateEvent(destinationStep);
|
|
SetDelegateEvent(destinationStep);
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public RecipeDataBase()
|
|
public RecipeDataBase()
|
|
@@ -1400,10 +1264,32 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|
|
|
|
|
public void SetDelegateEvent(Step step)
|
|
public void SetDelegateEvent(Step step)
|
|
{
|
|
{
|
|
- MFCSetsCollectionChanged(step);
|
|
|
|
- TemperatureSetsCollectionChanged(step);
|
|
|
|
- ValveSetsCollectionChanged(step);
|
|
|
|
- AUXSetsCollectionChanged(step);
|
|
|
|
|
|
+ //MFCSetsCollectionChanged(step);
|
|
|
|
+ //TemperatureSetsCollectionChanged(step);
|
|
|
|
+ //ValveSetsCollectionChanged(step);
|
|
|
|
+ //AUXSetsCollectionChanged(step);
|
|
|
|
+
|
|
|
|
+ Task[] tasks = new Task[4];
|
|
|
|
+ tasks[0] = Task.Factory.StartNew(() =>
|
|
|
|
+ {
|
|
|
|
+ MFCSetsCollectionChanged(step);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ tasks[1] = Task.Factory.StartNew(() =>
|
|
|
|
+ {
|
|
|
|
+ TemperatureSetsCollectionChanged(step);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ tasks[2] = Task.Factory.StartNew(() =>
|
|
|
|
+ {
|
|
|
|
+ ValveSetsCollectionChanged(step);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ tasks[3] = Task.Factory.StartNew(() =>
|
|
|
|
+ {
|
|
|
|
+ AUXSetsCollectionChanged(step);
|
|
|
|
+ });
|
|
|
|
+ Task.WaitAll(tasks);
|
|
}
|
|
}
|
|
|
|
|
|
private void MFCSetsCollectionChanged(Step step)
|
|
private void MFCSetsCollectionChanged(Step step)
|
|
@@ -2476,21 +2362,43 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
|
|
PopSettingSteps.Clear();
|
|
PopSettingSteps.Clear();
|
|
StepTolerances.Clear();
|
|
StepTolerances.Clear();
|
|
StepNos.Clear();
|
|
StepNos.Clear();
|
|
- if (steps.Count != 0)
|
|
|
|
|
|
+
|
|
|
|
+ if (steps.Count == 0)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ ConcurrentDictionary<int, Step> cache = new ConcurrentDictionary<int, Step>();
|
|
|
|
+ Step step = this.CreateStep(steps[0]);
|
|
|
|
+ StepNos.Add(step.StepNo);
|
|
|
|
+ Steps.Add(step);
|
|
|
|
+
|
|
|
|
+ Parallel.For(1, steps.Count - 1, index =>
|
|
{
|
|
{
|
|
- Step step = this.CreateStep(steps[0]);
|
|
|
|
- var query1 = (from XmlNode n in steps select n).ToList();
|
|
|
|
- query1.RemoveAt(0);
|
|
|
|
- var allSteps = query1.AsParallel().AsOrdered()
|
|
|
|
- .Select(x => this.CreateStep(Steps[0], x));
|
|
|
|
- StepNos.Add(step.StepNo);
|
|
|
|
- Steps.Add(step);
|
|
|
|
- foreach (var item in allSteps)
|
|
|
|
- {
|
|
|
|
- StepNos.Add(item.StepNo);
|
|
|
|
- Steps.Add(item);
|
|
|
|
- }
|
|
|
|
|
|
+ Step tempStep = CreateStep(step, steps.Item(index));
|
|
|
|
+ cache[tempStep.StepNo] = tempStep;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ foreach (var item in cache)
|
|
|
|
+ {
|
|
|
|
+ StepNos.Add(item.Key);
|
|
|
|
+ Steps.Add(item.Value);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //if (steps.Count != 0)
|
|
|
|
+ //{
|
|
|
|
+ // Step step = this.CreateStep(steps[0]);
|
|
|
|
+ // var query1 = (from XmlNode n in steps select n).ToList();
|
|
|
|
+ // query1.RemoveAt(0);
|
|
|
|
+ // var allSteps = query1.AsParallel().AsOrdered()
|
|
|
|
+ // .Select(x => this.CreateStep(Steps[0], x));
|
|
|
|
+ // StepNos.Add(step.StepNo);
|
|
|
|
+ // Steps.Add(step);
|
|
|
|
+ // foreach (var item in allSteps)
|
|
|
|
+ // {
|
|
|
|
+ // StepNos.Add(item.StepNo);
|
|
|
|
+ // Steps.Add(item);
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
private void LoadConfigs(XmlNode configNode)
|
|
private void LoadConfigs(XmlNode configNode)
|