|
@@ -20,6 +20,7 @@ using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
|
|
|
using MECF.Framework.UI.Client.CenterViews.Parameter;
|
|
|
using MECF.Framework.UI.Client.ClientBase;
|
|
|
using OpenSEMI.ClientBase;
|
|
|
+using OpenSEMI.Ctrlib.Controls;
|
|
|
using RecipeEditorLib.RecipeModel.Params;
|
|
|
using SciChart.Core.Extensions;
|
|
|
using System;
|
|
@@ -1439,20 +1440,39 @@ namespace FurnaceUI.Views.Recipes
|
|
|
AppendStep2();
|
|
|
break;
|
|
|
case "InsertCopy":
|
|
|
+
|
|
|
InsertCopyStep();
|
|
|
break;
|
|
|
case "OverWrite"://任何步骤的内容都可以覆盖到选定的步骤中
|
|
|
OverWriteStep();
|
|
|
break;
|
|
|
case "PrevStepOverwrite"://用上一步的内容覆盖所选步骤
|
|
|
+ if (DialogButton.No == DialogBox.ShowDialog(DialogButton.Yes | DialogButton.No,
|
|
|
+ DialogType.CONFIRM,
|
|
|
+ $"Make sure to PrevStep Overwrite the selected step?"))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
PrevStepOverwriteStep();
|
|
|
break;
|
|
|
case "PrevStepInsert"://在选定步骤之前,插入带有前一步内容的新步骤。
|
|
|
+ if (DialogButton.No == DialogBox.ShowDialog(DialogButton.Yes | DialogButton.No,
|
|
|
+ DialogType.CONFIRM,
|
|
|
+ $"Make sure to PrevStep nsert the selected step?"))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
InsertPrevStep();
|
|
|
break;
|
|
|
case "PrevStepItem":
|
|
|
break;
|
|
|
case "CurrStepDelete":
|
|
|
+ if (DialogButton.No == DialogBox.ShowDialog(DialogButton.Yes | DialogButton.No,
|
|
|
+ DialogType.CONFIRM,
|
|
|
+ $"Make sure to delete the selected step?"))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (SelectedRecipeStep == null || CurrentRecipe == null)
|
|
|
{ return; }
|
|
|
CurrDeleteStep();
|
|
@@ -2748,7 +2768,16 @@ namespace FurnaceUI.Views.Recipes
|
|
|
switch (type)
|
|
|
{
|
|
|
case "Value":
|
|
|
- InvokeClient.Instance.Service.DoOperation($"PM1.{mFCData.ControlName}.SetMfcVirtualValue", $"{value};{mFCData.Rampng.Value};{mFCData.AlarmValue}");
|
|
|
+ double setValue = 0;
|
|
|
+ double.TryParse(value, out setValue);
|
|
|
+ double.TryParse(mFCData.ScaleValue, out double maxData);
|
|
|
+ if (setValue > maxData)
|
|
|
+ {
|
|
|
+ DialogBox.ShowWarning($"{mFCData.ControlName} Out of the setting range {0}~{maxData}!");
|
|
|
+ ((TextBoxEx)sender).ChangedColor = ((TextBoxEx)sender).NormalColor;
|
|
|
+ SetSetPointValue(mFCData.ControlName, $"0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
break;
|
|
|
case "Rampng":
|
|
|
InvokeClient.Instance.Service.DoOperation($"PM1.{mFCData.ControlName}.SetMfcVirtualValue", $"{mFCData.SetValue.Value};{value};{mFCData.AlarmValue}");
|
|
@@ -2759,7 +2788,24 @@ namespace FurnaceUI.Views.Recipes
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ private void SetSetPointValue(string name, string value)
|
|
|
+ {
|
|
|
+ if (double.TryParse(value, out double getValue))
|
|
|
+ {
|
|
|
+ var stepNo = 0;
|
|
|
+ if (!_isStandbyCheckedSelect)
|
|
|
+ stepNo = SelectedRecipeStep.StepNo;
|
|
|
+ var step = CurrentRecipe.Steps.Where(x => x.StepNo == stepNo).FirstOrDefault();
|
|
|
+ if (step != null)
|
|
|
+ {
|
|
|
+ var mfc = CurrentRecipe.Steps.Where(x => x.StepNo == stepNo).FirstOrDefault().MFCSets.FirstOrDefault(x => x.ControlName == name);
|
|
|
+ if (mfc != null)
|
|
|
+ {
|
|
|
+ mfc.SetValue.SetValue(value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
public void PressTextChanged(string type, object sender, object item)
|
|
|
{
|
|
|
if (!string.IsNullOrEmpty(type) && item != null && sender != null)
|