Пример #1
0
 /// <summary>
 /// 模块帮手2初始化,调用构造函数
 /// </summary>
 /// <param name="list">模块集合</param>
 /// <param name="readTimerPeriod"></param>
 /// <returns></returns>
 public static AdamHelper2 Initialize(AdamOperation oper)
 {
     if (instance != null)
     {
         throw new AdamHelperException("AdamHelper2数据接收模块重复初始化报错!");
     }
     instance = new AdamHelper2(oper);
     return(instance);
 }
Пример #2
0
 private AdamHelper2(AdamOperation oper)
 {
     hasData   = false;
     this.oper = oper;
     this.v    = 0;
     readTimer = new Timer(_ =>
     {
         ReadRailWay();
     }, null, Timeout.Infinite, Timeout.Infinite);
 }