private void btnMeasure_Click(object sender, EventArgs e) { if (m_IsMeasuring) { m_VideoOperation.StopMeasurements(); return; } var frm = new frmRunMultiFrameSpectroscopy(m_FramePlayer, m_VideoOperation, m_VideoContoller.GetCurrentAstroImage(false)); if (m_VideoContoller.ShowDialog(frm) == DialogResult.OK) { m_SpectroscopyController.SpectraReductionContext.Reset(); m_SpectroscopyController.SpectraReductionContext.FramesToMeasure = frm.NumberOfMeasurements; m_SpectroscopyController.SpectraReductionContext.MeasurementAreaWing = frm.MeasurementAreaWing; m_SpectroscopyController.SpectraReductionContext.BackgroundAreaWing = frm.BackgroundAreaWing; m_SpectroscopyController.SpectraReductionContext.BackgroundAreaGap = frm.BackgroundAreaGap; m_SpectroscopyController.SpectraReductionContext.BackgroundMethod = frm.BackgroundMethod; m_SpectroscopyController.SpectraReductionContext.PixelValueCoefficient = frm.PixelValueCoefficient; m_SpectroscopyController.SpectraReductionContext.FrameCombineMethod = frm.FrameCombineMethod; m_SpectroscopyController.SpectraReductionContext.UseFineAdjustments = frm.UseFineAdjustments; m_SpectroscopyController.SpectraReductionContext.AlignmentAbsorptionLinePos = frm.AlignmentAbsorptionLinePos; m_SpectroscopyController.SpectraReductionContext.ExposureSeconds = frm.ExposureSeconds; m_VideoOperation.StartMeasurements(); } }