From 9a91cdec0af9368ba4f570825411b183e9bc1d24 Mon Sep 17 00:00:00 2001 From: tfarcraw <123211521@163.com> Date: Tue, 21 Jul 2026 12:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=A4=8D=E5=88=B6=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PLCSharpWpf/Models/GlobalModel.Recipes.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/PLCSharpWpf/Models/GlobalModel.Recipes.cs b/PLCSharpWpf/Models/GlobalModel.Recipes.cs index 5a9d231..a84fa85 100644 --- a/PLCSharpWpf/Models/GlobalModel.Recipes.cs +++ b/PLCSharpWpf/Models/GlobalModel.Recipes.cs @@ -951,6 +951,16 @@ namespace PLCSharp.Models } } + _DatasContext.Recipes.Add(newRecipe); + try + { + _DatasContext.Save(); + SendInfoDialog($"配方 [{newRecipe.Name}] 复制成功"); + } + catch (Exception ex) + { + SendInfoDialog($"复制失败: {ex.Message}"); + } } #endregion }