Browse Source

1.钟摆阀关闭,加入压力和位置自动设0功能
2.overview界面优化

# Conflicts:
# Venus/Venus_MainPages/ViewModels/OverKepler2300ViewModel.cs

lixiang 1 year ago
parent
commit
41d50f69e3

+ 8 - 1
Venus/Framework/Common/IOCore/IOManager.cs

@@ -600,8 +600,15 @@ namespace MECF.Framework.Common.IOCore
                     BlockIndex = accessor.BlockOffset,
                 });
 
-                if (!isIgnoreSaveDB)
+                if (isIgnoreSaveDB)
+                {
+                    DATA.Subscribe($"IO.{accessor.Name}", () => accessor.Value, SubscriptionAttribute.FLAG.IgnoreSaveDB);
+                }
+                else
+                { 
                     DATA.Subscribe($"IO.{accessor.Name}", () => accessor.Value);
+
+                }
             }
         }
 

+ 2 - 0
Venus/Venus_Core/VenusDevice.cs

@@ -331,6 +331,8 @@
         Goto,
 
         RunRecipe,
+        RunCleanRecipe,
+
 
         SkipCurrentStep,
 

+ 8 - 0
Venus/Venus_MainPages/ViewModels/CleanRecipeViewModel.cs

@@ -140,6 +140,10 @@ namespace Venus_MainPages.ViewModels
         private DelegateCommand<object> _SetCommand;
         public DelegateCommand<object> SetCommand =>
             _SetCommand ?? (_SetCommand = new DelegateCommand<object>(OnSet));
+
+        private DelegateCommand _RunRecipeCommand;
+        public DelegateCommand RunRecipeCommand =>
+            _RunRecipeCommand ?? (_RunRecipeCommand = new DelegateCommand(OnRunRecipe));
         #endregion
 
         #region 构造函数
@@ -197,6 +201,10 @@ namespace Venus_MainPages.ViewModels
         {
             CurrentModuleRecipes = CommonFunction.GetFilesNames(Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, "Clean")).ToList<string>();
         }
+        private void OnRunRecipe()
+        {              
+            InvokeClient.Instance.Service.DoOperation($"{ModuleName}.{RtOperation.RunCleanRecipe}", SelectedCleanRecipe, "", "Clean");
+        }
         public void addConfigKeys()
         {
             m_RtConfigKeys.Add($"{ModuleName}.IdleClean.IdleCleanRecipe");

+ 1 - 1
Venus/Venus_MainPages/ViewModels/OverKepler2300ViewModel.cs

@@ -1640,7 +1640,7 @@ namespace Venus_MainPages.ViewModels
                 CurrentRecipeResult = CommonFunction.GetValue<RecipeResult>(RtDataValues, $"{ModuleName}.CurrentRecipeResult");
                 if (CurrentRecipeResult.RecipeStepNumber != null && CurrentRecipeResult.RecipeStepNumber != currentRecipeNumber)
                 {
-                    var recipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName, CurrentRecipeResult.RecipeType.ToString(), CurrentRecipeResult.RecipeName + ".rcp");
+                    var recipePath = Path.Combine(QueryDataClient.Instance.Service.GetData("GetRTPath").ToString(), "Recipes", ModuleName,CurrentRecipeResult.RecipeType, CurrentRecipeResult.RecipeName + ".rcp");
                     CurrentRecipe = Recipe.Load(File.ReadAllText(recipePath));
                     CurrentRecipeStep = CurrentRecipe.Steps[Convert.ToInt32(CurrentRecipeResult.RecipeStepNumber) - 1];
                 }

+ 78 - 247
Venus/Venus_MainPages/ViewModels/RecipeViewModel.cs

@@ -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)
             {

+ 1 - 1
Venus/Venus_MainPages/Views/CleanRecipeView.xaml

@@ -17,7 +17,7 @@
 
         <TextBox  Width="140" Height="30" Text="Clean Recipe:"  Canvas.Left="500" Canvas.Top="260" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontSize="15" IsReadOnly="True" Background="Transparent"/>
         <Border Width="210" Height="28"  Canvas.Left="640" Canvas.Top="261" BorderBrush="Black" BorderThickness=".7">
-            <ComboBox  ItemsSource="{Binding CurrentModuleRecipes}" SelectedItem="{Binding SelectedRecipe}" IsEnabled="{Binding IsAutoMode}" Style="{StaticResource customeComboBoxStyle}" BorderBrush="White" FontSize="15">
+            <ComboBox  ItemsSource="{Binding CurrentModuleRecipes}" SelectedItem="{Binding SelectedCleanRecipe}" IsEnabled="{Binding IsAutoMode}" Style="{StaticResource customeComboBoxStyle}" BorderBrush="White" FontSize="15">
                 <i:Interaction.Triggers>
                     <i:EventTrigger EventName="DropDownOpened">
                         <i:InvokeCommandAction Command="{Binding LoadRecipeCommand}"/>

+ 7 - 6
Venus/Venus_MainPages/Views/OperationOverView.xaml

@@ -27,6 +27,7 @@
     <UserControl.Resources>
         <converters:BoolToVisibility x:Key="boolToVisibility"/>
         <converters:BoolToVisibility2 x:Key="boolToVisibility2"/>
+        <converters:BoolToVisibility3 x:Key="boolToVisibility3"/>
         <converters:BoolToBool x:Key="BoolToBool"/>
         <converters2:IsOnlineToOpacityConverter x:Key="IsOnlineToOpacityConverter"/>
         <converters:BoolToColor  x:Key="boolToColor"/>
@@ -300,8 +301,8 @@
                         </TextBlock>
 
                         <StackPanel Orientation="Horizontal">
-                            <customControls:PathButton Content="Load"   HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding LoadWaferCommand}"   CommandParameter="LP1"/>
-                            <customControls:PathButton Content="UnLoad" HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP1"/>
+                            <customControls:PathButton Content="Load"   HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding LoadWaferCommand}"   CommandParameter="LP1"  Visibility="{Binding RtDataValues[LP1.CassettePlaced],Converter={StaticResource boolToVisibility3}}" IsEnabled="{Binding RtDataValues[LP1.IsLoaded],Converter={StaticResource BoolToBool}}"/>
+                            <customControls:PathButton Content="UnLoad" HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP1"  Visibility="{Binding RtDataValues[LP1.CassettePlaced],Converter={StaticResource boolToVisibility3}}" IsEnabled="{Binding RtDataValues[LP1.IsLoaded]}"/>
                         </StackPanel>
                         
 
@@ -317,8 +318,8 @@
                             </TextBlock.Text>
                         </TextBlock>
                         <StackPanel Orientation="Horizontal">
-                            <customControls:PathButton Content="Load"   HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding LoadWaferCommand}" CommandParameter="LP2"/>
-                            <customControls:PathButton Content="UnLoad" HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP2"/>
+                            <customControls:PathButton Content="Load"   HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding LoadWaferCommand}" CommandParameter="LP2"   Visibility="{Binding RtDataValues[LP2.CassettePlaced],Converter={StaticResource boolToVisibility3}}" IsEnabled="{Binding RtDataValues[LP2.IsLoaded],Converter={StaticResource BoolToBool}}"/>
+                            <customControls:PathButton Content="UnLoad" HorizontalAlignment="Center" Margin="5,5,0,0" Width="80" Height="30" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP2" Visibility="{Binding RtDataValues[LP2.CassettePlaced],Converter={StaticResource boolToVisibility3}}" IsEnabled="{Binding RtDataValues[LP2.IsLoaded]}"/>
                         </StackPanel>
                            
 
@@ -334,8 +335,8 @@
                                 </TextBlock.Text>
                         </TextBlock>
                         <StackPanel Orientation="Horizontal">
-                            <customControls:PathButton Content="Load"   HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding LoadWaferCommand}" CommandParameter="LP3"/>
-                            <customControls:PathButton Content="UnLoad" HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP3"/>
+                            <customControls:PathButton Content="Load"   HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding LoadWaferCommand}" CommandParameter="LP3"   Visibility="{Binding RtDataValues[LP3.CassettePlaced],Converter={StaticResource boolToVisibility3}}"  IsEnabled="{Binding RtDataValues[LP3.IsLoaded],Converter={StaticResource BoolToBool}}"/>
+                            <customControls:PathButton Content="UnLoad" HorizontalAlignment="Center" Margin="0,5,0,0" Width="80" Height="30" Command="{Binding UnLoadWaferCommand}" CommandParameter="LP3" Visibility="{Binding RtDataValues[LP3.CassettePlaced],Converter={StaticResource boolToVisibility3}}"  IsEnabled="{Binding RtDataValues[LP3.IsLoaded]}"/>
                         </StackPanel>
 
                            

+ 1 - 1
Venus/Venus_MainPages/Views/RecipeView.xaml

@@ -58,7 +58,7 @@
     </i:Interaction.Triggers>
     <Grid>
         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="200" />
+            <ColumnDefinition Width="Auto" />
             <ColumnDefinition Width="6" />
             <ColumnDefinition Width="800*" />
         </Grid.ColumnDefinitions>

+ 6 - 0
Venus/Venus_RT/Devices/PendulumValve.cs

@@ -14,6 +14,7 @@ using System.Collections.Concurrent;
 using Aitex.Core.Common.DeviceData;
 using MECF.Framework.Common.CommonData.DeviceData;
 using Aitex.Core.RT.DataCenter;
+using Venus_RT.Modules.PMs;
 
 namespace Venus_RT.Devices
 {
@@ -430,6 +431,11 @@ namespace Venus_RT.Devices
             if(_CheckStatus(on))
             {
                 IsOpen = on;
+                if (IsOpen == false)
+                {
+                    SetPosition(0);
+                    SetPressure(0);
+                }
                 return SendCommand(on ? Operation.OpenValve : Operation.CloseValve);
             }
 

+ 3 - 0
Venus/Venus_RT/Modules/PMs/PMEntity.cs

@@ -611,6 +611,9 @@ namespace Venus_RT.Modules.PMs
 
             OP.Subscribe($"{Module}.{RtOperation.RunRecipe}", (cmd, args) => CheckToPostMessage((int)MSG.RunRecipe, args));
 
+            OP.Subscribe($"{Module}.{RtOperation.RunCleanRecipe}", (cmd, args) => CheckToPostMessage((int)MSG.Clean, args));
+
+
             OP.Subscribe($"{Module}.PartialPressureTest", (cmd, args) => CheckToPostMessage((int)MSG.PartialPressure, args[0], args[1]));
             OP.Subscribe($"{Module}.VATPerformanceTest", (cmd, args) => CheckToPostMessage((int)MSG.VATPerformance, args[0], args[1], args[2]));
 

+ 14 - 0
Venus/Venus_Themes/Converters/boolToVisibility2.cs

@@ -22,4 +22,18 @@ namespace Venus_Themes.Converters
 
         }
     }
+    public class BoolToVisibility3 : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+
+            return (bool)value ? Visibility.Visible : Visibility.Hidden;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+        {
+            return null;
+
+        }
+    }
 }

+ 4 - 4
Venus/Venus_UI/Config/UIMenu.json

@@ -92,7 +92,7 @@
       },
       {
         "Id": "CleanRecipe",
-        "Name": "Clean",
+        "Name": "Idle Clean",
         "View": "CleanRecipeView",
         "IsShow": "true"
       }
@@ -160,7 +160,7 @@
       },
       {
         "Id": "CleanRecipe",
-        "Name": "Clean",
+        "Name": "Idle Clean",
         "View": "CleanRecipeView",
         "IsShow": "true"
       }
@@ -222,7 +222,7 @@
       },
       {
         "Id": "CleanRecipe",
-        "Name": "Clean",
+        "Name": "Idle Clean",
         "View": "CleanRecipeView",
         "IsShow": "true"
       }
@@ -286,7 +286,7 @@
       },
       {
         "Id": "CleanRecipe",
-        "Name": "Clean",
+        "Name": "Idle Clean",
         "View": "CleanRecipeView",
         "IsShow": "true"
       }