コード例 #1
0
 void Driver_OnCommandReceived(object sender, GeccoDriverArgs e)
 {
     if (e.Info == InfoEnum.PulseDisabled)
     {
         _pulseDoneEvent.Set();
     }
 }
コード例 #2
0
 private void Driver_OnCommandReceived(object sender, GeccoDriverArgs e)
 {
     if (e.Info == InfoEnum.GeneratorError)
     {
         Application.Current.Dispatcher.BeginInvoke(new Action(() => Errors.Insert(0, new GeneratorErrorModel())));
     }
 }
コード例 #3
0
 void Driver_OnCommandReceived(object sender, GeccoDriverArgs e)
 {
     if (e.Info == InfoEnum.FirmwareUpdate)
     {
         var arguments = e.Message.Split(';');
         _commandLength = byte.Parse(arguments[0]);
         byte commandResponse = byte.Parse(arguments[1]);
         _commandSuccess = commandResponse == 6;
         _ackTrigger.Set();
     }
 }
コード例 #4
0
ファイル: ArchiveViewModel.cs プロジェクト: oliug666/legirf
 private void Driver_OnCommandReceived(object sender, GeccoDriverArgs e)
 {
     if (e.Info == InfoEnum.PulseDisabled)
     {
         Application.Current.Dispatcher.Invoke(new Action(() =>
         {
             PulseMeasurements.Insert(0, new PulseMeasurement {
                 Date = DateTime.Now, Points = e.MeasurePoints
             });
             if (PulseMeasurements.Count > 100)
             {
                 PulseMeasurements.RemoveAt(PulseMeasurements.Count - 1);
             }
         }));
     }
 }