private void miApplySavedCalibration_Click(object sender, EventArgs e) { var frmCamera = new frmChooseConfiguration(TangraContext.Current.FrameWidth, TangraContext.Current.FrameHeight, m_VideoController.VideoBitPix); if (frmCamera.ShowDialog(this) == DialogResult.OK) { m_Spectra.Points.ForEach(x => x.Wavelength = float.NaN); m_SpectroscopyController.GetSpectraCalibrator().Reset(); m_SpectroscopyController.GetSpectraCalibrator().LoadCalibration(frmCamera.SelectedConfiguration); m_StateManager.ChangeState <SpectraViewerStateCalibrated>(); RedrawPlot(); } }
private TangraConfig.PersistedConfiguration ChooseWavelengthCalibration(bool debugMode) { var frmCamera = new frmChooseConfiguration(TangraContext.Current.FrameWidth, TangraContext.Current.FrameHeight, m_VideoController.VideoBitPix); if (frmCamera.ShowDialog(this) == DialogResult.Cancel) { return null; } return frmCamera.SelectedConfiguration; }
private void miApplySavedCalibration_Click(object sender, EventArgs e) { var frmCamera = new frmChooseConfiguration(TangraContext.Current.FrameWidth, TangraContext.Current.FrameHeight, m_VideoController.VideoBitPix); if (frmCamera.ShowDialog(this) == DialogResult.OK) { m_Spectra.Points.ForEach(x => x.Wavelength = float.NaN); m_SpectroscopyController.GetSpectraCalibrator().Reset(); m_SpectroscopyController.GetSpectraCalibrator().LoadCalibration(frmCamera.SelectedConfiguration); m_StateManager.ChangeState<SpectraViewerStateCalibrated>(); RedrawPlot(); } }