Browse Source

elk bug 453 fix

jiangjy 1 month ago
parent
commit
b489d2e2e0

+ 13 - 0
Furnace/FurnaceGasPanelUI/Views/Maintenances/ELK/GasPanelViewModel.cs

@@ -12,6 +12,7 @@ using OpenSEMI.ClientBase;
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Reflection;
 using System.Windows;
 using System.Windows.Input;
 namespace FurnaceGasPanelUI.Views.Maintenances.ELK
@@ -1497,6 +1498,18 @@ namespace FurnaceGasPanelUI.Views.Maintenances.ELK
                     }
                 }
             }
+            if (SelectedGasStateType == GasPanelStateType.Monitor)
+            {
+                PropertyInfo[] tempProperties = GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance);
+                foreach (PropertyInfo property in tempProperties)
+                {
+                    if (property.Name.Contains("MFC"))
+                    {
+                        // 触发属性更改通知
+                        NotifyOfPropertyChange(property.Name);
+                    }
+                }
+            }
         }
 
         public void SwichValue(string name)

+ 1 - 1
Furnace/FurnaceUI/Views/Operations/Maintenances/ManualSetViewModel.cs

@@ -899,7 +899,7 @@ namespace FurnaceUI.Views.Recipes
             {
                 FurnaceUI.Views.Maintenances.Maintenances.ELK.GasPanelViewModel gasPanelTwoView = new Maintenances.Maintenances.ELK.GasPanelViewModel();
                 gasPanelTwoView.MFCDataList = MFCDataList;
-                var rtn = (wm as WindowManager)?.ShowDialogWithTitle(gasPanelTwoView, null, " Gas Panel");
+                var rtn = (wm as WindowManager)?.ShowDialogWithTitle(gasPanelTwoView, null, "Manual Gas View");
                 if ((bool)rtn)
                 {
                     DictValve = gasPanelTwoView.DictChangedValve;

+ 9 - 5
Furnace/FurnaceUI/Views/Recipes/RecipeProcessEditViewModel.cs

@@ -1440,7 +1440,7 @@ namespace FurnaceUI.Views.Recipes
                     AppendStep2();
                     break;
                 case "InsertCopy":
-                 
+
                     InsertCopyStep();
                     break;
                 case "OverWrite"://任何步骤的内容都可以覆盖到选定的步骤中
@@ -2229,7 +2229,7 @@ namespace FurnaceUI.Views.Recipes
                                 recipeGasPanelSettingViewModel.SelectedStepName = $"{SelectedRecipeStep.StepNo}:{SelectedRecipeStep.Name}";
                                 recipeGasPanelSettingViewModel.ChangedStepEvent += RecipeGasPanelSettingViewModel_ChangedStepEvent;
                                 recipeGasPanelSettingViewModel.SelectedStep = CurrentRecipe.Steps.Where(x => x.StepNo == SelectedRecipeStep.StepNo).FirstOrDefault();
-                                bool rtn = (bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeGasPanelSettingViewModel, null, "Valve");
+                                bool rtn = (bool)(windowManager as WindowManager)?.ShowDialogWithTitle(recipeGasPanelSettingViewModel, null, "Recipe Gas View");
                                 if (rtn)
                                 {
                                     isEditMFC = false;
@@ -2683,10 +2683,10 @@ namespace FurnaceUI.Views.Recipes
             }
             if (CurrentRecipe.Steps != null && CurrentRecipe.Steps.Count > 0 && CheckValueChange(data))
             {
-              //  UpdateRecipeGASSetting(data);
+                //  UpdateRecipeGASSetting(data);
                 //SelectStep(CurrentRecipe.Steps[EditRecipeStepNo]);
             }
-          //  UpdateGASSetting();
+            //  UpdateGASSetting();
             oldresult = data;
             SetCmdIsEnabled();
 
@@ -2763,7 +2763,7 @@ namespace FurnaceUI.Views.Recipes
 
             if (!string.IsNullOrEmpty(type) && item != null && sender != null)
             {
-                if (isEditMFC) return;
+                //if (isEditMFC) return;
                 MFCData mFCData = (MFCData)item;
                 string value = ((TextBox)sender).Text;
                 switch (type)
@@ -2779,6 +2779,10 @@ namespace FurnaceUI.Views.Recipes
                             SetSetPointValue(mFCData.ControlName, $"0");
                             return;
                         }
+                        else
+                        {
+                            InvokeClient.Instance.Service.DoOperation($"PM1.{mFCData.ControlName}.SetMfcVirtualValue", $"{value};{mFCData.Rampng.Value};{mFCData.AlarmValue}");
+                        }
                         break;
                     case "Rampng":
                         InvokeClient.Instance.Service.DoOperation($"PM1.{mFCData.ControlName}.SetMfcVirtualValue", $"{mFCData.SetValue.Value};{value};{mFCData.AlarmValue}");