private void OnTemperatureChangedExecute(object sender, EventArgs e)
        {
            CurrentToolActual = _temperatureManager.CurrentToolActual;
            CurrentToolTarget = _temperatureManager.CurrentToolTarget;
            CurrentBedActual  = _temperatureManager.CurrentBedActual;
            CurrentBedTarget  = _temperatureManager.CurrentBedTarget;

            _logger.LogInformation($"{_temperatureManager.CurrentToolActual}");

            OnUIChanged?.Invoke();

            var datasetTool = (IDataset <decimal>)ChartConfig.Data.Datasets[1];
            var datasetBed  = (IDataset <decimal>)ChartConfig.Data.Datasets[0];

            if (datasetTool.Count >= 20)
            {
                datasetTool.RemoveAt(0);
                datasetBed.RemoveAt(0);
            }
            else
            {
                ChartConfig.Data.Labels.Add("");
            }


            _logger.LogInformation($"{datasetTool.Count}");
            datasetTool.Add(_temperatureManager.CurrentToolActual);
            datasetBed.Add(_temperatureManager.CurrentBedActual);

            Chart.Update();
        }
Esempio n. 2
0
 public void InvokeUIChanged()
 {
     OnUIChanged?.Invoke();
 }