|
@@ -3,11 +3,12 @@ using Aitex.Core.UI.Dialog;
|
|
using Aitex.Core.UI.MVVM;
|
|
using Aitex.Core.UI.MVVM;
|
|
using Aitex.Core.Utilities;
|
|
using Aitex.Core.Utilities;
|
|
using Caliburn.Micro.Core;
|
|
using Caliburn.Micro.Core;
|
|
-using MECF.Framework.Common.DataCenter;
|
|
|
|
-using MECF.Framework.Common.RecipeCenter;
|
|
|
|
using CyberX8_Core;
|
|
using CyberX8_Core;
|
|
using CyberX8_MainPages.PMs;
|
|
using CyberX8_MainPages.PMs;
|
|
using CyberX8_Themes.UserControls;
|
|
using CyberX8_Themes.UserControls;
|
|
|
|
+using MECF.Framework.Common.DataCenter;
|
|
|
|
+using MECF.Framework.Common.RecipeCenter;
|
|
|
|
+using MECF.Framework.Common.Utilities;
|
|
using Prism.Mvvm;
|
|
using Prism.Mvvm;
|
|
using System;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
@@ -116,6 +117,8 @@ namespace CyberX8_MainPages.ViewModels
|
|
[IgnorePropertyChange]
|
|
[IgnorePropertyChange]
|
|
public ICommand SaveRecipeCommand { get; private set; }
|
|
public ICommand SaveRecipeCommand { get; private set; }
|
|
[IgnorePropertyChange]
|
|
[IgnorePropertyChange]
|
|
|
|
+ public ICommand SaveAsRecipeCommand { get; private set; }
|
|
|
|
+ [IgnorePropertyChange]
|
|
public ICommand DIReplenEnableTrueCommand { get; private set; }
|
|
public ICommand DIReplenEnableTrueCommand { get; private set; }
|
|
[IgnorePropertyChange]
|
|
[IgnorePropertyChange]
|
|
public ICommand DIReplenEnableFalseCommand { get; private set; }
|
|
public ICommand DIReplenEnableFalseCommand { get; private set; }
|
|
@@ -141,6 +144,7 @@ namespace CyberX8_MainPages.ViewModels
|
|
CreateCommand = new DelegateCommand<object>(CreateAction);
|
|
CreateCommand = new DelegateCommand<object>(CreateAction);
|
|
EditCommand = new DelegateCommand<object>(EditAction);
|
|
EditCommand = new DelegateCommand<object>(EditAction);
|
|
SaveRecipeCommand = new DelegateCommand<object>(SaveAction);
|
|
SaveRecipeCommand = new DelegateCommand<object>(SaveAction);
|
|
|
|
+ SaveAsRecipeCommand = new DelegateCommand<object>(SaveAsAction);
|
|
DIReplenEnableTrueCommand = new DelegateCommand<object>(EnableTrueAction);
|
|
DIReplenEnableTrueCommand = new DelegateCommand<object>(EnableTrueAction);
|
|
DIReplenEnableFalseCommand = new DelegateCommand<object>(EnableFalseAction);
|
|
DIReplenEnableFalseCommand = new DelegateCommand<object>(EnableFalseAction);
|
|
ANDIReplenEnableTrueCommand = new DelegateCommand<object>(ANEnableTrueAction);
|
|
ANDIReplenEnableTrueCommand = new DelegateCommand<object>(ANEnableTrueAction);
|
|
@@ -301,7 +305,106 @@ namespace CyberX8_MainPages.ViewModels
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 另存为
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="param"></param>
|
|
|
|
+ private void SaveAsAction(object param)
|
|
|
|
+ {
|
|
|
|
+ if (Recipe == null)
|
|
|
|
+ {
|
|
|
|
+ MessageBox.Show("Select a Recipe first", "SaveAs Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ ResRecipe recipe = new ResRecipe();
|
|
|
|
+ if (CheckValid(_isEdit))
|
|
|
|
+ {
|
|
|
|
+ RecipeNameDialog recipeNameDialog = new RecipeNameDialog();
|
|
|
|
+ if (recipeNameDialog.ShowDialog().Value)
|
|
|
|
+ {
|
|
|
|
+ if (!CheckNameExist(recipeNameDialog.RecipeName))
|
|
|
|
+ {
|
|
|
|
+ recipe = new ResRecipe();
|
|
|
|
+
|
|
|
|
+ //recipe.IdleTime = Recipe.IdleTime;
|
|
|
|
+ //recipe.Charge = Recipe.Charge;
|
|
|
|
+ //recipe.Cycles = Recipe.Cycles;
|
|
|
|
+ //recipe.StartTime = Recipe.StartTime;
|
|
|
|
+ //recipe.ChemistryVendor = Recipe.ChemistryVendor;
|
|
|
|
+ //recipe.Metal = Recipe.Metal;
|
|
|
|
+ //recipe.DIReplenEnable = Recipe.DIReplenEnable;
|
|
|
|
+ //recipe.DIReplenTimeRate = Recipe.DIReplenTimeRate;
|
|
|
|
+ //recipe.DIReplenCurrentRate = Recipe.DIReplenCurrentRate;
|
|
|
|
+ //recipe.PHErrorLow = Recipe.PHErrorLow;
|
|
|
|
+ //recipe.PHErrorHigh = Recipe.PHErrorHigh;
|
|
|
|
+ //recipe.CALevelErrorHigh = Recipe.CALevelErrorHigh;
|
|
|
|
+ //recipe.CALevelErrorLow = Recipe.CALevelErrorLow;
|
|
|
|
+ //recipe.ReservoirCALevel = Recipe.ReservoirCALevel;
|
|
|
|
+ //recipe.CAFlowSetPoint = Recipe.CAFlowSetPoint;
|
|
|
|
+ //recipe.CAFlowRateWarningLow = Recipe.CAFlowRateWarningLow;
|
|
|
|
+ //recipe.CAFlowRateErrorLow = Recipe.CAFlowRateErrorLow;
|
|
|
|
+ //recipe.IdleFlowEnable = Recipe.IdleFlowEnable;
|
|
|
|
+ //recipe.TemperatureErrorHigh = Recipe.TemperatureErrorHigh;
|
|
|
|
+ //recipe.TemperatureErrorLow = Recipe.TemperatureErrorLow;
|
|
|
|
+ //recipe.TemperatureSetPoint = Recipe.TemperatureSetPoint;
|
|
|
|
+ //recipe.TemperatureWarningHigh = Recipe.TemperatureWarningHigh;
|
|
|
|
+ //recipe.TemperatureWarningLow = Recipe.TemperatureWarningLow;
|
|
|
|
+ //recipe.ANDIReplenEnable = Recipe.ANDIReplenEnable;
|
|
|
|
+ //recipe.ANDIReplenCurrentRate = Recipe.ANDIReplenCurrentRate;
|
|
|
|
+ //recipe.ANDIReplenTimeRate = Recipe.ANDIReplenTimeRate;
|
|
|
|
+ //recipe.ANFlowRateErrorLow = Recipe.ANFlowRateErrorLow;
|
|
|
|
+ //recipe.ANFlowRateWarningLow = Recipe.ANFlowRateWarningLow;
|
|
|
|
+ //recipe.ANFlowSetPoint = Recipe.ANFlowSetPoint;
|
|
|
|
+ //recipe.ANLevelErrorHigh = Recipe.ANLevelErrorHigh;
|
|
|
|
+ //recipe.ANLevelErrorLow = Recipe.ANLevelErrorLow;
|
|
|
|
+ //recipe.ANLevelWarningLow = Recipe.ANLevelWarningLow;
|
|
|
|
+ //recipe.ReservoirANLevel = Recipe.ReservoirANLevel;
|
|
|
|
+ //recipe.CrossDoseCurrentRate = Recipe.CrossDoseCurrentRate;
|
|
|
|
+ //recipe.CrossDoseTimeRate = Recipe.CrossDoseTimeRate;
|
|
|
|
+ //recipe.CurrentBased = Recipe.CurrentBased;
|
|
|
|
+ //recipe.TimeBased = Recipe.TimeBased;
|
|
|
|
+ //recipe.BurnInEnable = Recipe.BurnInEnable;
|
|
|
|
+ //recipe.BurnInTime = Recipe.BurnInTime;
|
|
|
|
+ //recipe.BurnInCurrent = Recipe.BurnInCurrent;
|
|
|
|
+ //recipe.BurnInCycles = Recipe.BurnInCycles;
|
|
|
|
+ //recipe.BurnInCurrentLimitEnable = Recipe.BurnInCurrentLimitEnable;
|
|
|
|
+ //recipe.BurnInMinCurrentLimit = Recipe.BurnInMinCurrentLimit;
|
|
|
|
+ //recipe.CMMEnable = Recipe.CMMEnable;
|
|
|
|
+ //recipe.CMMCurrentSetPoint = Recipe.CMMCurrentSetPoint;
|
|
|
|
+ //recipe.CMMCurrentFaultPercent = Recipe.CMMCurrentFaultPercent;
|
|
|
|
+ //recipe.CMMCurrentWarningPercent = Recipe.CMMCurrentWarningPercent;
|
|
|
|
+ //recipe.CMMMinVoltage = Recipe.CMMMinVoltage;
|
|
|
|
|
|
|
|
+ //recipe.BurnInStartTime = Recipe.BurnInStartTime; //值类型,不影响Recipe
|
|
|
|
+ recipe = (ResRecipe)PropertyUtil.Clone(Recipe);
|
|
|
|
+
|
|
|
|
+ recipe.CreateDate = DateTime.Now;
|
|
|
|
+ recipe.Ppid = recipeNameDialog.RecipeName;
|
|
|
|
+ recipe.Description = recipeNameDialog.RecipeDescription;
|
|
|
|
+ }
|
|
|
|
+ else if (recipeNameDialog.RecipeName != null)
|
|
|
|
+ {
|
|
|
|
+ MessageBox.Show("Name can not be Null", "Create Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ _uiRecipeManager.SaveRecipe<ResRecipe>(ENGINEERING, recipe.Ppid, "res", recipe);
|
|
|
|
+ LoadRecipeData();
|
|
|
|
+ MessageBox.Show("Save As Recipe Success", "SaveAs Recipe", MessageBoxButton.OK, MessageBoxImage.Information);
|
|
|
|
+ Enable = false;
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ MessageBox.Show(ex.Message, "Save As Recipe", MessageBoxButton.OK, MessageBoxImage.Error);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
private void EnableTrueAction(object param)
|
|
private void EnableTrueAction(object param)
|
|
{
|
|
{
|
|
Recipe.DIReplenEnable = true;
|
|
Recipe.DIReplenEnable = true;
|