| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 | 
							- using Aitex.Core.RT.DataCenter;
 
- using Aitex.Core.Util;
 
- using MECF.Framework.Common.Device.LinMot;
 
- using MECF.Framework.Common.Device.PowerSupplier;
 
- using MECF.Framework.Common.Equipment;
 
- using System;
 
- using System.Collections.Generic;
 
- using System.Linq;
 
- using System.Text;
 
- using System.Threading.Tasks;
 
- using System.Xml;
 
- namespace MECF.Framework.Common.ToolLayout
 
- {
 
-     public class VpwCellItemManager : Singleton<VpwCellItemManager>
 
-     {
 
-         #region 常量
 
-         /// <summary>
 
-         /// 前缀
 
-         /// </summary>
 
-         private const string PREFIX = "VPW";
 
-         #endregion
 
-         #region 内部变量
 
-         /// <summary>
 
-         /// 字典
 
-         /// </summary>
 
-         private Dictionary<string,VpwCellItem> _vpwCellItemDictionary=new Dictionary<string, VpwCellItem>();
 
-         #endregion
 
-         #region 属性
 
-         /// <summary>
 
-         /// 已经安装模块
 
-         /// </summary>
 
-         public List<string> InstalledModules { get; private set; } = new List<string>();
 
-         #endregion
 
-         /// <summary>
 
-         /// 初始化metal
 
-         /// </summary>
 
-         /// <param name="metalItemElement"></param>
 
-         public VpwCellItem InitializeVpwCellItem(XmlElement element)
 
-         {
 
-             VpwCellItem vpwCellItem = new VpwCellItem();
 
-             vpwCellItem.CellType = "Cell";
 
-             LayoutCellItemManager.Instance.InitializeLayoutCellItem(vpwCellItem, element);
 
-             vpwCellItem.VpwCellID = int.Parse(element.SelectSingleNode("VpwCellID").InnerText);
 
-             vpwCellItem.ResistivityID = element.SelectSingleNode("ResistivityID").InnerText;
 
-             string key = $"{PREFIX}{vpwCellItem.VpwCellID}";
 
-             vpwCellItem.ModuleName = key;
 
-             vpwCellItem.ModuleType = ModuleType.Metal.ToString();
 
-             CellItemManager.Instance.InitialLayoutCellItem(vpwCellItem);
 
-             if(vpwCellItem.Installed && !InstalledModules.Contains(key))
 
-             {
 
-                 InstalledModules.Add(key);
 
-             }
 
-             return vpwCellItem;
 
-         }
 
-         /// <summary>
 
-         /// 增加
 
-         /// </summary>
 
-         /// <param name="metalItem"></param>
 
-         public void AddCellItem(VpwCellItem vpwCellItem)
 
-         {
 
-             _vpwCellItemDictionary[$"{PREFIX}{vpwCellItem.VpwCellID}"] = vpwCellItem;
 
-         }
 
-         /// <summary>
 
-         /// 获取MetalItem对象
 
-         /// </summary>
 
-         /// <param name="moduleName"></param>
 
-         /// <returns></returns>
 
-         public VpwCellItem GetVpwItem(string moduleName)
 
-         {
 
-             return _vpwCellItemDictionary.ContainsKey(moduleName) ? _vpwCellItemDictionary[moduleName] : null;
 
-         }
 
-     }
 
- }
 
 
  |