diff --git a/FrameworkLocal/MECF.Framework.Common.dll b/FrameworkLocal/MECF.Framework.Common.dll index 6eb6bec..d166e07 100644 Binary files a/FrameworkLocal/MECF.Framework.Common.dll and b/FrameworkLocal/MECF.Framework.Common.dll differ diff --git a/Modules/SicPM/PMModule.cs b/Modules/SicPM/PMModule.cs index fcfca23..50c657c 100644 --- a/Modules/SicPM/PMModule.cs +++ b/Modules/SicPM/PMModule.cs @@ -533,11 +533,18 @@ namespace SicPM OP.Subscribe($"{Module}.RunPMMacro", (string cmd, object[] args) => CheckToPostMessage((int)MSG.RunPMMacro, (string)args[0])); OP.Subscribe($"{Module}.CleanRecipe", (string cmd, object[] args) => CheckToPostMessage((int)MSG.CleanProcess, (string)args[0])); - + OP.Subscribe($"{Module}.RealoadRecipe", (string cmd, object[] args) => RealoadRecipe()); OP.Subscribe($"{Module}.Recipe.EditorChangePassword", (string cmd, object[] args) => WriteEPassword((string)args[0])); OP.Subscribe($"{Module}.SignalTower.SwitchOffBuzzerEx", (string cmd, object[] args) => SwitchOffBuzzerEx(args)); } + private bool RealoadRecipe() + { + _recipeRunningInfo.NeedReloadRecipe = true; + return true; + } + + private bool PutOnline() { IsOnline = true; diff --git a/Modules/SicPM/RecipeExecutions/Process.cs b/Modules/SicPM/RecipeExecutions/Process.cs index 47984fa..824d945 100644 --- a/Modules/SicPM/RecipeExecutions/Process.cs +++ b/Modules/SicPM/RecipeExecutions/Process.cs @@ -439,6 +439,16 @@ namespace SicPM.RecipeExecutions _state = RecipeRunningState.StepCompleted; } + if (PMDevice.RecipeRunningInfo.NeedReloadRecipe) + { + //重新加载后面的Recipe内容 + if (RecipeParser.Parse(PMDevice.RecipeRunningInfo.RecipeName, Module, out var recipeHead, out var recipeSteps, out string reason1)) + { + PMDevice.RecipeRunningInfo.RecipeStepList = recipeSteps; + PMDevice.RecipeRunningInfo.NeedReloadRecipe = false; + } + } + //ToleranceChecker(); SkipStepForHeat(); diff --git a/Modules/SicPM/RecipeExecutions/RecipeRunningInfo.cs b/Modules/SicPM/RecipeExecutions/RecipeRunningInfo.cs index 913b205..aad3be9 100644 --- a/Modules/SicPM/RecipeExecutions/RecipeRunningInfo.cs +++ b/Modules/SicPM/RecipeExecutions/RecipeRunningInfo.cs @@ -41,5 +41,7 @@ namespace SicPM.RecipeExecutions public string N2FlowMode { get; set; } public bool IsRoutineAbort { get; set; } + public bool NeedReloadRecipe { get; set; } + } } diff --git a/SicRT/Config/System.sccfg b/SicRT/Config/System.sccfg index fe43817..0683aec 100644 --- a/SicRT/Config/System.sccfg +++ b/SicRT/Config/System.sccfg @@ -23,6 +23,8 @@ + + diff --git a/SicRT/Instances/ToolLoader.cs b/SicRT/Instances/ToolLoader.cs index 1f4f578..ecc1650 100644 --- a/SicRT/Instances/ToolLoader.cs +++ b/SicRT/Instances/ToolLoader.cs @@ -64,7 +64,7 @@ namespace SicRT.Instances Singleton.Instance.Initialize(); - RecipeFileManager.Instance.Initialize(new SicRecipeFileContext()); + AccountExManager.Instance.Initialize(true); @@ -98,6 +98,8 @@ namespace SicRT.Instances RtSystemManager.Instance.AddCustomBackend("SC", new BackendSCConfigView()); + RecipeFileManager.Instance.Initialize(new SicRecipeFileContext(),true,SC.GetValue("System.RecipeSaveToDB")); + Singleton.Instance.Initialize(); // Singleton.Instance.Initialize(); diff --git a/SicUI/Models/RecipeEditors/RecipeEditorView.xaml b/SicUI/Models/RecipeEditors/RecipeEditorView.xaml index 47473a0..f1b72b4 100644 --- a/SicUI/Models/RecipeEditors/RecipeEditorView.xaml +++ b/SicUI/Models/RecipeEditors/RecipeEditorView.xaml @@ -1400,6 +1400,14 @@ IsEnabled="{Binding EnableStep}" micro:Message.Attach="DeleteStep()"/> +