private void goButton_Click(object sender, EventArgs e) { if ((verifyAudioSettings() == null) && (VideoSettings != null) && (avsSettingsProvider.GetCurrentSettings() != null) && !string.IsNullOrEmpty(input.Filename) && !string.IsNullOrEmpty(workingName.Text)) { FileSize?desiredSize = optionalTargetSizeBox1.Value; List <AudioJob> aJobs = new List <AudioJob>(); List <MuxStream> muxOnlyAudio = new List <MuxStream>(); for (int i = 0; i < audioConfigControl.Count; ++i) { if (audioTrack[i].SelectedIndex == 0) // "None" { continue; } string aInput; TrackInfo info = null; int delay = audioConfigControl[i].Delay; if (audioTrack[i].SelectedSCItem.IsStandard) { aInput = "::" + (audioTrack[i].SelectedIndex - 1) + "::"; // -1 since "None" is first info = new TrackInfo(((AudioTrackInfo)audioTrack[i].SelectedObject).Language, null); } else { aInput = audioTrack[i].SelectedText; } if (audioConfigControl[i].DontEncode) { muxOnlyAudio.Add(new MuxStream(aInput, info, delay)); } else { aJobs.Add(new AudioJob(aInput, null, null, audioConfigControl[i].Settings, delay)); } } string d2vName = Path.Combine(workingDirectory.Filename, workingName.Text + ".d2v"); DGIndexPostprocessingProperties dpp = new DGIndexPostprocessingProperties(); dpp.DAR = ar.Value; dpp.DirectMuxAudio = muxOnlyAudio.ToArray(); dpp.AudioJobs = aJobs.ToArray(); dpp.AutoDeinterlace = autoDeint.Checked; dpp.AvsSettings = avsSettingsProvider.GetCurrentSettings(); dpp.ChapterFile = chapterFile.Filename; dpp.Container = (ContainerType)containerFormat.SelectedItem; dpp.FinalOutput = output.Filename; dpp.HorizontalOutputResolution = (int)horizontalResolution.Value; dpp.OutputSize = desiredSize; dpp.SignalAR = signalAR.Checked; dpp.Splitting = splitting.Value; dpp.VideoSettings = VideoSettings.clone(); IndexJob job = new IndexJob(input.Filename, d2vName, 1, audioTrack1.SelectedIndex - 1, audioTrack2.SelectedIndex - 1, dpp, false); mainForm.Jobs.addJobsToQueue(job); this.Close(); } else { MessageBox.Show("You must select audio and video profile, output name and working directory to continue", "Incomplete configuration", MessageBoxButtons.OK, MessageBoxIcon.Stop); } }