Exemplo n.º 1
0
 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;
     }
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 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);
         }
     }
 }
Exemplo n.º 4
0
        //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;
            }
        }