/// <summary> /// Print wavelength on left-mouse click. Recalculate absorption edge on ctrl-click. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormsPlotLeft_MouseClicked(object sender, MouseEventArgs e) { if (!plotLeftMouseDataControl) { return; } double clickedWavelength = plotLeft.CoordinateFromPixelX(e.X); if (e.Button == MouseButtons.Left) { My_msg(string.Format("Clicked: {0:0.0} nm", clickedWavelength)); } else if (e.Button == MouseButtons.Right) { // If clicked at app start. if (spectrometricThermometer.MSpectraProcessor.Wavelengths == null) { return; } PlotRightTitleTemperature = spectrometricThermometer.AnalyzeMeasurement(clickedWavelength); Plot(spectrometricThermometer.MSpectraProcessor, spectrometricThermometer.MTemperatureHistory); } }