BatchGuy.App.CreateEAC3ToBatchForm.createEac3toBatchFileToolStripMenuItem_Click C# (CSharp) Method

createEac3toBatchFileToolStripMenuItem_Click() private method

private createEac3toBatchFileToolStripMenuItem_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void createEac3toBatchFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult startProcessResult = MessageBox.Show("Create eac3to 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.IsAtLeastOneDiscLoaded() && this.IsScreenValid())
                    {
                        List<BluRayDiscInfo> discs = this.GetBluRayDiscInfoList();
                        WarningCollection warnings = new EAC3ToBatchFileWriteWarningService(discs).GetWarnings();
                        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.WriteToBatchFile();
                            }
                        }
                        else
                        {
                            this.WriteToBatchFile();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                _displayErrorMessageService.DisplayError(new ErrorMessage() { DisplayMessage = "There was a problem creating the eac3to batch file!", DisplayTitle = "Error.", Exception = ex, MethodNameWhereExceptionOccurred = MethodBase.GetCurrentMethod().Name });
            }
        }
CreateEAC3ToBatchForm