UiRecipeManager.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using Aitex.Triton160.Common;
  2. using Aitex.Triton160.UI;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using Triton160.UI.ViewModel;
  8. namespace Aitex.Triton160.UI.ViewModel
  9. {
  10. class UiRecipeManager : IUiRecipeManager
  11. {
  12. public string LoadRecipe(string chamId, string receipeName)
  13. {
  14. return Triton160UiSystem.Instance.WCF.Recipe.LoadRecipe(ModuleNameString.ToEnum(chamId), receipeName);
  15. }
  16. public Tuple<string, string> LoadRunTimeRecipeInfo(string chamId)
  17. {
  18. return Triton160UiSystem.Instance.WCF.Recipe.LoadRunTimeRecipeInfo(ModuleNameString.ToEnum(chamId));
  19. }
  20. public IEnumerable<string> GetRecipes(string chamId, bool includeUsedRecipe)
  21. {
  22. return Triton160UiSystem.Instance.WCF.Recipe.GetRecipes(ModuleNameString.ToEnum(chamId), includeUsedRecipe);
  23. }
  24. public bool DeleteRecipe(string chamId, string recipeName)
  25. {
  26. return Triton160UiSystem.Instance.WCF.Recipe.DeleteRecipe(ModuleNameString.ToEnum(chamId), recipeName);
  27. }
  28. public bool SaveAsRecipe(string chamId, string recipeName, string recipeContent)
  29. {
  30. return Triton160UiSystem.Instance.WCF.Recipe.SaveAsRecipe(ModuleNameString.ToEnum(chamId), recipeName, recipeContent);
  31. }
  32. public bool SaveRecipe(string chamId, string recipeName, string recipeContent)
  33. {
  34. return Triton160UiSystem.Instance.WCF.Recipe.SaveRecipe(ModuleNameString.ToEnum(chamId), recipeName, recipeContent);
  35. }
  36. public bool MoveRecipeFile(string chamId, string folderName, string tragetFolderName)
  37. {
  38. return Triton160UiSystem.Instance.WCF.Recipe.MoveRecipeFile(ModuleNameString.ToEnum(chamId), folderName, tragetFolderName);
  39. }
  40. public bool RenameRecipe(string chamId, string oldName, string newName)
  41. {
  42. return Triton160UiSystem.Instance.WCF.Recipe.RenameRecipe(ModuleNameString.ToEnum(chamId), oldName, newName);
  43. }
  44. public bool CreateFolder(string chamId, string folderName)
  45. {
  46. return Triton160UiSystem.Instance.WCF.Recipe.CreateFolder(ModuleNameString.ToEnum(chamId), folderName);
  47. }
  48. public bool DeleteFolder(string chamId, string foldName)
  49. {
  50. return Triton160UiSystem.Instance.WCF.Recipe.DeleteFolder(ModuleNameString.ToEnum(chamId), foldName);
  51. }
  52. public string GetXmlRecipeList(string chamId, bool includingUsedRecipe)
  53. {
  54. return Triton160UiSystem.Instance.WCF.Recipe.GetXmlRecipeList(ModuleNameString.ToEnum(chamId), includingUsedRecipe);
  55. }
  56. public bool RenameFolder(string chamId, string oldName, string newName)
  57. {
  58. return Triton160UiSystem.Instance.WCF.Recipe.RenameFolder(ModuleNameString.ToEnum(chamId), oldName, newName);
  59. }
  60. public string GetRecipeFormatXml(string chamId)
  61. {
  62. return Triton160UiSystem.Instance.WCF.Recipe.GetRecipeFormatXml(ModuleNameString.ToEnum(chamId));
  63. }
  64. public string GetRecipeTemplate(string chamId)
  65. {
  66. return Triton160UiSystem.Instance.WCF.Recipe.GetRecipeTemplate(ModuleNameString.ToEnum(chamId));
  67. }
  68. }
  69. }