Exemplo n.º 1
0
        private void HandlesMenuItemWriteToMKVMergeBatFileClick()
        {
            DialogResult startProcessResult = MessageBox.Show("Create mkvmerge batch file?", "Start Process?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);

            _batchGuyEAC3ToSettings.X264Files = this.GetX264Files();
            _batchGuyEAC3ToSettings.X264FileSettings = this.GetX264FileSettings();
            this.SetEpisodeNames();

            if (startProcessResult == System.Windows.Forms.DialogResult.Yes)
            {
                if (this.IsScreenValidForWriteX264BatchFile() && this.IsScreenValidForMkvMerge())
                {
                    WarningCollection warnings = new EAC3ToBatchFileWriteWarningService(_batchGuyEAC3ToSettings.BluRayDiscs).GetWarnings();
                    this.MKVMergeWarnings(warnings);
                    if (warnings.Count() > 0)
                    {
                        string warning = string.Format("{0}{1}{2}Would you still like to continue?", warnings.GetWarningMessage(), Environment.NewLine, Environment.NewLine);
                        DialogResult warningResult = MessageBox.Show(warning, "Warnings Found", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
                        if (warningResult == System.Windows.Forms.DialogResult.Yes)
                        {
                            this.WriteToMkvMergeBatchFile();
                        }
                    }
                    else
                    {
                        this.WriteToMkvMergeBatchFile();
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void createMkvmergeBatchFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult startProcessResult = MessageBox.Show("Create mkvmerge batch file?", "Start Process?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);

                if (startProcessResult == System.Windows.Forms.DialogResult.Yes)
                {
                    dgvBluRayDiscInfo.CurrentCell = null; //force the cell change so cell changed event fires
                    dgvBluRaySummary.CurrentCell = null; //force the cell change so cell changed event fires
                    this.SetEac3ToConfiguration();
                    this.SetEAC3ToRemuxFileNameTemplate();
                    if (this.IsScreenValidForRemux() && this.IsAtLeastOneDiscLoaded() && this.IsScreenValid())
                    {
                        List<BluRayDiscInfo> discs = this.GetBluRayDiscInfoList();
                        WarningCollection warnings = new EAC3ToBatchFileWriteWarningService(discs).GetWarnings();
                        this.MKVMergeWarnings(warnings);
                        if (warnings.Count() > 0)
                        {
                            string warning = string.Format("{0}{1}{2}Would you still like to continue?", warnings.GetWarningMessage(), Environment.NewLine, Environment.NewLine);
                            DialogResult warningResult = MessageBox.Show(warning, "Warnings Found", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);
                            if (warningResult == System.Windows.Forms.DialogResult.Yes)
                            {
                                this.WriteToMkvMergeBatchFile();
                            }
                        }
                        else
                        {
                            this.WriteToMkvMergeBatchFile();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                _displayErrorMessageService.DisplayError(new ErrorMessage() { DisplayMessage = "There was a problem creating the mkvmerge batch file!", DisplayTitle = "Error.", Exception = ex, MethodNameWhereExceptionOccurred = MethodBase.GetCurrentMethod().Name });
            }
        }