private void btnEncodingOptions_Click(object sender, EventArgs e) { switch ((ExporterType)comboBox1.SelectedValue) { case ExporterType.MP3: using (var form = new MP3QualityForm(encodingParameters[ExporterType.MP3])) { if (form.ShowDialog() != DialogResult.OK) { return; } encodingParameters[ExporterType.MP3] = form.EncodingParameters; } break; case ExporterType.OggVorbis: using (var form = new OggVorbisQualityForm(encodingParameters[ExporterType.OggVorbis])) { if (form.ShowDialog() != DialogResult.OK) { return; } encodingParameters[ExporterType.OggVorbis] = form.EncodingParameters; } break; case ExporterType.AAC_M4A: case ExporterType.AAC_ADTS: using (var form = new AACQualityForm(encodingParameters[ExporterType.AAC_M4A])) { if (form.ShowDialog() != DialogResult.OK) { return; } encodingParameters[ExporterType.AAC_M4A] = form.EncodingParameters; } break; default: break; } }
private void btnEncodingOptions_Click(object sender, EventArgs e) { switch ((ExporterType)comboBox1.SelectedValue) { case ExporterType.MP3: using (var form = new MP3QualityForm(encodingParameters[ExporterType.MP3])) { if (form.ShowDialog() != DialogResult.OK) { return; } encodingParameters[ExporterType.MP3] = form.EncodingParameters; } break; case ExporterType.OggVorbis: using (var form = new OggVorbisQualityForm(encodingParameters[ExporterType.OggVorbis])) { if (form.ShowDialog() != DialogResult.OK) { return; } encodingParameters[ExporterType.OggVorbis] = form.EncodingParameters; } break; case ExporterType.AAC_M4A: case ExporterType.AAC_ADTS: using (var form = new AACQualityForm(encodingParameters[ExporterType.AAC_M4A])) { if (form.ShowDialog() != DialogResult.OK) { return; } encodingParameters[ExporterType.AAC_M4A] = form.EncodingParameters; } break; case ExporterType.BRSTM: case ExporterType.BCSTM: case ExporterType.BFSTM: using (var f = new VGAudioOptionsForm <BxstmOptions, BxstmConfiguration>(bxstmOptions)) { if (f.ShowDialog(this) == DialogResult.OK) { bxstmOptions = f.SelectedObject; } }; break; case ExporterType.HCA: using (var f = new VGAudioOptionsForm <HcaOptions, HcaConfiguration>(hcaOptions)) { if (f.ShowDialog(this) == DialogResult.OK) { hcaOptions = f.SelectedObject; } }; break; case ExporterType.ADX: using (var f = new VGAudioOptionsForm <AdxOptions, AdxConfiguration>(adxOptions)) { if (f.ShowDialog(this) == DialogResult.OK) { adxOptions = f.SelectedObject; } }; break; default: break; } }