//process.Initialize(context);初始化的时候执行 public override void Initialize(Context context) { try { base.Initialize(context); //堆垛机收发报文的错误信息代码 CraneErrMessageDal errDal = new CraneErrMessageDal(); dtErrMesage = errDal.GetErrMessageList(); NCK001 = 100; for (int i = 1; i <= 6; i++) { string CraneNo = i.ToString().PadLeft(2, '0'); if (!dCraneWait.ContainsKey(CraneNo)) { dCraneWait.Add(CraneNo, null); } } THOK.MCP.Config.Configuration conf = new MCP.Config.Configuration(); conf.Load("Config.xml"); blnOutOrder = conf.Attributes["IsOutOrder"] == "1" ? true : false; } catch (Exception ex) { Logger.Error("THOK.XC.Process.Process_Crane.CraneProcess堆垛机初始化出错,原因:" + ex.Message); } }
//process.Initialize(context);初始化的时候执行 public override void Initialize(Context context) { try { base.Initialize(context); //堆垛机收发报文的错误信息代码 CraneErrMessageDal errDal = new CraneErrMessageDal(); dtErrMesage = errDal.GetErrMessageList(); NCK001 = 100; for (int i = 1; i <= 6; i++) { string CraneNo = i.ToString().PadLeft(2, '0'); if (!dCraneWait.ContainsKey(CraneNo)) { dCraneWait.Add(CraneNo, null); } } } catch (Exception ex) { Logger.Error("THOK.XC.Process.Process_Crane.CraneProcess堆垛机初始化出错,原因:" + ex.Message); } }