예제 #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.Title            = ScreenManagerLang.dlgSaveSequenceTitle;
            saveFileDialog.RestoreDirectory = true;
            saveFileDialog.Filter           = ScreenManagerLang.FileFilter_SaveImage;
            saveFileDialog.FilterIndex      = 1;
            saveFileDialog.FileName         = Path.GetFileNameWithoutExtension(fullPath);

            Hide();

            if (saveFileDialog.ShowDialog() != DialogResult.OK)
            {
                Show();
                return;
            }

            if (string.IsNullOrEmpty(saveFileDialog.FileName))
            {
                Close();
                return;
            }

            int              frames   = (int)Math.Round((float)totalFrames / decimationFrames);
            long             interval = info.AverageTimeStampsPerFrame * decimationFrames;
            formFramesExport ffe      = new formFramesExport(playerScreenUserInterface, saveFileDialog.FileName, interval, true, chkKeyframesOnly.Checked, frames);

            ffe.ShowDialog();
            ffe.Dispose();

            Close();
        }
예제 #2
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.Title            = m_ResourceManager.GetString("dlgSaveSequenceTitle", Thread.CurrentThread.CurrentUICulture);
            saveFileDialog.RestoreDirectory = true;
            saveFileDialog.Filter           = m_ResourceManager.GetString("dlgSaveFilter", Thread.CurrentThread.CurrentUICulture);
            saveFileDialog.FilterIndex      = 1;
            saveFileDialog.FileName         = Path.GetFileNameWithoutExtension(m_FullPath);

            Hide();
            if (saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                string filePath = saveFileDialog.FileName;
                if (filePath.Length > 0)
                {
                    Int64 iIntervalTimeStamps = (Int64)(((double)trkInterval.Value / 1000) * m_fTimestampsPerSeconds);

                    // Launch the Progress bar dialog that will trigger the export.
                    // it will call the real function (in PlayerServerUI)
                    formFramesExport ffe = new formFramesExport(m_PlayerScreenUserInterface, filePath, iIntervalTimeStamps, chkBlend.Checked, chkKeyframesOnly.Checked, m_iEstimatedTotal);
                    ffe.ShowDialog();
                    ffe.Dispose();
                }
                Close();
            }
            else
            {
                Show();
            }
        }