private void cbDVDControlTitle_SelectedIndexChanged(object sender, EventArgs e) { if (cbDVDControlTitle.SelectedIndex != -1) { // fill info cbDVDControlAudio.Items.Clear(); cbDVDControlSubtitles.Items.Clear(); cbDVDControlChapter.Items.Clear(); MediaInfo.DVD_Fill_Title_Info(cbDVDControlTitle.SelectedIndex); for (int i = 0; i < MediaInfo.DVD_Title_NumberOfChapters; i++) { cbDVDControlChapter.Items.Add("Chapter " + Convert.ToString(i + 1)); } if (cbDVDControlChapter.Items.Count > 0) { cbDVDControlChapter.SelectedIndex = 0; } for (int i = 0; i < MediaInfo.DVD_Title_MainAttributes_NumberOfAudioStreams; i++) { MediaInfo.DVD_Fill_Title_Audio_Info(cbDVDControlTitle.SelectedIndex, i); string s = MediaInfo.DVD_Title_MainAttributes_AudioAttributes_AudioFormat; s = s + " - "; s = s + MediaInfo.DVD_Title_MainAttributes_AudioAttributes_NumberOfChannels + "ch" + " - "; s = s + MediaInfo.DVD_Title_MainAttributes_AudioAttributes_LanguageS; cbDVDControlAudio.Items.Add(s); } if (cbDVDControlAudio.Items.Count > 0) { cbDVDControlAudio.SelectedIndex = 0; } cbDVDControlSubtitles.Items.Add("Disabled"); for (int i = 0; i < MediaInfo.DVD_Title_MainAttributes_NumberOfSubpictureStreams; i++) { MediaInfo.DVD_Fill_Title_Subpicture_Info(cbDVDControlTitle.SelectedIndex, i); cbDVDControlSubtitles.Items.Add(MediaInfo.DVD_Title_MainAttributes_SubpictureAttributes_LanguageS); } cbDVDControlSubtitles.SelectedIndex = 0; // if (nil we just enumerate titles and chapters if (sender != null) { // play title MediaPlayer1.DVD_Title_Play(cbDVDControlTitle.SelectedIndex); tbTimeline.Maximum = MediaPlayer1.DVD_Title_GetDurationS(); } } }