public void CarThreadFunc(object o) { try { CGKcar lastCar = null; int CarId = Convert.ToInt16(o); int[] CarXmlIndex = getCarXmlIndex(CarId); while (true) { if (IsStart) { CGKcar thisCar = CGKBll.GetCGKcarModel(CarId); if (thisCar != null) { setCarData(lastCar, thisCar, CarXmlIndex); lastCar = thisCar; } } Thread.Sleep(sleepTime); } } catch (Exception ex) { throw ex; } }
public void DDJThreadFunc(object o) { try { CGKddj lastDdj = null; int DdjId = Convert.ToInt16(o); int[] DDJXmlIndex = getDdjXmlIndex(DdjId); while (true) { if (IsStart) { CGKddj thisDdj = CGKBll.GetCGKddjModel(DdjId); if (thisDdj != null) { setDdjData(lastDdj, thisDdj, DDJXmlIndex, DdjId); lastDdj = thisDdj; } } Thread.Sleep(sleepTime); } } catch (Exception ex) { throw ex; } }
private void setPallertData(List <CGKpellert> o, int[] xmlIndex) { if (o != null) { foreach (CGKpellert pallert in o) { CGKBll.DelCGKpellert(pallert.CGKpellertid); ComTCPLib.SetOutputAsUINT(1, xmlIndex[pallert.CGKpellertid - 1], (UInt16)pallert.CGKpellertstate); } } }
//public int DdjId; //数据库只记录变化数据 #region 托盘处理逻辑 public void PallertThreadFunc(object o) { try { int[] xmlIndex = getPallertXmlIndex(); while (true) { if (IsStart) { List <CGKpellert> listPallert = CGKBll.GetCGKpellertModelAll(); setPallertData(listPallert, xmlIndex); } Thread.Sleep(sleepTime); } } catch (Exception ex) { throw ex; } }