예제 #1
0
        private async void Timer_Tick(object sender, EventArgs e)
        {
            var read = await _ReadMasurements.ReadChannelLastMeasurements();

            if (read != null)
            {
                _DataFromThingSpeak.Measurements.Add(read.Measurements[0]);
                RedrawGraph(_SelectedWindow);
                CurrentPlotModel.InvalidatePlot(true);
            }
        }
 public void UpdatePlotModel()
 {
     CurrentPlotModel = LoadChart();
     if (CurrentPlotModel != null && !string.IsNullOrWhiteSpace(GraphTitle))
     {
         CurrentPlotModel.Title = GraphTitle;
     }
     RaisePropertyChanged(nameof(CurrentPlotModel));
     CurrentPlotModel?.InvalidatePlot(true);
     UpdateLayout();
 }
예제 #3
0
 private void HandleMessage(MvvmMessage message)
 {
     if (message.Data != null)
     {
         _DataFromThingSpeak = message.Data;
         Timer.Start();
     }
     _SelectedWindow = message.SelectedWindow;
     RedrawGraph(_SelectedWindow);
     CurrentPlotModel.ResetAllAxes();
     CurrentPlotModel.InvalidatePlot(true);
 }