Exemplo n.º 1
0
 private void SpectrometerDataChanged(object sender, SpectrometerDataChangedEventHandlerArgs args)
 {
     if (!_isRealTimeSpectrometerData || Spectrometer == null || !Spectrometer.IsSpectrometerReady)
     {
         return;
     }
     try
     {
         //_spectrometer.DataChanged -= SpectrometerDataChanged;
         var spectrometerDataPoints = args.Data;//IsLedEnabled ? Spectrometer.GetData() : Spectrometer.GetNoise();
         spectrometerDataPoints = _dataHelper.Process(spectrometerDataPoints);
         CallThreadSafe(() =>
         {
             Values = spectrometerDataPoints.ToList();
             AutoResize();
         });
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 2
0
 protected virtual void OnDataChanged(SpectrometerDataChangedEventHandlerArgs e)
 {
     DataChanged?.Invoke(this, e);
 }
Exemplo n.º 3
0
        protected void NotifyDataChanged(List <SpectrometerDataPoint> data)
        {
            var e = new SpectrometerDataChangedEventHandlerArgs(data);

            OnDataChanged(e);
        }