| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 | 
							- using Aitex.Common.Util;
 
- using Aitex.Core.RT.Event;
 
- using Aitex.Core.RT.Log;
 
- using Aitex.Core.RT.ParameterCenter;
 
- using Aitex.Core.RT.SCCore;
 
- using MECF.Framework.Common.ParameterCenter;
 
- using MECF.Framework.Common.RecipeCenter;
 
- using System;
 
- using System.Collections.Generic;
 
- using System.Collections.ObjectModel;
 
- using System.IO;
 
- using System.Xml;
 
- namespace FurnaceRT.Parameter
 
- {
 
-     public class ParameterFileContext : IParameterFileContext
 
-     {
 
-         public string GetParameterDefiniton(string chamberType)
 
-         {
 
-             try
 
-             {
 
-                 string type = "";
 
-                 if (string.IsNullOrEmpty(chamberType))
 
-                 { type = "Parameter\\TempPID"; }
 
-                 else
 
-                 {
 
-                     type = chamberType;
 
-                 }
 
-                 string recipeSchema = PathManager.GetCfgDir() + $"{type}\\ParameterFormat.xml";
 
-                 XmlDocument xmlDom = new XmlDocument();
 
-                 xmlDom.Load(recipeSchema);
 
-                 return xmlDom.OuterXml;
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.Write(ex);
 
-                 return "";
 
-             }
 
-         }
 
-         public string GetSingleNodePath(int sourceIndex, int gasIndex)
 
-         {
 
-             return $"/Aitex/TableParameterFormat/Catalog[@DisplayName=\"Source{sourceIndex}\"]/Group/Step/Item[@ControlName=\"Gas{gasIndex}\"]";
 
-         }
 
-         public IEnumerable<string> GetParameters(string path, bool includingUsedRecipe)
 
-         {
 
-             try
 
-             {
 
-                 var recipes = new List<string>();
 
-                 string recipePath = PathManager.GetRecipeDir() + path + "\\";
 
-                 if (!Directory.Exists(recipePath))
 
-                     return recipes;
 
-                 var di = new DirectoryInfo(recipePath);
 
-                 var fis = di.GetFiles("*.rcp", SearchOption.AllDirectories);
 
-                 foreach (var fi in fis)
 
-                 {
 
-                     string str = fi.FullName.Substring(di.FullName.Length);
 
-                     str = str.Substring(0, str.LastIndexOf('.'));
 
-                     if (includingUsedRecipe || (!includingUsedRecipe && !str.Contains("HistoryParameter\\")))
 
-                     {
 
-                         recipes.Add(str);
 
-                     }
 
-                 }
 
-                 return recipes;
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.Write(ex);
 
-                 return new List<string>();
 
-             }
 
-         }
 
-         public void PostInfoEvent(string message)
 
-         {
 
-             EV.PostMessage("System", EventEnum.GeneralInfo, message);
 
-         }
 
-         public void PostWarningEvent(string message)
 
-         {
 
-             EV.PostMessage("System", EventEnum.DefaultWarning, message);
 
-         }
 
-         public void PostAlarmEvent(string message)
 
-         {
 
-             EV.PostMessage("System", EventEnum.DefaultAlarm, message);
 
-         }
 
-         public void PostDialogEvent(string message)
 
-         {
 
-             EV.PostNotificationMessage(message);
 
-         }
 
-         public void PostInfoDialogMessage(string message)
 
-         {
 
-             EV.PostMessage("System", EventEnum.GeneralInfo, message);
 
-             EV.PostPopDialogMessage(EventLevel.Information, "System Information", message);
 
-         }
 
-         public void PostWarningDialogMessage(string message)
 
-         {
 
-             EV.PostMessage("System", EventEnum.GeneralInfo, message);
 
-             EV.PostPopDialogMessage(EventLevel.Warning, "System Warning", message);
 
-         }
 
-         public void PostAlarmDialogMessage(string message)
 
-         {
 
-             EV.PostMessage("System", EventEnum.GeneralInfo, message);
 
-             EV.PostPopDialogMessage(EventLevel.Alarm, "System Alarm", message);
 
-         }
 
-         public string GetParameterTemplate(string chamberId)
 
-         {
 
-             string schema = GetParameterDefiniton(chamberId);
 
-             XmlDocument dom = new XmlDocument();
 
-             dom.LoadXml(schema);
 
-             XmlNode nodeTemplate = dom.SelectSingleNode("/Aitex/TableRecipeData");
 
-             return nodeTemplate.OuterXml;
 
-         }
 
-         public Dictionary<string, ObservableCollection<ParameterTemplateColumnBase>> GetGroupParameterTemplate()
 
-         {
 
-             throw new NotImplementedException();
 
-         }
 
-     }
 
- }
 
 
  |