using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemperatureManager.MVC;

namespace NombreApplication
{
    class ControleurTemperatureSeuil:IObserver<SeuilTemperature>
    {
        private SeuilTemperatureModele seuilModele;

        public ControleurTemperatureSeuil(SeuilView view,SeuilTemperatureModele seuil)
        {
            this.seuilModele = seuil;
            view.GetButtonIncremente().Click += (obj, arg) => seuilModele.Incremente();
            view.GetButtonDecremente().Click += (obj, arg) => seuilModele.Decremente();
        }


        public void OnNext(SeuilTemperature value)
        {
            //if model has changed then Onnext Triggered

        }

        public void OnError(Exception error)
        {
            throw new NotImplementedException();
        }

        public void OnCompleted()
        {
            throw new NotImplementedException();
        }
    }
}
