1234567891011121314151617181920212223242526272829303132 |
- using athosRT.Devices.EFEM.Task;
- using MECF.Framework.Common.Equipment;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Threading.Tasks;
- namespace athosRT.Devices.EFEM.ABS
- {
- public class RemovePolicy : CheckImp, IPolicy
- {
- public bool Check(string device, out string reason)
- {
- reason = string.Empty;
- if (device == "SignalTower")
- return true;
- if (ModuleHelper.IsLoadPort((ModuleName)Enum.Parse(typeof(ModuleName), device)) && int.Parse(new Regex("[1-9]\\d*").Match(device).ToString()) > this.LoadPortQuantity)
- {
- reason = "REMOVE";
- return false;
- }
- IServerModule entity = this.GetEntity(device);
- if (entity != null && !entity.Disabled)
- return true;
- reason = "REMOVE";
- return false;
- }
- }
- }
|