Exemplo n.º 1
0
        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();
            }
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 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();
     }
 }