public FormMain() { InitializeComponent(); back2Front = new Back2Front(front: this); spectrometricThermometer = new SpectrometricThermometer(front: back2Front); }
public SpectrometricThermometer(Back2Front front) { Front = front ?? throw new ArgumentNullException(nameof(front)); // Events. MSpectraProcessor.DataReady += SpectraProcessor_DataReady; // Config (+calibration). ConfigurationFile_Load(); // Event handler inicialization. timerMeasure.Tick += new EventHandler(TimerSpectra_Tick); timerPID.Tick += new EventHandler(TimerPID_Tick); timerPID.Interval = (int)(PID.Period * 1000); timerSwitch.Tick += new EventHandler(TimerSwitch_Tick); timerSwitch.Interval = 1000; // 1 sec. }