Exemple #1
0
        private void DisplayIntensifyModeClicked(object sender, EventArgs e)
        {
            var currItem = sender as ToolStripMenuItem;
            if (currItem != null && !currItem.Checked)
            {
                tsmiOff.Checked = false;
                tsmiLo.Checked = false;
                tsmiHigh.Checked = false;
                tsmiDynamic.Checked = false;

                currItem.Checked = true;

                DisplayIntensifyMode newMode = DisplayIntensifyMode.Off;
                if (tsmiHigh.Checked)
                    newMode = DisplayIntensifyMode.Hi;
                else if (tsmiLo.Checked)
                    newMode = DisplayIntensifyMode.Lo;
                else if (tsmiDynamic.Checked)
                    newMode = DisplayIntensifyMode.Dynamic;

                m_VideoController.SetDisplayIntensifyMode(newMode, null, null);
            }

            if (tsmiDynamic.Checked)
            {
                var frm = new frmDefineDisplayDynamicRange(m_VideoController);
                frm.StartPosition = FormStartPosition.Manual;
                frm.Left = Left + pictureBox.Width + 10;
                frm.Top = Top + (Height - frm.Height) / 2;
                frm.ShowDialog(this);
            }
        }
Exemple #2
0
        private void miOpenFitsSequence_Click(object sender, EventArgs e)
        {
            var frm = new frmChooseFitsFolder();
            frm.tbxFolderPath.Text = TangraConfig.Settings.LastUsed.FitsSeqenceLastFolderLocation;
            bool retry = true;
            while (retry)
            {
                retry = false;
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    m_VideoController.CloseOpenedVideoFile();

                    if (m_VideoController.OpenFitsFileSequence(frm.tbxFolderPath.Text) ||
                        (Control.ModifierKeys == Keys.Control && m_VideoController.OpenBitmapFileSequence(frm.tbxFolderPath.Text)))
                    {
                        TangraConfig.Settings.LastUsed.FitsSeqenceLastFolderLocation = frm.tbxFolderPath.Text;
                        TangraConfig.Settings.Save();

                        if (tsmiDynamic.Checked)
                        {
                            var frmDynRange = new frmDefineDisplayDynamicRange(m_VideoController);
                            frmDynRange.StartPosition = FormStartPosition.Manual;
                            frmDynRange.Left = Left + pictureBox.Width + 10;
                            frmDynRange.Top = Top + (Height - frm.Height) / 2;
                            frmDynRange.ShowDialog(this);
                        }

                        SelectVideoOperation();
                    }
                    else
                        retry = true;
                }
            }
        }