private void buttonEditAdvancedOptions_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (si.streamType == StreamType.Audio)
         {
             AdvancedAudioOptions aao = new AdvancedAudioOptions();
             if (si.advancedOptions != null && si.advancedOptions.GetType() == typeof(AdvancedAudioOptions))
             {
                 aao = new AdvancedAudioOptions(si.advancedOptions);
             }
             AdvancedAudioOptionsWindow aaow = new AdvancedAudioOptionsWindow(aao);
             aaow.ShowDialog();
             if (aaow.DialogResult == true)
             {
                 si.advancedOptions = new AdvancedAudioOptions(aaow.advancedAudioOptions);
                 UpdateStatusInfo();
             }
         }
         else if (si.streamType == StreamType.Video)
         {
             AdvancedVideoOptions avo = new AdvancedVideoOptions();
             if (si.advancedOptions != null && si.advancedOptions.GetType() == typeof(AdvancedVideoOptions))
             {
                 avo = new AdvancedVideoOptions(si.advancedOptions);
             }
             AdvancedVideoOptionsWindow avow = new AdvancedVideoOptionsWindow(avo);
             avow.ShowDialog();
             if (avow.DialogResult == true)
             {
                 si.advancedOptions = new AdvancedVideoOptions(avow.advancedVideoOptions);
                 UpdateStatusInfo();
             }
         }
         else if (si.streamType == StreamType.Subtitle)
         {
             AdvancedSubtitleOptions aso = new AdvancedSubtitleOptions();
             if (si.advancedOptions != null && si.advancedOptions.GetType() == typeof(AdvancedSubtitleOptions))
             {
                 aso = new AdvancedSubtitleOptions(si.advancedOptions);
             }
             AdvancedSubtitleOptionsWindow avow = new AdvancedSubtitleOptionsWindow(aso);
             avow.ShowDialog();
             if (avow.DialogResult == true)
             {
                 si.advancedOptions = new AdvancedSubtitleOptions(avow.advancedSubtitleOptions);
                 UpdateStatusInfo();
             }
         }
     }
     catch (Exception)
     {
     }
 }
Beispiel #2
0
 private void menuEditAdvancedOptions_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (comboBoxTitle.SelectedIndex > -1 && listBoxStreams.SelectedIndex > -1)
         {
             StreamInfo si = titleList[comboBoxTitle.SelectedIndex].streams[listBoxStreams.SelectedIndex];
             if (si.streamType == StreamType.Audio)
             {
                 AdvancedAudioOptions aao = null;
                 if (si.advancedOptions.GetType() != typeof(AdvancedAudioOptions))
                 {
                     aao = new AdvancedAudioOptions();
                 }
                 else
                 {
                     aao = new AdvancedAudioOptions(si.advancedOptions);
                 }
                 AdvancedAudioOptionsWindow aaow = new AdvancedAudioOptionsWindow(aao);
                 aaow.ShowDialog();
                 if (aaow.DialogResult == true)
                 {
                     int index = listBoxStreams.SelectedIndex;
                     titleList[comboBoxTitle.SelectedIndex].streams[index].advancedOptions =
                         new AdvancedAudioOptions(aaow.advancedAudioOptions);
                     UpdateStreamList();
                     listBoxStreams.SelectedIndex = index;
                 }
             }
             else if (si.streamType == StreamType.Video)
             {
                 AdvancedVideoOptions avo = null;
                 if (si.advancedOptions.GetType() != typeof(AdvancedVideoOptions))
                 {
                     avo = new AdvancedVideoOptions();
                 }
                 else
                 {
                     avo = new AdvancedVideoOptions(si.advancedOptions);
                 }
                 AdvancedVideoOptionsWindow avow = new AdvancedVideoOptionsWindow(avo);
                 avow.ShowDialog();
                 if (avow.DialogResult == true)
                 {
                     int index = listBoxStreams.SelectedIndex;
                     titleList[comboBoxTitle.SelectedIndex].streams[index].advancedOptions =
                         new AdvancedVideoOptions(avow.advancedVideoOptions);
                     UpdateStreamList();
                     listBoxStreams.SelectedIndex = index;
                 }
             }
             else if (si.streamType == StreamType.Subtitle)
             {
                 AdvancedSubtitleOptions aso = null;
                 if (si.advancedOptions.GetType() != typeof(AdvancedSubtitleOptions))
                 {
                     aso = new AdvancedSubtitleOptions();
                 }
                 else
                 {
                     aso = new AdvancedSubtitleOptions(si.advancedOptions);
                 }
                 AdvancedSubtitleOptionsWindow asow = new AdvancedSubtitleOptionsWindow(aso);
                 asow.ShowDialog();
                 if (asow.DialogResult == true)
                 {
                     int index = listBoxStreams.SelectedIndex;
                     titleList[comboBoxTitle.SelectedIndex].streams[index].advancedOptions =
                         new AdvancedSubtitleOptions(asow.advancedSubtitleOptions);
                     UpdateStreamList();
                     listBoxStreams.SelectedIndex = index;
                 }
             }
         }
     }
     catch (Exception)
     {
     }
 }
 private void buttonEditAdvancedOptions_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (si.streamType == StreamType.Audio)
         {
             AdvancedAudioOptions aao = new AdvancedAudioOptions();
             if (si.advancedOptions != null && si.advancedOptions.GetType() == typeof(AdvancedAudioOptions)) aao = new AdvancedAudioOptions(si.advancedOptions);
             AdvancedAudioOptionsWindow aaow = new AdvancedAudioOptionsWindow(aao);                    
             aaow.ShowDialog();
             if (aaow.DialogResult == true)
             {
                 si.advancedOptions = new AdvancedAudioOptions(aaow.advancedAudioOptions);
                 UpdateStatusInfo();
             }
         }
         else if (si.streamType == StreamType.Video)
         {
             AdvancedVideoOptions avo = new AdvancedVideoOptions();                    
             if (si.advancedOptions != null && si.advancedOptions.GetType() == typeof(AdvancedVideoOptions)) avo = new AdvancedVideoOptions(si.advancedOptions);
             AdvancedVideoOptionsWindow avow = new AdvancedVideoOptionsWindow(avo);
             avow.ShowDialog();
             if (avow.DialogResult == true)
             {
                 si.advancedOptions = new AdvancedVideoOptions(avow.advancedVideoOptions);
                 UpdateStatusInfo();
             }
         }
         else if (si.streamType == StreamType.Subtitle)
         {
             AdvancedSubtitleOptions aso = new AdvancedSubtitleOptions();
             if (si.advancedOptions != null && si.advancedOptions.GetType() == typeof(AdvancedSubtitleOptions)) aso = new AdvancedSubtitleOptions(si.advancedOptions);
             AdvancedSubtitleOptionsWindow avow = new AdvancedSubtitleOptionsWindow(aso);
             avow.ShowDialog();
             if (avow.DialogResult == true)
             {
                 si.advancedOptions = new AdvancedSubtitleOptions(avow.advancedSubtitleOptions);
                 UpdateStatusInfo();
             }
         }
     }
     catch (Exception)
     {
     }
 }