public void CreateBackground(DataEventArgs e)
 {
     BackgroundWorker task = new BackgroundWorker();
     task.RunWorkerCompleted += Finished;
     task.DoWork += (s, args) =>
     {
         Handling(e.Data, e.Board);
     };
     task.RunWorkerAsync();
 }
예제 #2
0
 public void SplitData(object sender, DoWorkEventArgs e)
 {
     lock (thisLock)
     {
         ULStat = MccDaq.MccService.WinBufToArray(MemHandle, adData, 0, qChans * NumPoints);
         BoardErrorException.TestException(ULStat, this, "Reading the buffer");
         DataEventArgs args = new DataEventArgs();
         args.Data = adData;
         args.Board = Board;
         OnScanned(args);
     }
 }
예제 #3
0
 private void DispatchData(object sender, DataEventArgs e)
 {
     if (maxPontos > 0 && pontos >= maxPontos)
     {
         Stop();
         uiDispatcher.Invoke(() =>
         {
             OnFinished(EventArgs.Empty);
         });
     }
     else
     {
         Processing.Invoke(e);
         pontos += e.Data.Length;
     }
 }
예제 #4
0
 protected virtual void OnScanned(DataEventArgs e)
 {
     if (Scanned != null)
         Scanned(this, e);
 }