UiRecipeManager.cs 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using System;
  2. using System.Collections.Generic;
  3. using MECF.Framework.Common.Equipment;
  4. using MECF.Framework.Common.RecipeCenter;
  5. namespace VirgoUI.Client.Models.PMs
  6. {
  7. class UiRecipeManager : IUiRecipeManager
  8. {
  9. public string LoadRecipe(string chamId, string receipeName)
  10. {
  11. return RecipeClient.Instance.Service.LoadRecipeByPath(chamId, receipeName);
  12. }
  13. public Tuple<string, string> LoadRunTimeRecipeInfo(string chamId)
  14. {
  15. return RecipeClient.Instance.Service.LoadRunTimeRecipeInfoByPath(chamId);
  16. }
  17. public IEnumerable<string> GetRecipes(string chamId, bool includeUsedRecipe)
  18. {
  19. return RecipeClient.Instance.Service.GetRecipesByPath(chamId, includeUsedRecipe);
  20. }
  21. public bool DeleteRecipe(string chamId, string recipeName)
  22. {
  23. return RecipeClient.Instance.Service.DeleteRecipeByPath(chamId, recipeName);
  24. }
  25. public bool SaveAsRecipe(string chamId, string recipeName, string recipeContent)
  26. {
  27. return RecipeClient.Instance.Service.SaveAsRecipeByPath(chamId, recipeName, recipeContent);
  28. }
  29. public bool SaveRecipe(string chamId, string recipeName, string recipeContent)
  30. {
  31. return RecipeClient.Instance.Service.SaveRecipeByPath(chamId, recipeName, recipeContent);
  32. }
  33. public bool RenameRecipe(string chamId, string oldName, string newName)
  34. {
  35. return RecipeClient.Instance.Service.RenameRecipeByPath(chamId, oldName, newName);
  36. }
  37. public bool CreateFolder(string chamId, string folderName)
  38. {
  39. return RecipeClient.Instance.Service.CreateFolderByPath(chamId, folderName);
  40. }
  41. public bool MoveRecipeFile(string chamId, string folderName, string tragetFolderName)
  42. {
  43. return RecipeClient.Instance.Service.MoveRecipeFile(ModuleNameString.ToEnum(chamId), folderName, tragetFolderName);
  44. }
  45. public bool DeleteFolder(string chamId, string foldName)
  46. {
  47. return RecipeClient.Instance.Service.DeleteFolderByPath(chamId, foldName);
  48. }
  49. public string GetXmlRecipeList(string chamId, bool includingUsedRecipe)
  50. {
  51. return RecipeClient.Instance.Service.GetXmlRecipeListByPath(chamId, includingUsedRecipe);
  52. }
  53. public bool RenameFolder(string chamId, string oldName, string newName)
  54. {
  55. return RecipeClient.Instance.Service.RenameFolderByPath(chamId, oldName, newName);
  56. }
  57. public string GetRecipeFormatXml(string chamId)
  58. {
  59. return RecipeClient.Instance.Service.GetRecipeFormatXmlByPath(chamId);
  60. }
  61. public string GetRecipeTemplate(string chamId)
  62. {
  63. return RecipeClient.Instance.Service.GetRecipeTemplateByPath(chamId);
  64. }
  65. }
  66. }