| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 | 
							- using System;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Xml;
 
- using Aitex.Common.Util;
 
- using Aitex.Core.RT.Event;
 
- using Aitex.Core.RT.Log;
 
- using Aitex.Core.RT.SCCore;
 
- using Aitex.Core.Util;
 
- using MECF.Framework.Common.Equipment;
 
- using MECF.Framework.Common.RecipeCenter;
 
- namespace Venus_RT.Modules.PMs
 
- {
 
-     public class VenusSequenceFileContext : ISequenceFileContext
 
-     {
 
-         public string GetConfigXml()
 
-         {
 
-             try
 
-             {
 
-                 string configContent = PathManager.GetCfgDir() + @"\SequenceFormat.xml";
 
-                 if (ModuleHelper.IsInstalled(ModuleName.SETM))
 
-                 {
 
-                     configContent = PathManager.GetCfgDir() + @"\SESequenceFormat.xml";
 
-                 }
 
-                 if (ModuleHelper.IsInstalled(ModuleName.DETM))
 
-                 {
 
-                     configContent = PathManager.GetCfgDir() + @"\DESequenceFormat.xml";
 
-                 }
 
-                 XmlDocument xmlDom = new XmlDocument();
 
-                 xmlDom.Load(configContent);
 
-                 CustomSequenceItem(xmlDom);
 
-                 return xmlDom.OuterXml;
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.WriteExeption(ex);
 
-                 return "";
 
-             }
 
-         }
 
-         public virtual bool Validation(string content)
 
-         {
 
-             try
 
-             {
 
-                 XmlDocument xmlDom = new XmlDocument();
 
-                 xmlDom.LoadXml(content);
 
-                 CustomValidation(xmlDom);
 
-                 return CustomValidation(xmlDom);
 
-             }
 
-             catch (Exception ex)
 
-             {
 
-                 LOG.WriteExeption(ex);
 
-                 EV.PostWarningLog("Recipe", "sequence file not valid, " + ex.Message);
 
-                 return false;
 
-             }
 
-         }
 
-         public bool EnableEdit(string sequencePathName)
 
-         {
 
-             //if (Singleton<RouteManager>.Instance.CheckSequenceUsedInJob(sequencePathName))
 
-             //{
 
-             //    EV.PostWarningLog("System", "Sequence is used in auto running jobs, can not be modified");
 
-             //    return false;
 
-             //}
 
-             return true;
 
-         }
 
-         public virtual void CustomSequenceItem(XmlDocument xmlContent)
 
-         {
 
-         }
 
-         public virtual bool CustomValidation(XmlDocument xmlContent)
 
-         {
 
-             return true;
 
-         }
 
-     }
 
- }
 
 
  |