Example #1
0
 public static void AddList(string simno, byte[] _data, byte mark)
 {
     if (timeDataDeal.Interval != 5)
     {
         timeDataDeal.Interval = 5;
     }
     lock (listRecSendInfo)
     {
         RecSendInfo recsend = new RecSendInfo();
         recsend.SimNo = simno;
         recsend.time  = DateTime.Now;
         recsend.data  = _data;
         recsend.mark  = mark;
         listRecSendInfo.Add(recsend);
     }
 }
Example #2
0
 static void timeRecSendDataDeal_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     lock (lockWriteTxt)
     {
         if (listRecSendInfo != null && listRecSendInfo.Count > 0)
         {
             if (timeDataDeal.Interval != 5)
             {
                 timeDataDeal.Interval = 5;
             }
             RecSendInfo recsend = listRecSendInfo[0];
             WriteTxt(recsend.SimNo, recsend.data, recsend.mark, recsend.time);
             listRecSendInfo.RemoveAt(0);
         }
         else
         {
             if (timeDataDeal.Interval != 10000)
             {
                 timeDataDeal.Interval = 10000;
             }
         }
     }
 }