private void buttonCopyInsert_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int index = listBoxEncodingProfiles.SelectedIndex;
                if (index > -1)
                {
                    EncodingSettings es = new EncodingSettings(settings.encodingSettings[index]);
                    es.desc = "Copy " + es.desc;
                    settings.encodingSettings.Add(es);
                    UpdateEncodingProfile();

                    EditEncodingProfileWindow eepw = new EditEncodingProfileWindow(settings.encodingSettings[settings.encodingSettings.Count - 1]);
                    eepw.ShowDialog();
                    if (eepw.DialogResult == true)
                    {
                        settings.encodingSettings[settings.encodingSettings.Count - 1] = new EncodingSettings(eepw.encodingSettings);
                        UpdateEncodingProfile();
                        listBoxEncodingProfiles.SelectedIndex = settings.encodingSettings.Count - 1;
                    }
                    else
                    {
                        settings.encodingSettings.RemoveAt(settings.encodingSettings.Count - 1);
                        UpdateEncodingProfile();
                    }
                }
            }
            catch (Exception)
            {
            }
        }
 private void buttonProfileAdd_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         EncodingSettings es = new EncodingSettings();
         es.desc = Global.Res("NewEncodingProfileDesc");
         EditEncodingProfileWindow eepw = new EditEncodingProfileWindow(es);
         eepw.ShowDialog();
         if (eepw.DialogResult == true)
         {
             settings.encodingSettings.Add(eepw.encodingSettings);
             UpdateEncodingProfile();
         }
     }
     catch (Exception)
     {
     }
 }
 private void listBoxEncodingProfiles_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         int index = listBoxEncodingProfiles.SelectedIndex;
         if (index > -1)
         {
             EditEncodingProfileWindow eepw = new EditEncodingProfileWindow(settings.encodingSettings[index]);
             eepw.ShowDialog();
             if (eepw.DialogResult == true)
             {
                 settings.encodingSettings[index] = new EncodingSettings(eepw.encodingSettings);
                 UpdateEncodingProfile();
                 listBoxEncodingProfiles.SelectedIndex = index;
             }
         }
     }
     catch (Exception)
     {
     }
 }
 private void listBoxEncodingProfiles_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         int index = listBoxEncodingProfiles.SelectedIndex;
         if (index > -1)
         {
             EditEncodingProfileWindow eepw = new EditEncodingProfileWindow(settings.encodingSettings[index]);
             eepw.ShowDialog();
             if (eepw.DialogResult == true)
             {
                 settings.encodingSettings[index] = new EncodingSettings(eepw.encodingSettings);
                 UpdateEncodingProfile();
                 listBoxEncodingProfiles.SelectedIndex = index;
             }
         }
     }
     catch (Exception)
     {
     }
 }
        private void buttonCopyInsert_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                int index = listBoxEncodingProfiles.SelectedIndex;
                if (index > -1)
                {
                    EncodingSettings es = new EncodingSettings(settings.encodingSettings[index]);
                    es.desc = "Copy " + es.desc;
                    settings.encodingSettings.Add(es);
                    UpdateEncodingProfile();

                    EditEncodingProfileWindow eepw = new EditEncodingProfileWindow(settings.encodingSettings[settings.encodingSettings.Count - 1]);
                    eepw.ShowDialog();
                    if (eepw.DialogResult == true)
                    {
                        settings.encodingSettings[settings.encodingSettings.Count - 1] = new EncodingSettings(eepw.encodingSettings);
                        UpdateEncodingProfile();
                        listBoxEncodingProfiles.SelectedIndex = settings.encodingSettings.Count - 1;
                    }
                    else
                    {
                        settings.encodingSettings.RemoveAt(settings.encodingSettings.Count - 1);
                        UpdateEncodingProfile();
                    }
                }
            }
            catch (Exception)
            {
            }
        }
 private void buttonProfileAdd_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         EncodingSettings es = new EncodingSettings();
         es.desc = Global.Res("NewEncodingProfileDesc");
         EditEncodingProfileWindow eepw = new EditEncodingProfileWindow(es);
         eepw.ShowDialog();
         if (eepw.DialogResult == true)
         {
             settings.encodingSettings.Add(eepw.encodingSettings);
             UpdateEncodingProfile();
         }
     }
     catch (Exception)
     {
     }
 }