Ejemplo n.º 1
0
 private void usbCalculator_OnDataReceived(object sender, DataReceivedEventArgs args)
 {
     if (_receivingData)
     {
         try
         {
             lock (scheduleLock)
             {
                 _receivedData.Enqueue(args.Data);
                 ScheduleCheck();
             }
         }
         catch
         {
         }
     }
 }
Ejemplo n.º 2
0
 static void calculator_DataReceived(object sender, DataReceivedEventArgs e)
 {
     ReceivedBytes.Enqueue(e.Data);
 }
Ejemplo n.º 3
0
 static void calculator_DataReceived(object sender, DataReceivedEventArgs e)
 {
     ReceivedBytes.Enqueue(e.Data);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Some data arrived (Device has to be Receiving data)
 /// </summary>
 /// <param name="e">Data received</param>
 protected virtual void OnDataReceived(DataReceivedEventArgs e)
 {
     var handler = DataReceived;
     if (handler != null) handler(this, e);
 }
Ejemplo n.º 5
0
 private void usbCalculator_OnDataReceived(object sender, DataReceivedEventArgs args)
 {
     if (_receivingData)
     {
         try
         {
             lock (scheduleLock)
             {
                 _receivedData.Enqueue(args.Data);
                 ScheduleCheck();
             }
         }
         catch
         {
         }
     }
 }