| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Collections.ObjectModel;
 
- using Aitex.Core.Util;
 
- using Aitex.Core.WCF;
 
- using MECF.Framework.Common.CommonData;
 
- using MECF.Framework.Common.Equipment;
 
- namespace MECF.Framework.Common.ParameterCenter
 
- {
 
-     public class ParameterClient : Singleton<ParameterClient>
 
-     {
 
-         public bool InProcess { get; set; }
 
-         private IParameterService _service;
 
-         public IParameterService Service
 
-         {
 
-             get
 
-             {
 
-                 if (_service == null)
 
-                 {
 
-                     if (InProcess)
 
-                         _service = new ParameterService();
 
-                     else
 
-                         _service = new ParameterServiceClient();
 
-                 }
 
-                 return _service;
 
-             }
 
-         }
 
-     }
 
-     public class ParameterServiceClient : ServiceClientWrapper<IParameterService>, IParameterService
 
-     {
 
-         public ParameterServiceClient()
 
-             : base("Client_IParameterService", "ParameterService")
 
-         {
 
-         }
 
-         public string LoadParameter(ModuleName chamId, string recipeName)
 
-         {
 
-             string result = null;
 
-             Invoke(svc => { result = svc.LoadParameter(chamId, recipeName); });
 
-             return result;   
 
-         }
 
-         public Tuple<string, string> LoadRunTimeParameterInfo(ModuleName chamId)
 
-         {
 
-             Tuple<string, string> result = null;
 
-             Invoke(svc => { result = svc.LoadRunTimeParameterInfo(chamId); });
 
-             return result;   
 
-         }
 
-         public IEnumerable<string> GetParameters(ModuleName chamId, bool includeUsedRecipe)
 
-         {
 
-             IEnumerable<string> result = null;
 
-             Invoke(svc => { result = svc.GetParameters(chamId, includeUsedRecipe); });
 
-             return result;   
 
-         }
 
-         public string GetXmlParameterList(ModuleName chamId, bool includeUsedParameter)
 
-         {
 
-             string result = null;
 
-             Invoke(svc => { result = svc.GetXmlParameterList(chamId, includeUsedParameter); });
 
-             return result;   
 
-         }
 
-         public bool DeleteParameter(ModuleName chamId, string recipeName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.DeleteParameter(chamId, recipeName); });
 
-             return result;   
 
-         }
 
-         public bool DeleteFolder(ModuleName chamId, string folderName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.DeleteFolder(chamId, folderName); });
 
-             return result;   
 
-         }
 
-         public bool SaveAsParameter(ModuleName chamId, string recipeName, string recipeContent)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.SaveAsParameter(chamId, recipeName, recipeContent); });
 
-             return result;   
 
-         }
 
-         public bool SaveParameter(ModuleName chamId, string recipeName, string recipeContent)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.SaveParameter(chamId, recipeName, recipeContent); });
 
-             return result;   
 
-         }
 
-         public bool CreateFolder(ModuleName chamId, string folderName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.CreateFolder(chamId, folderName); });
 
-             return result;   
 
-         }
 
-         public bool RenameParameter(ModuleName chamId, string oldName, string newName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.RenameParameter(chamId, oldName, newName); });
 
-             return result;   
 
-         }
 
-         public bool BackupParameter(string fileOriginalPath, string fileDestinationPath, bool isSaveLinkRecipe, List<string> recipeNames)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.BackupParameter(fileOriginalPath, fileDestinationPath, isSaveLinkRecipe,recipeNames); });
 
-             return result;
 
-         }
 
-         public bool CheckBackParameterIsLinkParameter(string fileOriginalPath, List<string> recipeNames)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.CheckBackParameterIsLinkParameter(fileOriginalPath, recipeNames); });
 
-             return result;
 
-         }
 
-      
 
-         public List<string> RestoreParameterFolderList()
 
-         {
 
-             List<string> result = new List<string>();
 
-             Invoke(svc => { result = svc.RestoreParameterFolderList(); });
 
-             return result;
 
-         }
 
-         public string GetXmlRestoreParameterList(string fileType, bool includeUsedRecipe)
 
-         {
 
-             string result = null;
 
-             Invoke(svc => { result = svc.GetXmlRestoreParameterList(fileType, includeUsedRecipe); });
 
-             return result;
 
-         }
 
-         public string LoadRestoreParameter(string pathName, string recipeName)
 
-         {
 
-             string result = null;
 
-             Invoke(svc => { result = svc.LoadRestoreParameter(pathName, recipeName); });
 
-             return result;
 
-         }
 
-         public bool RestoreParameter(string chamId,bool isSaveLink, List<string> recipeNames)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.RestoreParameter(chamId, isSaveLink,recipeNames); });
 
-             return result;
 
-         }
 
-         public bool SigRestoreParameter(string chamId, List<string> recipeNames)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.SigRestoreParameter(chamId, recipeNames); });
 
-             return result;
 
-         }
 
-         public bool RenameFolder(ModuleName chamId, string oldName, string newName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.RenameFolder(chamId, oldName, newName); });
 
-             return result;   
 
-         }
 
-         public string GetParameterFormatXml(string chamId)
 
-         {
 
-             string result = null;
 
-             Invoke(svc => { result = svc.GetParameterFormatXml(chamId); });
 
-             return result;   
 
-         }
 
-         public Dictionary<string, ObservableCollection<ParameterTemplateColumnBase>> GetGroupParameterTemplate()
 
-         {
 
-             Dictionary<string, ObservableCollection<ParameterTemplateColumnBase>> result = null;
 
-             Invoke(svc => { result = svc.GetGroupParameterTemplate(); });
 
-             return result;
 
-         }
 
-         public string GetParameterTemplate(ModuleName chamId)
 
-         {
 
-             string result = string.Empty;
 
-             Invoke(svc => { result = svc.GetParameterTemplate(chamId); });
 
-             return result;   
 
-         }
 
-         public string GetParameterByBarcode(ModuleName chamId, string barcode)
 
-         {
 
-             string result = string.Empty;
 
-             Invoke(svc => { result = svc.GetParameterByBarcode(chamId, barcode); });
 
-             return result;   
 
-         }
 
-         #region extended recipe interface
 
-         public string LoadParameterByPath(string pathName, string recipeName)
 
-         {
 
-             string result = null;
 
-             Invoke(svc => { result = svc.LoadParameterByPath(pathName, recipeName); });
 
-             return result;
 
-         }
 
-         public Tuple<string, string> LoadRunTimeParameterInfoByPath(string pathName)
 
-         {
 
-             Tuple<string, string> result = null;
 
-             Invoke(svc => { result = svc.LoadRunTimeParameterInfoByPath(pathName); });
 
-             return result;
 
-         }
 
-         public IEnumerable<string> GetParametersByPath(string pathName, bool includeUsedRecipe)
 
-         {
 
-             IEnumerable<string> result = null;
 
-             Invoke(svc => { result = svc.GetParametersByPath(pathName, includeUsedRecipe); });
 
-             return result;
 
-         }
 
-         public string GetXmlParameterListByPath(string pathName, bool includeUsedRecipe)
 
-         {
 
-             string result = null;
 
-             Invoke(svc => { result = svc.GetXmlParameterListByPath(pathName, includeUsedRecipe); });
 
-             return result;
 
-         }
 
-         public List<FileNodeItem> GetFileNodeParameterListByPath(string pathName)
 
-         {
 
-             List<FileNodeItem> result = null;
 
-             Invoke(svc => { result = svc.GetFileNodeParameterListByPath(pathName); });
 
-             return result;
 
-         }
 
-         
 
-         public bool DeleteParameterByPath(string pathName, string recipeName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.DeleteParameterByPath(pathName, recipeName); });
 
-             return result;
 
-         }
 
-         public bool DeleteFolderByPath(string pathName, string folderName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.DeleteFolderByPath(pathName, folderName); });
 
-             return result;
 
-         }
 
-         public bool SaveAsParameterByPath(string pathName, string recipeName, string recipeContent)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.SaveAsParameterByPath(pathName, recipeName, recipeContent); });
 
-             return result;
 
-         }
 
-         public bool SaveParameterByPath(string pathName, string recipeName, string recipeContent)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.SaveParameterByPath(pathName, recipeName, recipeContent); });
 
-             return result;
 
-         }
 
-         public bool CreateFolderByPath(string pathName, string folderName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.CreateFolderByPath(pathName, folderName); });
 
-             return result;
 
-         }
 
-         public bool RenameParameterByPath(string pathName, string oldName, string newName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.RenameParameterByPath(pathName, oldName, newName); });
 
-             return result;
 
-         }
 
-         public bool RenameFolderByPath(string pathName, string oldName, string newName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.RenameFolderByPath(pathName, oldName, newName); });
 
-             return result;
 
-         }
 
-         public string GetParameterFormatXmlByPath(string pathName)
 
-         {
 
-             string result = null;
 
-             Invoke(svc => { result = svc.GetParameterFormatXmlByPath(pathName); });
 
-             return result;
 
-         }
 
-         public string GetParameterTemplateByPath(string pathName)
 
-         {
 
-             string result = string.Empty;
 
-             Invoke(svc => { result = svc.GetParameterTemplateByPath(pathName); });
 
-             return result;
 
-         }
 
-         public string GetParameterByBarcodeByPath(string pathName, string barcode)
 
-         {
 
-             string result = string.Empty;
 
-             Invoke(svc => { result = svc.GetParameterByBarcodeByPath(pathName, barcode); });
 
-             return result;
 
-         }
 
-         public List<string> CheckParameter(string prefix, string recipeName)
 
-         {
 
-             List<string> result = null;
 
-             Invoke(svc => { result = svc.CheckParameter(prefix, recipeName); });
 
-             return result;
 
-         }
 
-         public bool GetParameterChecked(string prefix, string recipeName)
 
-         {
 
-             bool result = false;
 
-             Invoke(svc => { result = svc.GetParameterChecked(prefix, recipeName); });
 
-             return result;
 
-         }
 
-         #endregion
 
-     }
 
- }
 
 
  |