|
@@ -18,6 +18,7 @@ using System.Threading;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
|
using System.Windows.Data;
|
|
|
+using System.Windows.Documents;
|
|
|
using System.Windows.Input;
|
|
|
using System.Windows.Media;
|
|
|
using System.Xml;
|
|
@@ -29,6 +30,7 @@ using Venus_MainPages.Views;
|
|
|
using Venus_Themes.UserControls;
|
|
|
using Venus_Unity;
|
|
|
using WPF.Themes.UserControls;
|
|
|
+using Xceed.Wpf.Toolkit.PropertyGrid.Attributes;
|
|
|
using RecipeStep = Venus_Core.RecipeStep;
|
|
|
|
|
|
namespace Venus_MainPages.ViewModels
|
|
@@ -74,7 +76,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
|
|
|
private List<string> moduleList = new List<string> ();
|
|
|
TreeViewFileItem selectedItem;
|
|
|
-
|
|
|
+ private string typeFolder="";
|
|
|
#endregion
|
|
|
|
|
|
#region 属性
|
|
@@ -173,36 +175,6 @@ namespace Venus_MainPages.ViewModels
|
|
|
|
|
|
recipeStep = new RecipeStep();
|
|
|
recipeStep.LstUnit = RecipeUnity.GetAllUnits(currentChamber,CurrentRecipe.Header.Type);
|
|
|
- //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);
|
|
|
|
|
@@ -244,7 +216,6 @@ namespace Venus_MainPages.ViewModels
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- //JetChamber jetChamber = JetChamber.None;
|
|
|
string moduleName = "";
|
|
|
switch (obj.ToString())
|
|
|
{
|
|
@@ -285,15 +256,17 @@ 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", x, 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)
|
|
|
+ {
|
|
|
+ di.Create();
|
|
|
+ }
|
|
|
File.WriteAllText(newrecipePath, RecipeUnity.RecipeToString(newRecipe));
|
|
|
UpdateRecipeFileList();
|
|
|
}
|
|
|
}
|
|
|
- //moduleList.ForEach(x =>
|
|
|
- //{
|
|
|
-
|
|
|
- //});
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -311,7 +284,13 @@ 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, 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();
|
|
|
}
|
|
@@ -332,10 +311,6 @@ namespace Venus_MainPages.ViewModels
|
|
|
UpdateRecipeFileList();
|
|
|
treeViewRcpList.SelectedItemChanged += TreeViewRcpList_SelectedItemChanged;
|
|
|
|
|
|
- //DispatcherTimer timer = new DispatcherTimer();
|
|
|
- //timer.Interval = TimeSpan.FromSeconds(1);
|
|
|
- //timer.Tick += Timer_Tick; ;
|
|
|
- //timer.Start();
|
|
|
|
|
|
for (int i = 0; i < 5; i++)
|
|
|
{
|
|
@@ -386,8 +361,32 @@ namespace Venus_MainPages.ViewModels
|
|
|
return;
|
|
|
try
|
|
|
{
|
|
|
- CurrentRecipeName = selectedItem.FileName;
|
|
|
- string xmlRecipeData = m_uiRecipeManager.LoadRecipe(ModuleName, selectedItem.FileName);
|
|
|
+ string[] info = selectedItem.FileName.Split('\\');
|
|
|
+ //string path;
|
|
|
+ string xmlRecipeData = "";
|
|
|
+ if (info.Length == 1)
|
|
|
+ {
|
|
|
+
|
|
|
+ CurrentRecipeName = info[0];
|
|
|
+ typeFolder = "";
|
|
|
+ string path = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName,$"{CurrentRecipeName}.rcp");
|
|
|
+ xmlRecipeData = m_uiRecipeManager.LoadRecipeByPath(path);
|
|
|
+
|
|
|
+ }
|
|
|
+ else if (info.Length == 2)
|
|
|
+ {
|
|
|
+ string type = info[0];
|
|
|
+ typeFolder = type;
|
|
|
+ CurrentRecipeName = info[1];
|
|
|
+ string path = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, type, $"{CurrentRecipeName}.rcp");
|
|
|
+ xmlRecipeData = m_uiRecipeManager.LoadRecipeByPath(path);
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (xmlRecipeData == "")
|
|
|
{
|
|
|
treeViewRcpList.Items.Remove(selectedItem);
|
|
@@ -470,11 +469,11 @@ namespace Venus_MainPages.ViewModels
|
|
|
//string recipeContent = m_uiRecipeManager.GetRecipeTemplate(ModuleName);
|
|
|
|
|
|
//m_uiRecipeManager.SaveAsRecipe(ModuleName, recipeName, m_uiRecipeManager.LoadRecipe("system",folderName));
|
|
|
- if (SaveAsRecipe(recipeName, newRecipe))
|
|
|
+ if (SaveAsRecipe2(recipeName, type.ToString(), newRecipe))
|
|
|
{
|
|
|
- //UpdateRecipeFileList();
|
|
|
+ UpdateRecipeFileList();
|
|
|
//SelectRecipe(recipeName);
|
|
|
- treeViewRcpList.Items.Add(new TreeViewFileItem(dlg.InputText));
|
|
|
+ //treeViewRcpList.Items.Add(new TreeViewFileItem(dlg.InputText));
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -495,13 +494,15 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
- if (WPFMessageBox.ShowQuestion($"Delete {CurrentRecipeName}?","删除后无法恢复!!!") == MessageBoxResult.Yes)
|
|
|
+ if (WPFMessageBox.ShowQuestion($"Delete {typeFolder}Recipe {CurrentRecipeName}?","删除后无法恢复!!!") == MessageBoxResult.Yes)
|
|
|
{
|
|
|
MenuItem mit = sender as MenuItem;
|
|
|
//string recipename = mit.Header.ToString();
|
|
|
- m_uiRecipeManager.DeleteRecipe(ModuleName, CurrentRecipeName);
|
|
|
+ string path = typeFolder == "" ? CurrentRecipeName : $"{typeFolder}\\{CurrentRecipeName}";
|
|
|
+ m_uiRecipeManager.DeleteRecipe(ModuleName, path);
|
|
|
//PerformCreateRecipe(folderName);
|
|
|
- treeViewRcpList.Items.Remove(selectedItem);
|
|
|
+ //treeViewRcpList.Items.Remove(selectedItem);
|
|
|
+ UpdateRecipeFileList();
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -517,7 +518,7 @@ 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, newName + ".rcp");
|
|
|
+ var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName,typeFolder, newName + ".rcp");
|
|
|
File.WriteAllText(newrecipePath, RecipeUnity.RecipeToString(newRecipe));
|
|
|
UpdateRecipeFileList();
|
|
|
}
|
|
@@ -528,18 +529,18 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
- var newName= Interaction.InputBox(" ", "Rename Recipe", CurrentRecipeName, -1, -1);
|
|
|
- if (newName != CurrentRecipeName && newName!="")
|
|
|
+ var newName = Interaction.InputBox(" ", "Rename Recipe", CurrentRecipeName, -1, -1);
|
|
|
+ if (newName != CurrentRecipeName && newName != "")
|
|
|
{
|
|
|
- var oldrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, CurrentRecipeName + ".rcp");
|
|
|
- var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, newName + ".rcp");
|
|
|
- CurrentRecipe.Header.Name = newName;
|
|
|
- SaveRecipe(CurrentRecipeName, RecipeUnity.RecipeToString(CurrentRecipe));
|
|
|
- File.Move(oldrecipePath, newrecipePath);
|
|
|
+ var newRecipe = CurrentRecipe;
|
|
|
+ newRecipe.Header.Name = newName;
|
|
|
+ newRecipe.Header.CreateTime = DateTime.Now.ToString();
|
|
|
+ var oldrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, typeFolder, CurrentRecipeName + ".rcp");
|
|
|
+ var newrecipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, typeFolder, newName + ".rcp");
|
|
|
+ File.Delete(oldrecipePath);
|
|
|
+ File.WriteAllText(newrecipePath, RecipeUnity.RecipeToString(newRecipe));
|
|
|
UpdateRecipeFileList();
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
public bool SaveAsRecipe(string recipeName, string recipeContent)
|
|
|
{
|
|
@@ -559,22 +560,25 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
if (ele.Name == "File")
|
|
|
{
|
|
|
- string fileName = ele.Attributes["Name"].Value;
|
|
|
- fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1);
|
|
|
- TreeViewFileItem item = new TreeViewFileItem(ele.Attributes["Name"].Value);
|
|
|
- item.Tag = ele.Attributes["Name"].Value;
|
|
|
- //item.ToolTip = fileName;
|
|
|
- itemsControl.Items.Add(item);
|
|
|
+ //string fileName = ele.Attributes["Name"].Value;
|
|
|
+ //fileName = fileName.Substring(fileName.LastIndexOf('\\') + 1);
|
|
|
+ //TreeViewFileItem item = new TreeViewFileItem(ele.Attributes["Name"].Value);
|
|
|
+ //item.Tag = ele.Attributes["Name"].Value;
|
|
|
+ ////item.ToolTip = fileName;
|
|
|
+ //itemsControl.Items.Add(item);
|
|
|
}
|
|
|
else if (ele.Name == "Folder")
|
|
|
{
|
|
|
string folderName = ele.Attributes["Name"].Value;
|
|
|
folderName = folderName.Substring(folderName.LastIndexOf('\\') + 1);
|
|
|
- TreeViewFolderItem item = new TreeViewFolderItem(folderName);
|
|
|
- item.Tag = ele.Attributes["Name"].Value;
|
|
|
- CreateTreeViewItems(ele, item);
|
|
|
- item.IsExpanded = false;
|
|
|
- itemsControl.Items.Add(item);
|
|
|
+ if (folderName == Venus_Core.RecipeType.Process.ToString() || folderName == Venus_Core.RecipeType.Clean.ToString() || folderName == Venus_Core.RecipeType.Chuck.ToString() || folderName == Venus_Core.RecipeType.DeChuck.ToString())
|
|
|
+ {
|
|
|
+ TreeViewFolderItem item = new TreeViewFolderItem(folderName);
|
|
|
+ item.Tag = ele.Attributes["Name"].Value;
|
|
|
+ CreateTreeViewItems(ele, item);
|
|
|
+ item.IsExpanded = false;
|
|
|
+ itemsControl.Items.Add(item);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -650,56 +654,60 @@ namespace Venus_MainPages.ViewModels
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
- string[] chucklist = new string[] { "" };
|
|
|
- ArrayList arrayList = new ArrayList(chucklist.ToList());
|
|
|
- IEnumerable<string> chlist= GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName)).ToList().Where(item => item.ToLower().Contains("chuck") && (item.ToLower().Contains("dechuck") == false));
|
|
|
- foreach (var i in chlist)
|
|
|
- {
|
|
|
- arrayList.Add(i);
|
|
|
- }
|
|
|
- chucklist = (string[])arrayList.ToArray(typeof(string));
|
|
|
+ //string[] chucklist = new string[] { "" };
|
|
|
+ //ArrayList arrayList = new ArrayList(chucklist.ToList());
|
|
|
+ //IEnumerable<string> chlist= GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName)).ToList().Where(item => item.ToLower().Contains("chuck") && (item.ToLower().Contains("dechuck") == false));
|
|
|
+ //foreach (var i in chlist)
|
|
|
+ //{
|
|
|
+ // arrayList.Add(i);
|
|
|
+ //}
|
|
|
+ //chucklist = (string[])arrayList.ToArray(typeof(string));
|
|
|
StringBuilder stringBuilder = new StringBuilder();
|
|
|
//输出
|
|
|
- for (int i = 0; i < chucklist.Length; i++)
|
|
|
- {
|
|
|
- stringBuilder.Append(chucklist[i] + "\t");
|
|
|
- }
|
|
|
+ //for (int i = 0; i < chucklist.Length; i++)
|
|
|
+ //{
|
|
|
+ // stringBuilder.Append(chucklist[i] + "\t");
|
|
|
+ //}
|
|
|
|
|
|
control = new ComboBox()
|
|
|
{
|
|
|
- ItemsSource = chucklist
|
|
|
+ ItemsSource = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\Chuck"))
|
|
|
+
|
|
|
};
|
|
|
control.Height = 23;
|
|
|
control.MinWidth = 100;
|
|
|
control.MaxWidth = 300;
|
|
|
control.SetBinding(ComboBox.SelectedItemProperty, binding);
|
|
|
+ control.PreviewMouseLeftButtonDown += ChuckControl_PreviewMouseLeftButtonDown;
|
|
|
+
|
|
|
break;
|
|
|
case "DechuckRecipe":
|
|
|
if (currentChamber != JetChamber.Venus)
|
|
|
{
|
|
|
continue;
|
|
|
}
|
|
|
- string[] dechucklist = new string[] { "" };
|
|
|
- ArrayList dearrayList = new ArrayList(dechucklist.ToList());
|
|
|
- IEnumerable<string> delist = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName)).ToList().Where(item => item.ToLower().Contains("dechuck"));
|
|
|
- foreach (var i in delist)
|
|
|
- {
|
|
|
- dearrayList.Add(i);
|
|
|
- }
|
|
|
- dechucklist = (string[])dearrayList.ToArray(typeof(string));
|
|
|
- StringBuilder destringBuilder = new StringBuilder();
|
|
|
- for (int i = 0; i < dechucklist.Length; i++)
|
|
|
- {
|
|
|
- destringBuilder.Append(dechucklist[i] + "\t");
|
|
|
- }
|
|
|
+ //string[] dechucklist = new string[] { "" };
|
|
|
+ //ArrayList dearrayList = new ArrayList(dechucklist.ToList());
|
|
|
+ //IEnumerable<string> delist = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName)).ToList().Where(item => item.ToLower().Contains("dechuck"));
|
|
|
+ //foreach (var i in delist)
|
|
|
+ //{
|
|
|
+ // dearrayList.Add(i);
|
|
|
+ //}
|
|
|
+ //dechucklist = (string[])dearrayList.ToArray(typeof(string));
|
|
|
+ //StringBuilder destringBuilder = new StringBuilder();
|
|
|
+ //for (int i = 0; i < dechucklist.Length; i++)
|
|
|
+ //{
|
|
|
+ // destringBuilder.Append(dechucklist[i] + "\t");
|
|
|
+ //}
|
|
|
control = new ComboBox()
|
|
|
{
|
|
|
- ItemsSource= dechucklist
|
|
|
+ ItemsSource = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\DeChuck"))
|
|
|
};
|
|
|
control.Height = 23;
|
|
|
control.MinWidth = 100;
|
|
|
control.MaxWidth = 300;
|
|
|
control.SetBinding(ComboBox.SelectedItemProperty, binding);
|
|
|
+ control.PreviewMouseLeftButtonDown += DechuckControl_PreviewMouseLeftButtonDown;
|
|
|
|
|
|
break;
|
|
|
|
|
@@ -758,6 +766,16 @@ namespace Venus_MainPages.ViewModels
|
|
|
HeadWrapPanel.Children.Add(control);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private void ChuckControl_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
|
+ {
|
|
|
+ (sender as ComboBox).ItemsSource = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\Chuck"));
|
|
|
+ }
|
|
|
+ private void DechuckControl_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
|
|
+ {
|
|
|
+ (sender as ComboBox).ItemsSource = GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", $"{ModuleName}\\DeChuck"));
|
|
|
+ }
|
|
|
+
|
|
|
private void ChangeUI(object sender, SelectionChangedEventArgs e)
|
|
|
{
|
|
|
var t = sender as ComboBox;
|
|
@@ -1408,6 +1426,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
doc.LoadXml(GetXmlRecipeList());
|
|
|
treeViewRcpList.Items.Clear();
|
|
|
CreateTreeViewItems(doc.DocumentElement, this.treeViewRcpList);
|
|
|
+ ExpandAllItems(this.treeViewRcpList);
|
|
|
}
|
|
|
private void LoadRecipe(Recipe recipe)
|
|
|
{
|
|
@@ -1426,9 +1445,13 @@ namespace Venus_MainPages.ViewModels
|
|
|
Grid chuckGrid = new Grid();
|
|
|
chuckGrid.IsEnabled = false;
|
|
|
chuckGrid.Margin = new Thickness(15);
|
|
|
- string chuckRecipeData = m_uiRecipeManager.LoadRecipe(ModuleName, CurrentRecipe.Header.ChuckRecipe);
|
|
|
- //index = 0;
|
|
|
+ string chuckRecipeData = m_uiRecipeManager.LoadRecipe(ModuleName, $"Chuck\\{CurrentRecipe.Header.ChuckRecipe}");
|
|
|
+ if (chuckRecipeData == "")
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
var chuckRecipe = Recipe.Load(chuckRecipeData);
|
|
|
+
|
|
|
for (int i = 0; i < chuckRecipe.Steps.Count; i++)
|
|
|
{
|
|
|
RecipeStepToGridColumn(chuckRecipe.Steps[i], chuckGrid, i, false);
|
|
@@ -1453,7 +1476,7 @@ namespace Venus_MainPages.ViewModels
|
|
|
Grid deChuckGrid = new Grid();
|
|
|
deChuckGrid.IsEnabled = false;
|
|
|
deChuckGrid.Margin = new Thickness(15);
|
|
|
- string DechuckRecipeData = m_uiRecipeManager.LoadRecipe(ModuleName, CurrentRecipe.Header.DechuckRecipe);
|
|
|
+ string DechuckRecipeData = m_uiRecipeManager.LoadRecipe(ModuleName, $"DeChuck\\{CurrentRecipe.Header.DechuckRecipe}");
|
|
|
//index = 0;
|
|
|
var dechuckRecipe = Recipe.Load(DechuckRecipeData);
|
|
|
for (int i = 0; i < dechuckRecipe.Steps.Count; i++)
|
|
@@ -1546,6 +1569,27 @@ namespace Venus_MainPages.ViewModels
|
|
|
kepler2300Tolerances.Add(new Kepler2300Tolerance());
|
|
|
var str= SerializeHelper.Instance.ObjectToJsonString<List<Kepler2300Tolerance>>(kepler2300Tolerances);
|
|
|
}
|
|
|
+ private void ExpandAllItems(ItemsControl control)
|
|
|
+ {
|
|
|
+ if (control == null)
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ foreach (Object item in control.Items)
|
|
|
+ {
|
|
|
+ System.Windows.Controls.TreeViewItem treeItem = control.ItemContainerGenerator.ContainerFromItem(item) as TreeViewItem;
|
|
|
+
|
|
|
+
|
|
|
+ if (treeItem == null || !treeItem.HasItems)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
+ treeItem.IsExpanded = true;
|
|
|
+ ExpandAllItems(treeItem as ItemsControl);
|
|
|
+ }
|
|
|
+ }
|
|
|
#endregion
|
|
|
}
|
|
|
}
|