Esempio n. 1
0
 private void bgwReader_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
 {
     _Log.Set(_SPRMessageKey, _SPRMessageValue);
     if (sPort.IsOpen)
     {
         bgwReader.RunWorkerAsync();
     }
 }
Esempio n. 2
0
 private void tsbStartStop_Click(object sender, EventArgs e)
 {
     if (device == null)
     {
         return;
     }
     try
     {
         if (device.IsOpen)
         {
             device.Stop();
             tsbStartStop.Text = "Start";
         }
         else
         {
             device.Start();
             tsbStartStop.Text = "Stop";
         }
     }
     catch (Exception ex)
     {
         _Log.Set(ex.GetType().ToString(), ex.Message);
     }
 }