|
@@ -54,8 +54,8 @@ namespace Venus_MainPages.ViewModels
|
|
|
|
|
|
private Recipe m_currentRecipe;
|
|
|
private string m_recipeType;
|
|
|
- private bool firstLoad=true;
|
|
|
- private WrapPanel headWrapPanel;
|
|
|
+ private bool firstLoad = true;
|
|
|
+ private WrapPanel headWrapPanel;
|
|
|
private StackPanel bodyStackPanel;
|
|
|
private List<SolidColorBrush> solidColorBrushes = new List<SolidColorBrush>()
|
|
|
{
|
|
@@ -63,10 +63,10 @@ namespace Venus_MainPages.ViewModels
|
|
|
new SolidColorBrush(Colors.Cyan),
|
|
|
new SolidColorBrush(Colors.Honeydew)
|
|
|
};
|
|
|
- private Grid currentRecipeGrid;
|
|
|
+ private Grid currentRecipeGrid;
|
|
|
private int copyIndex = -1;
|
|
|
- private List<string> EPDCfgList=new List<string> ();
|
|
|
- private EPDType currentEPDType=EPDType.None;
|
|
|
+ private List<string> EPDCfgList = new List<string>();
|
|
|
+ private EPDType currentEPDType = EPDType.None;
|
|
|
private JetChamber currentChamber;
|
|
|
private bool isInstalledEPD;
|
|
|
private bool m_IsFrozen;
|
|
@@ -75,9 +75,9 @@ namespace Venus_MainPages.ViewModels
|
|
|
private bool m_PMCIsInstalled;
|
|
|
private bool m_PMDIsInstalled;
|
|
|
|
|
|
- private List<string> moduleList = new List<string> ();
|
|
|
+ private List<string> moduleList = new List<string>();
|
|
|
TreeViewFileItem selectedItem;
|
|
|
- private string typeFolder="";
|
|
|
+ private string typeFolder = "";
|
|
|
#endregion
|
|
|
|
|
|
#region 属性
|
|
@@ -89,10 +89,10 @@ namespace Venus_MainPages.ViewModels
|
|
|
public Recipe CurrentRecipe
|
|
|
{
|
|
|
get { return m_currentRecipe; }
|
|
|
- set
|
|
|
- {
|
|
|
+ set
|
|
|
+ {
|
|
|
m_currentRecipe = value;
|
|
|
- RecipeType = m_currentRecipe.Header.Type.ToString();
|
|
|
+ RecipeType = m_currentRecipe?.Header?.Type.ToString();
|
|
|
}
|
|
|
}
|
|
|
public string RecipeType
|
|
@@ -175,7 +175,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
|
|
|
recipeStep = new RecipeStep();
|
|
|
- recipeStep.LstUnit = RecipeUnity.GetAllUnits(currentChamber,CurrentRecipe.Header.Type);
|
|
|
+ recipeStep.LstUnit = RecipeUnity.GetAllUnits(currentChamber, CurrentRecipe.Header.Type);
|
|
|
|
|
|
CurrentRecipe.Steps.Insert(index - 1, recipeStep);
|
|
|
|
|
@@ -233,17 +233,17 @@ namespace Venus_MainPages.ViewModels
|
|
|
break;
|
|
|
case "1":
|
|
|
moduleName = "PMB";
|
|
|
- break;
|
|
|
+ break;
|
|
|
case "2":
|
|
|
moduleName = "PMC";
|
|
|
- break;
|
|
|
+ break;
|
|
|
case "3":
|
|
|
moduleName = "PMD";
|
|
|
- break;
|
|
|
+ break;
|
|
|
case "4":
|
|
|
moduleName = "ALL";
|
|
|
break;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
if (moduleName == "")
|
|
|
{
|
|
@@ -258,14 +258,14 @@ namespace Venus_MainPages.ViewModels
|
|
|
if (newName != "")
|
|
|
{
|
|
|
var targetChamber = (JetChamber)Enum.Parse(typeof(JetChamber), QueryDataClient.Instance.Service.GetConfig($"{x}.ChamberType").ToString());
|
|
|
- if (currentChamber != targetChamber || x== ModuleName)
|
|
|
+ if (currentChamber != targetChamber || x == ModuleName)
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
var newRecipe = CurrentRecipe;
|
|
|
newRecipe.Header.Name = newName;
|
|
|
newRecipe.Header.CreateTime = DateTime.Now.ToString();
|
|
|
- var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", x,typeFolder, newName + ".rcp");
|
|
|
+ var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", x, typeFolder, newName + ".rcp");
|
|
|
FileInfo fi = new FileInfo(newrecipePath);
|
|
|
var di = fi.Directory;
|
|
|
if (!di.Exists)
|
|
@@ -293,25 +293,25 @@ namespace Venus_MainPages.ViewModels
|
|
|
var newRecipe = CurrentRecipe;
|
|
|
newRecipe.Header.Name = newName;
|
|
|
newRecipe.Header.CreateTime = DateTime.Now.ToString();
|
|
|
- var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", moduleName,typeFolder, newName + ".rcp");
|
|
|
+ var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", moduleName, typeFolder, newName + ".rcp");
|
|
|
FileInfo fi = new FileInfo(newrecipePath);
|
|
|
var di = fi.Directory;
|
|
|
if (!di.Exists)
|
|
|
- {
|
|
|
+ {
|
|
|
di.Create();
|
|
|
}
|
|
|
File.WriteAllText(newrecipePath, RecipeUnity.RecipeToString(newRecipe));
|
|
|
UpdateRecipeFileList();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
private void OnLoaded(Object myrecipeView)
|
|
|
{
|
|
|
if (firstLoad == true)
|
|
|
{
|
|
|
currentChamber = (JetChamber)Enum.Parse(typeof(JetChamber), QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.ChamberType").ToString());
|
|
|
- isInstalledEPD = bool.Parse(QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.EPD.IsEnabled").ToString()) ;
|
|
|
+ isInstalledEPD = bool.Parse(QueryDataClient.Instance.Service.GetConfig($"{ModuleName}.EPD.IsEnabled").ToString());
|
|
|
firstLoad = false;
|
|
|
recipeView = myrecipeView as RecipeView;
|
|
|
treeViewRcpList = recipeView.treeViewRcpList;
|
|
@@ -375,10 +375,10 @@ namespace Venus_MainPages.ViewModels
|
|
|
string xmlRecipeData = "";
|
|
|
if (info.Length == 1)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
CurrentRecipeName = info[0];
|
|
|
typeFolder = "";
|
|
|
- string path = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName,$"{CurrentRecipeName}.rcp");
|
|
|
+ string path = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, $"{CurrentRecipeName}.rcp");
|
|
|
xmlRecipeData = m_uiRecipeManager.LoadRecipeByPath(path);
|
|
|
|
|
|
}
|
|
@@ -395,7 +395,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (xmlRecipeData == "")
|
|
|
{
|
|
|
treeViewRcpList.Items.Remove(selectedItem);
|
|
@@ -404,7 +404,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
CurrentRecipe = Recipe.Load(xmlRecipeData);
|
|
|
LoadHeadWrapPanel(headWrapPanel, CurrentRecipe);
|
|
|
LoadRecipe(CurrentRecipe);
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
@@ -420,7 +420,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
//treeViewRcpList = treeView as TreeView;
|
|
|
|
|
|
- treeViewRcpList.ContextMenu = new ContextMenu() { Background = new SolidColorBrush(Colors.AliceBlue)};
|
|
|
+ treeViewRcpList.ContextMenu = new ContextMenu() { Background = new SolidColorBrush(Colors.AliceBlue) };
|
|
|
|
|
|
MenuItem menuItem = new MenuItem();
|
|
|
|
|
@@ -460,12 +460,12 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- bool hasHV=false;
|
|
|
+ bool hasHV = false;
|
|
|
if (currentChamber == JetChamber.Venus)
|
|
|
{
|
|
|
hasHV = true;
|
|
|
}
|
|
|
- RecipeNameInputDlg dlg = new RecipeNameInputDlg(Application.Current.Resources["GlobalLableMsgInputRecipeName"].ToString(),hasHV)
|
|
|
+ RecipeNameInputDlg dlg = new RecipeNameInputDlg(Application.Current.Resources["GlobalLableMsgInputRecipeName"].ToString(), hasHV)
|
|
|
{
|
|
|
Owner = Application.Current.MainWindow
|
|
|
};
|
|
@@ -473,7 +473,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
var recipeName = folderName + "\\" + dlg.InputText;
|
|
|
RecipeType type = (RecipeType)Enum.Parse(typeof(RecipeType), dlg.SelectedType);
|
|
|
- string newRecipe =RecipeUnity.CreateRecipe(currentChamber,type, dlg.InputText);
|
|
|
+ string newRecipe = RecipeUnity.CreateRecipe(currentChamber, type, dlg.InputText);
|
|
|
|
|
|
//string recipeContent = m_uiRecipeManager.GetRecipeTemplate(ModuleName);
|
|
|
|
|
@@ -503,7 +503,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
- if (WPFMessageBox.ShowQuestion($"Delete {typeFolder}Recipe {CurrentRecipeName}?","删除后无法恢复!!!") == MessageBoxResult.Yes)
|
|
|
+ if (WPFMessageBox.ShowQuestion($"Delete {typeFolder}Recipe {CurrentRecipeName}?", "删除后无法恢复!!!") == MessageBoxResult.Yes)
|
|
|
{
|
|
|
MenuItem mit = sender as MenuItem;
|
|
|
//string recipename = mit.Header.ToString();
|
|
@@ -513,7 +513,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
//treeViewRcpList.Items.Remove(selectedItem);
|
|
|
UpdateRecipeFileList();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
private void menuItem_MouseClick_SaveAsRecipe(object sender, RoutedEventArgs e)
|
|
|
{
|
|
@@ -527,10 +527,10 @@ namespace Venus_MainPages.ViewModels
|
|
|
var newRecipe = CurrentRecipe;
|
|
|
newRecipe.Header.Name = newName;
|
|
|
newRecipe.Header.CreateTime = DateTime.Now.ToString();
|
|
|
- var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName,typeFolder, newName + ".rcp");
|
|
|
+ var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, typeFolder, newName + ".rcp");
|
|
|
File.WriteAllText(newrecipePath, RecipeUnity.RecipeToString(newRecipe));
|
|
|
UpdateRecipeFileList();
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
private void menuItem_MouseClick_RenameRecipe(object sender, RoutedEventArgs e)
|
|
|
{
|
|
@@ -555,9 +555,9 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
return m_uiRecipeManager.SaveAsRecipe(ModuleName, recipeName, recipeContent);
|
|
|
}
|
|
|
- public bool SaveAsRecipe2(string recipeName,string type, string recipeContent)
|
|
|
+ public bool SaveAsRecipe2(string recipeName, string type, string recipeContent)
|
|
|
{
|
|
|
- return m_uiRecipeManager.SaveAsRecipe2(ModuleName,type, recipeName, recipeContent);
|
|
|
+ return m_uiRecipeManager.SaveAsRecipe2(ModuleName, type, recipeName, recipeContent);
|
|
|
}
|
|
|
public string GetXmlRecipeList()
|
|
|
{
|
|
@@ -590,7 +590,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
CreateTreeViewItems(ele, item);
|
|
|
item.IsExpanded = false;
|
|
|
itemsControl.Items.Add(item);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -638,7 +638,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
Mode = BindingMode.TwoWay, // 绑定模式
|
|
|
UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged, //触发器
|
|
|
};
|
|
|
-
|
|
|
+
|
|
|
|
|
|
var propertyTypeName = propertyInfo.PropertyType.Name;
|
|
|
var propertyInfoName = propertyInfo.Name;
|
|
@@ -657,7 +657,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
control = cb;
|
|
|
control.Height = 23;
|
|
|
ItemsControlHelper.SetEnumValuesToItemsSource(control, true);
|
|
|
-
|
|
|
+
|
|
|
control.SetBinding(ComboBox.SelectedItemProperty, binding);
|
|
|
|
|
|
break;
|
|
@@ -680,7 +680,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
//{
|
|
|
// stringBuilder.Append(chucklist[i] + "\t");
|
|
|
//}
|
|
|
-
|
|
|
+
|
|
|
control = new ComboBox()
|
|
|
{
|
|
|
ItemsSource = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\Chuck"))
|
|
@@ -691,7 +691,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
control.MaxWidth = 300;
|
|
|
control.SetBinding(ComboBox.SelectedItemProperty, binding);
|
|
|
control.PreviewMouseLeftButtonDown += ChuckControl_PreviewMouseLeftButtonDown;
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
case "DechuckRecipe":
|
|
|
if (currentChamber != JetChamber.Venus)
|
|
@@ -781,11 +781,15 @@ namespace Venus_MainPages.ViewModels
|
|
|
|
|
|
private void ChuckControl_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
|
{
|
|
|
- (sender as ComboBox).ItemsSource = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\Chuck"));
|
|
|
+ var items = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\Chuck")).ToList();
|
|
|
+ items.Add("");
|
|
|
+ (sender as ComboBox).ItemsSource = items;
|
|
|
}
|
|
|
private void DechuckControl_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
|
{
|
|
|
- (sender as ComboBox).ItemsSource = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\DeChuck"));
|
|
|
+ var items = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\DeChuck")).ToList();
|
|
|
+ items.Add("");
|
|
|
+ (sender as ComboBox).ItemsSource = items;
|
|
|
}
|
|
|
|
|
|
private void ChangeUI(object sender, SelectionChangedEventArgs e)
|
|
@@ -814,42 +818,19 @@ namespace Venus_MainPages.ViewModels
|
|
|
if (copyIndex == -1)
|
|
|
{
|
|
|
var recipeStep = new RecipeStep();
|
|
|
- //switch (currentChamber)
|
|
|
- //{
|
|
|
- // case JetChamber.Venus:
|
|
|
- // case JetChamber.Kepler2300:
|
|
|
- // recipeStep.LstUnit.Add(new PressureByPressureModeUnit());
|
|
|
- // recipeStep.LstUnit.Add(new TCPUnit());
|
|
|
- // recipeStep.LstUnit.Add(new BiasUnit());
|
|
|
- // recipeStep.LstUnit.Add(new GasControlUnit());
|
|
|
- // recipeStep.LstUnit.Add(new ESCHVUnit());
|
|
|
- // recipeStep.LstUnit.Add(new ProcessKitUnit());
|
|
|
- // break;
|
|
|
-
|
|
|
- // case JetChamber.Kepler2200A:
|
|
|
- // recipeStep.LstUnit.Add(new Kepler2200GasControlUnit());
|
|
|
|
|
|
- // recipeStep.LstUnit.Add(new HeaterUnit());
|
|
|
- // recipeStep.LstUnit.Add(new Kepler2200RFUnit());
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // break;
|
|
|
- //}
|
|
|
recipeStep.LstUnit = RecipeUnity.GetAllUnits(currentChamber, CurrentRecipe.Header.Type);
|
|
|
CurrentRecipe.Steps.Insert(insertIndex - 1, recipeStep);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
var t1 = JsonConvert.SerializeObject(CurrentRecipe);
|
|
|
- var recipeStep = Recipe.Load(t1).Steps[copyIndex - 1];
|
|
|
+ var recipeStep = Recipe.Load(t1).Steps[copyIndex - 1];
|
|
|
|
|
|
CurrentRecipe.Steps.Insert(insertIndex - 1, recipeStep);
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
for (int i = 0; i < CurrentRecipe.Steps.Count; i++)
|
|
|
{
|
|
|
CurrentRecipe.Steps[i].StepNo = i + 1;
|
|
@@ -857,38 +838,15 @@ namespace Venus_MainPages.ViewModels
|
|
|
LoadRecipe(CurrentRecipe);
|
|
|
}
|
|
|
private void MenuItemRightInsert_Click(object sender, RoutedEventArgs e)
|
|
|
- {
|
|
|
+ {
|
|
|
var t = ((sender as MenuItem).Parent as ContextMenu).PlacementTarget as TextBox;
|
|
|
int insertIndex = Convert.ToInt32(t.Text);
|
|
|
|
|
|
if (copyIndex == -1)
|
|
|
{
|
|
|
var recipeStep = new RecipeStep();
|
|
|
- //switch (currentChamber)
|
|
|
- //{
|
|
|
- // case JetChamber.Venus:
|
|
|
- // recipeStep.LstUnit.Add(new PressureByPressureModeUnit());
|
|
|
- // recipeStep.LstUnit.Add(new TCPUnit());
|
|
|
- // recipeStep.LstUnit.Add(new BiasUnit());
|
|
|
- // recipeStep.LstUnit.Add(new GasControlUnit());
|
|
|
- // recipeStep.LstUnit.Add(new ESCHVUnit());
|
|
|
- // recipeStep.LstUnit.Add(new ProcessKitUnit());
|
|
|
- // break;
|
|
|
- // case JetChamber.Kepler2300:
|
|
|
- // recipeStep.LstUnit.Add(new PressureByPressureModeUnit());
|
|
|
- // recipeStep.LstUnit.Add(new TCPUnit());
|
|
|
- // recipeStep.LstUnit.Add(new BiasUnit());
|
|
|
- // recipeStep.LstUnit.Add(new GasControlUnit());
|
|
|
- // recipeStep.LstUnit.Add(new ProcessKitUnit());
|
|
|
- // break;
|
|
|
|
|
|
- // case JetChamber.Kepler2200A:
|
|
|
- // recipeStep.LstUnit.Add(new Kepler2200GasControlUnit());
|
|
|
- // recipeStep.LstUnit.Add(new HeaterUnit());
|
|
|
- // recipeStep.LstUnit.Add(new Kepler2200RFUnit());
|
|
|
- // break;
|
|
|
- //}
|
|
|
- recipeStep.LstUnit=RecipeUnity.GetAllUnits(currentChamber, CurrentRecipe.Header.Type);
|
|
|
+ recipeStep.LstUnit = RecipeUnity.GetAllUnits(currentChamber, CurrentRecipe.Header.Type);
|
|
|
CurrentRecipe.Steps.Insert(insertIndex, recipeStep);
|
|
|
}
|
|
|
else
|
|
@@ -911,7 +869,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
var t = ((sender as MenuItem).Parent as ContextMenu).PlacementTarget as TextBox;
|
|
|
int deleteIndex = Convert.ToInt32(t.Text);
|
|
|
//OnDeleteStep(deleteIndex - 1);
|
|
|
- CurrentRecipe.Steps.RemoveAt(deleteIndex-1);
|
|
|
+ CurrentRecipe.Steps.RemoveAt(deleteIndex - 1);
|
|
|
for (int i = 0; i < CurrentRecipe.Steps.Count; i++)
|
|
|
{
|
|
|
CurrentRecipe.Steps[i].StepNo = i + 1;
|
|
@@ -966,9 +924,9 @@ namespace Venus_MainPages.ViewModels
|
|
|
}
|
|
|
if (index == 0 && grid.ColumnDefinitions.Count == 1)
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
RowDefinition row1 = new RowDefinition();
|
|
|
-
|
|
|
+
|
|
|
grid.RowDefinitions.Add(row1);
|
|
|
}
|
|
|
|
|
@@ -992,7 +950,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged //触发器
|
|
|
};
|
|
|
switch (propertyTypeName)
|
|
|
- {
|
|
|
+ {
|
|
|
case "Int32":
|
|
|
case "String":
|
|
|
if (propertyInfoName == "EPDConfig")
|
|
@@ -1024,28 +982,21 @@ namespace Venus_MainPages.ViewModels
|
|
|
Grid.SetRow(EPDButton, i);
|
|
|
Grid.SetColumn(EPDButton, index + location);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
TextBox textBox = new TextBox();
|
|
|
textBox.HorizontalContentAlignment = HorizontalAlignment.Center;
|
|
|
- textBox.VerticalContentAlignment = VerticalAlignment.Center;
|
|
|
- //if (stepcheckbinding == null)
|
|
|
- //{
|
|
|
- // textBox.IsEnabled = true;
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // textBox.SetBinding(TextBox.IsEnabledProperty, stepcheckbinding);
|
|
|
- //}
|
|
|
-
|
|
|
+ textBox.VerticalContentAlignment = VerticalAlignment.Center;
|
|
|
+
|
|
|
+
|
|
|
textBox.SetBinding(TextBox.TextProperty, binding);
|
|
|
grid.Children.Add(textBox);
|
|
|
Grid.SetRow(textBox, i);
|
|
|
Grid.SetColumn(textBox, index + location);
|
|
|
object[] objAttrs = propertyInfo.GetCustomAttributes(typeof(IsOnlyReadAttribute), true);
|
|
|
-
|
|
|
+
|
|
|
if (objAttrs.Length > 0)
|
|
|
{
|
|
|
textBox.IsReadOnly = true;
|
|
@@ -1086,28 +1037,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
Grid.SetRow(checkBox, i);
|
|
|
Grid.SetColumn(checkBox, index + location);
|
|
|
|
|
|
- //if (stepcheckbinding == null)
|
|
|
- //{
|
|
|
- // stepcheckbinding = new Binding
|
|
|
- // {
|
|
|
- // Source = checkBox, // 数据源
|
|
|
- // Path = new PropertyPath("IsChecked"), // 需绑定的数据源属性名
|
|
|
- // Mode = BindingMode.TwoWay, // 绑定模式
|
|
|
- // UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged //触发器
|
|
|
- // };
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
-
|
|
|
- //}
|
|
|
- //if (stepcheckbinding == null)
|
|
|
- //{
|
|
|
- // checkBox.IsEnabled = true;
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // checkBox.SetBinding(TextBox.IsEnabledProperty, stepcheckbinding);
|
|
|
- //}
|
|
|
+
|
|
|
|
|
|
break;
|
|
|
|
|
@@ -1122,14 +1052,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
Grid.SetRow(comboBox, i);
|
|
|
Grid.SetColumn(comboBox, index + location);
|
|
|
|
|
|
- //if (stepcheckbinding == null)
|
|
|
- //{
|
|
|
- // comboBox.IsEnabled = true;
|
|
|
- //}
|
|
|
- //else
|
|
|
- //{
|
|
|
- // comboBox.SetBinding(TextBox.IsEnabledProperty, stepcheckbinding);
|
|
|
- //}
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -1142,50 +1065,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
Type unitType = x.GetType();
|
|
|
bool isIgnore = false;
|
|
|
-
|
|
|
- //switch (currentChamber)
|
|
|
- //{
|
|
|
-
|
|
|
- // case JetChamber.Venus:
|
|
|
- // var VenusUnitsValues = Enum.GetValues(typeof(VenusUnits));
|
|
|
- // foreach (var item in VenusUnitsValues)
|
|
|
- // {
|
|
|
- // if (item.ToString() == unitType.Name)
|
|
|
- // {
|
|
|
- // isIgnore = true;
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // case JetChamber.Kepler2300:
|
|
|
- // var Kepler2300UintsValues = Enum.GetValues(typeof(Kepler2300Uints));
|
|
|
- // foreach (var item in Kepler2300UintsValues)
|
|
|
- // {
|
|
|
- // if (item.ToString() == unitType.Name)
|
|
|
- // {
|
|
|
- // isIgnore = true;
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // case JetChamber.Kepler2200A:
|
|
|
- // var Kepler2200AUintsValues = Enum.GetValues(typeof(Kepler2200AUnits));
|
|
|
- // foreach (var item in Kepler2200AUintsValues)
|
|
|
- // {
|
|
|
- // if (item.ToString() == unitType.Name)
|
|
|
- // {
|
|
|
- // isIgnore = true;
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // break;
|
|
|
- // case JetChamber.Kepler2200B:
|
|
|
- // break;
|
|
|
- //}
|
|
|
- //if (!isIgnore)
|
|
|
- //{
|
|
|
- // continue;
|
|
|
- //}
|
|
|
+
|
|
|
Binding checkbinding = null;
|
|
|
foreach (PropertyInfo propertyInfo in unitType.GetProperties())
|
|
|
{
|
|
@@ -1423,14 +1303,14 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
Button button = sender as Button;
|
|
|
string para = button.Tag.ToString();
|
|
|
- int stepno = Convert.ToInt32(para.Split('.')[1])-1;
|
|
|
+ int stepno = Convert.ToInt32(para.Split('.')[1]) - 1;
|
|
|
var endpointconfigitem = new MECF.Framework.Common.CommonData.EndPointConfigItem();
|
|
|
- if (CurrentRecipe.Steps[stepno].EPDConfig!=null && CurrentRecipe.Steps[stepno].EPDConfig.Length>20)
|
|
|
+ if (CurrentRecipe.Steps[stepno].EPDConfig != null && CurrentRecipe.Steps[stepno].EPDConfig.Length > 20)
|
|
|
{
|
|
|
endpointconfigitem.SetValue(CurrentRecipe.Steps[stepno].EPDConfig);
|
|
|
}
|
|
|
|
|
|
- (new EndPointDlg(para, endpointconfigitem,CurrentRecipe)).ShowDialog();
|
|
|
+ (new EndPointDlg(para, endpointconfigitem, CurrentRecipe)).ShowDialog();
|
|
|
}
|
|
|
private void UpdateRecipeFileList()
|
|
|
{
|
|
@@ -1452,7 +1332,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
GC.WaitForPendingFinalizers(); // Doesn't help either
|
|
|
|
|
|
CurrentRecipe = recipe;
|
|
|
- if (CurrentRecipe.Header.Type==Venus_Core.RecipeType.Process && CurrentRecipe.Header.ChuckRecipe != "" && CurrentRecipe.Header.ChuckRecipe != null)
|
|
|
+ if (CurrentRecipe.Header.Type == Venus_Core.RecipeType.Process && CurrentRecipe.Header.ChuckRecipe != "" && CurrentRecipe.Header.ChuckRecipe != null)
|
|
|
{
|
|
|
Grid chuckGrid = new Grid();
|
|
|
chuckGrid.IsEnabled = false;
|
|
@@ -1463,7 +1343,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
return;
|
|
|
}
|
|
|
var chuckRecipe = Recipe.Load(chuckRecipeData);
|
|
|
-
|
|
|
+
|
|
|
for (int i = 0; i < chuckRecipe.Steps.Count; i++)
|
|
|
{
|
|
|
RecipeStepToGridColumn(chuckRecipe.Steps[i], chuckGrid, i, false);
|
|
@@ -1488,7 +1368,8 @@ namespace Venus_MainPages.ViewModels
|
|
|
Grid deChuckGrid = new Grid();
|
|
|
deChuckGrid.IsEnabled = false;
|
|
|
deChuckGrid.Margin = new Thickness(15);
|
|
|
- string DechuckRecipeData = m_uiRecipeManager.LoadRecipe(ModuleName, $"DeChuck\\{CurrentRecipe.Header.DechuckRecipe}");
|
|
|
+ string path = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName,typeFolder, $"{CurrentRecipeName}.rcp");
|
|
|
+ string DechuckRecipeData = m_uiRecipeManager.LoadRecipeByPath(path);
|
|
|
//index = 0;
|
|
|
var dechuckRecipe = Recipe.Load(DechuckRecipeData);
|
|
|
for (int i = 0; i < dechuckRecipe.Steps.Count; i++)
|
|
@@ -1498,59 +1379,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
bodyStackPanel.Children.Add(deChuckGrid);
|
|
|
}
|
|
|
}
|
|
|
- ////private void OnAddStep(int index)
|
|
|
- ////{
|
|
|
- //// if (CurrentRecipe != null)
|
|
|
- //// {
|
|
|
- //// RecipeStep recipeStep;
|
|
|
- //// if (copyIndex == -1)
|
|
|
- //// {
|
|
|
- //// recipeStep = new RecipeStep();
|
|
|
- //// switch (currentChamber)
|
|
|
- //// {
|
|
|
- //// case JetChamber.Venus:
|
|
|
- //// recipeStep.LstUnit.Add(new PressureByPressureModeUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new TCPUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new BiasUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new GasControlUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new ESCHVUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new ProcessKitUnit());
|
|
|
- //// break;
|
|
|
- //// case JetChamber.Kepler2300:
|
|
|
- //// recipeStep.LstUnit.Add(new PressureByPressureModeUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new TCPUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new BiasUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new GasControlUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new ProcessKitUnit());
|
|
|
- //// break;
|
|
|
-
|
|
|
- //// case JetChamber.Kepler2200A:
|
|
|
- //// recipeStep.LstUnit.Add(new Kepler2200GasControlUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new HeaterUnit());
|
|
|
- //// recipeStep.LstUnit.Add(new Kepler2200RFUnit());
|
|
|
-
|
|
|
- //// break;
|
|
|
- //// }
|
|
|
- //// CurrentRecipe.Steps.Insert(index - 1, recipeStep);
|
|
|
-
|
|
|
- //// }
|
|
|
- //// else
|
|
|
- //// {
|
|
|
- //// var t = JsonConvert.SerializeObject(CurrentRecipe);
|
|
|
- //// recipeStep = Recipe.Load(t).Steps[copyIndex - 1];
|
|
|
-
|
|
|
- //// CurrentRecipe.Steps.Insert(index - 1, recipeStep);
|
|
|
- //// }
|
|
|
-
|
|
|
-
|
|
|
- //// RecipeStepToGridColumn(recipeStep, currentRecipeGrid, index, true);
|
|
|
-
|
|
|
- //// for (int i = 1; i <= CurrentRecipe.Steps.Count; i++)
|
|
|
- //// {
|
|
|
- //// CurrentRecipe.Steps[i - 1].StepNo = i;
|
|
|
- //// }
|
|
|
- //// }
|
|
|
- ////}
|
|
|
+
|
|
|
private void OnDeleteStep(int index)
|
|
|
{
|
|
|
if (CurrentRecipe != null && CurrentRecipe.Steps.Count > 1)
|
|
@@ -1569,19 +1398,21 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
if (CurrentRecipeName != "")
|
|
|
{
|
|
|
- string xmlRecipeData = m_uiRecipeManager.LoadRecipe(ModuleName, CurrentRecipeName);
|
|
|
+
|
|
|
+ string path = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, typeFolder, $"{CurrentRecipeName}.rcp");
|
|
|
+ string xmlRecipeData = m_uiRecipeManager.LoadRecipeByPath(path);
|
|
|
CurrentRecipe = Recipe.Load(xmlRecipeData);
|
|
|
LoadRecipe(CurrentRecipe);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
private void OnTolerance()
|
|
|
- {
|
|
|
+ {
|
|
|
List<Kepler2300Tolerance> kepler2300Tolerances = new List<Kepler2300Tolerance>();
|
|
|
kepler2300Tolerances.Add(new Kepler2300Tolerance());
|
|
|
kepler2300Tolerances.Add(new Kepler2300Tolerance());
|
|
|
- var str= SerializeHelper.Instance.ObjectToJsonString<List<Kepler2300Tolerance>>(kepler2300Tolerances);
|
|
|
+ var str = SerializeHelper.Instance.ObjectToJsonString<List<Kepler2300Tolerance>>(kepler2300Tolerances);
|
|
|
}
|
|
|
- private void ExpandAllItems(ItemsControl control)
|
|
|
+ private void ExpandAllItems(ItemsControl control)
|
|
|
{
|
|
|
if (control == null)
|
|
|
{
|