32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
|
using Glorysoft.SECS.EQP.Common;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Reflection;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace ARI.EAP.HOST.Common
|
|||
|
{
|
|||
|
public static class EquipmentStatus
|
|||
|
{
|
|||
|
public static string S5F3 = "AlarmEnable";
|
|||
|
public static ushort SpoolingFlag = 0;
|
|||
|
public static bool MQstate = false;
|
|||
|
public static Dictionary<string, IEventHandler> EventHandlers;
|
|||
|
public static ushort commandCount = 0;
|
|||
|
public static bool initStatus = false;
|
|||
|
static EquipmentStatus()
|
|||
|
{
|
|||
|
EventHandlers = new Dictionary<string, IEventHandler>();
|
|||
|
foreach (Type item in MethodBase.GetCurrentMethod().DeclaringType.Assembly.GetTypes())
|
|||
|
{
|
|||
|
if (item.IsClass && item.GetInterface(nameof(IEventHandler)) != null)
|
|||
|
{
|
|||
|
EventHandlers.Add(item.Name, Activator.CreateInstance(item) as IEventHandler);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|