Exemplo n.º 1
0
 private void GetData()
 {
     try
     {
         base.ResultData = new byte[this.m_OnceCount];
         base.m_Comm.SetTimeOut(0x2710);
         while (!this.m_ThreadStopFlag)
         {
             base.ResultData = new byte[this.m_OnceCount];
             if (base.m_Comm.Recv(ref this.ResultData, this.m_OnceCount) <= 0)
             {
                 Thread.Sleep(0x3e8);
             }
             else
             {
                 ClsResult.OperatePointSE(base.ResultData, true);
             }
         }
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 2
0
        public override bool ExecQuery()
        {
            ClsResult.ClearQueue();
            this.m_td = new Thread(new ThreadStart(this.GetData));
            this.m_td.IsBackground = true;
            this.m_td.Name         = "Thread_Name:赛尔福心电数据交互";
            Trace.WriteLine("================= Thread_Name:赛尔福心电数据交互 =========================");
            this.m_td.Start();
            FormDeviceSE ese = new FormDeviceSE {
                StartPosition = FormStartPosition.CenterScreen
            };

            ese.OnSaveData += new FormDeviceSE.savedata(this.formSE_OnSaveData);
            ese.ShowDialog();
            this.m_ThreadStopFlag = true;
            Thread.Sleep(500);
            if ((this.m_td != null) && this.m_td.IsAlive)
            {
                this.m_td.Abort();
            }
            this.ExecClose();
            ClsResult.ResultFlag = true;
            return(true);
        }