ソースを参照

update Rename操作后 CurrentRecipe信息不正确导致 copy等操作有问题

jiangjy 2 日 前
コミット
10655488c9

+ 6 - 4
Furnace/FurnaceUI/Views/Recipes/RecipeJobViewModel.cs

@@ -1352,12 +1352,14 @@ namespace FurnaceUI.Views.Recipes
             {
                 UIGlobalVariable.Instance.ProcessModifiedRecipe[CurrentFileNode.FullPath] = $"Rename Recipe from [{CurrentFileNode.FullPath}] to [{recipeName}] {DateTime.Now}";
             }
-            CurrentRecipe.Name = dialog.FileName;
+            CurrentRecipe.Name = newName;
             CurrentRecipe.Description = dialog.Comment;
-            this.CurrentRecipe.LastReviseBy = BaseApp.Instance.UserContext.LoginName;
-            this.CurrentRecipe.PrefixPath = prefix;
+            this.CurrentRecipe.PrefixPath = CurrentChamberType + "\\" + CurrentProcessType; ;
             this.CurrentRecipe.LastRevisionTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
-            _recipeProvider.SaveRecipe(CurrentRecipe.PrefixPath, CurrentRecipe.Name, CurrentRecipe.GetXmlString());
+            this.CurrentRecipe.LastReviseBy = BaseApp.Instance.UserContext.LoginName;
+
+
+
             //ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, newName, false);
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;

+ 4 - 3
Furnace/FurnaceUI/Views/Recipes/RecipeLayoutViewModel.cs

@@ -1361,10 +1361,11 @@ namespace FurnaceUI.Views.Recipes
             {
                 UIGlobalVariable.Instance.ProcessModifiedRecipe[CurrentFileNode.FullPath] = $"Rename Recipe from [{CurrentFileNode.FullPath}] to [{recipeName}] {DateTime.Now}";
             }
-            CurrentRecipe.Name = dialog.FileName;
+            CurrentRecipe.Name = newName;
             CurrentRecipe.Description = dialog.Comment;
-            CurrentRecipe.PrefixPath = prefix;
-            this.Save(CurrentRecipe, false);
+            CurrentRecipe.ReviseTime = DateTime.Now;
+            CurrentRecipe.PrefixPath = CurrentChamberType + "\\" + CurrentProcessType;
+
             //ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, newName, false);
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;

+ 2 - 3
Furnace/FurnaceUI/Views/Recipes/RecipeViewModel.cs

@@ -1426,11 +1426,10 @@ namespace FurnaceUI.Views.Recipes
             {
                 UIGlobalVariable.Instance.ProcessModifiedRecipe[CurrentFileNode.FullPath] = $"Rename Recipe from [{CurrentFileNode.FullPath}] to [{recipeName}] {DateTime.Now}";
             }
-            CurrentRecipe.Name = dialog.FileName;
+            CurrentRecipe.Name = newName;
             CurrentRecipe.Description = dialog.Comment;
             CurrentRecipe.ReviseTime = DateTime.Now;
-            CurrentRecipe.PrefixPath = prefix;
-            this.Save(CurrentRecipe, false);
+            CurrentRecipe.PrefixPath = CurrentChamberType + "\\" + CurrentProcessType; 
             //ReloadRecipeFileList(CurrentChamberType, CurrentProcessType, newName, false);
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;