internal bool AdjustApertures(Form parentForm, TangraConfig.LightCurvesDisplaySettings displaySettings, LCStateMachine stateMachine, VideoController videoController)
        {
            DisplaySettings = displaySettings;
            m_StateMachine = stateMachine;
            m_VideoController = videoController;

            var frm = new frmAdjustApertures(stateMachine);

            frm.Controller = this;
            frm.Model = new AdjustAperturesViewModel(m_StateMachine.MeasuringApertures, m_StateMachine.MeasuringStars);

            frm.StartPosition = FormStartPosition.CenterParent;
            if (frm.ShowDialog(parentForm) == DialogResult.OK)
            {
                for (int i = 0; i < m_StateMachine.MeasuringStars.Count; i++)
                {
                    m_StateMachine.MeasuringStars[i].ApertureInPixels = frm.Model.Apertures[i];
                    m_StateMachine.MeasuringApertures[i] = frm.Model.Apertures[i];
                }

                return true;
            }

            return false;
        }
Esempio n. 2
0
        internal bool AdjustApertures(Form parentForm, TangraConfig.LightCurvesDisplaySettings displaySettings, LCStateMachine stateMachine, VideoController videoController)
        {
            DisplaySettings   = displaySettings;
            m_StateMachine    = stateMachine;
            m_VideoController = videoController;

            var frm = new frmAdjustApertures(stateMachine);

            frm.Controller = this;
            frm.Model      = new AdjustAperturesViewModel(m_StateMachine.MeasuringApertures, m_StateMachine.MeasuringStars);

            frm.StartPosition = FormStartPosition.CenterParent;
            if (frm.ShowDialog(parentForm) == DialogResult.OK)
            {
                for (int i = 0; i < m_StateMachine.MeasuringStars.Count; i++)
                {
                    m_StateMachine.MeasuringStars[i].ApertureInPixels = frm.Model.Apertures[i];
                    m_StateMachine.MeasuringApertures[i] = frm.Model.Apertures[i];
                }

                return(true);
            }

            return(false);
        }