private string GenerateArguments()
        {
            StringBuilder sb = new StringBuilder();

            foreach (DataGridViewRow row in StreamDataGridView.Rows)
            {
                Stream stream = row.DataBoundItem as Stream;
                DataGridViewCheckBoxCell extractStream = row.Cells["StreamExtractCheckBox"] as DataGridViewCheckBoxCell;

                if (extractStream.Value != null && int.Parse(extractStream.Value.ToString()) == 1)
                {
                    if (row.Cells["StreamExtractAsComboBox"].Value == null)
                    {
                        throw new ApplicationException(string.Format("Specify an extraction type for stream:\r\n\n\t{0}: {1}", stream.Number, stream.Name));
                    }

                    if (FolderSelection.Checked)
                    {
                        sb.Append(string.Format("{0}:\"{1}\" {2} ", stream.Number,
                                                System.IO.Path.Combine(FolderOutputTextBox.Text, string.Format("F{0}_T{1}_{2} - {3}.{4}", ((Feature)FeatureDataGridView.SelectedRows[0].DataBoundItem).Number, stream.Number, Extensions.GetStringValue(stream.Type), row.Cells["languageDataGridViewTextBoxColumn"].Value, (row.Cells["StreamExtractAsComboBox"].Value).ToString().ToLowerInvariant())),
                                                row.Cells["StreamAddOptionsTextBox"].Value).Trim());
                    }
                    else
                    {
                        sb.Append(string.Format("{0}:\"{1}\" {2} ", stream.Number,
                                                System.IO.Path.Combine(FolderOutputTextBox.Text, string.Format("T{0}_{1} - {2}.{3}", stream.Number, Extensions.GetStringValue(stream.Type), row.Cells["languageDataGridViewTextBoxColumn"].Value, (row.Cells["StreamExtractAsComboBox"].Value).ToString().ToLowerInvariant())),
                                                row.Cells["StreamAddOptionsTextBox"].Value).Trim());
                    }

                    if (row.Cells["StreamExtractAsComboBox"].Value.Equals(AudioCodec.DTS.ID))
                    {
                        sb.Append(" -core");
                    }

                    sb.Append(" ");
                }
            }

            return(sb.ToString());
        }