private void ProteaseSpecificUpdate(object sender, SelectionChangedEventArgs e)
        {
            string proteaseName = ((Protease)ProteaseComboBox.SelectedItem).Name;

            MissedCleavagesTextBox.IsEnabled = !proteaseName.Equals("top-down");

            if (AutomaticallyAskAndOrUpdateParametersBasedOnProtease)
            {
                switch (proteaseName)
                {
                case "non-specific":
                    if (UpdateGUISettings.UseNonSpecificRecommendedSettings())
                    {
                        MaxPeptideLengthTextBox.Text = "25";
                    }
                    break;

                case "top-down":
                    if (UpdateGUISettings.UseTopDownRecommendedSettings())
                    {
                        //many variables are not present in the calibrate task gui, but we modify them when saving
                        //uncheck all variable mods
                        foreach (var mod in VariableModTypeForTreeViewObservableCollection)
                        {
                            mod.Use = false;
                        }
                    }
                    break;

                case "Arg-C":
                    if (UpdateGUISettings.UseArgCRecommendedSettings())
                    {
                        ProteaseComboBox.SelectedItem = ProteaseDictionary.Dictionary["trypsin"];
                    }
                    break;

                case "chymotrypsin (don't cleave before proline)":
                case "chymotrypsin (cleave before proline)":
                {
                    if (UpdateGUISettings.UseChymotrypsinRecommendedSettings())
                    {
                        MissedCleavagesTextBox.Text = "3";
                    }
                }
                break;

                case "elastase":
                {
                    if (UpdateGUISettings.UseElastaseRecommendedSettings())
                    {
                        MissedCleavagesTextBox.Text = "16";
                    }
                }
                break;

                //nothing to change for semi-trypsin
                default:
                    break;
                }
            }
        }
        private void ProteaseSpecificUpdate(object sender, SelectionChangedEventArgs e)
        {
            string proteaseName = ((Protease)ProteaseComboBox.SelectedItem).Name;

            MissedCleavagesTextBox.IsEnabled = !proteaseName.Equals("top-down");

            if (AutomaticallyAskAndOrUpdateParametersBasedOnProtease)
            {
                switch (proteaseName)
                {
                case "non-specific":
                    if (UpdateGUISettings.UseNonSpecificRecommendedSettings())
                    {
                        MaxPeptideLengthTextBox.Text = "25";
                    }
                    break;

                case "top-down":
                    if (UpdateGUISettings.UseTopDownRecommendedSettings())
                    {
                        UseProvidedPrecursor.IsChecked = false;
                        DeconvolutionMaxAssumedChargeStateTextBox.Text = "60";
                        TrimMsMs.IsChecked = false;
                        //uncheck all variable mods
                        foreach (var mod in VariableModTypeForTreeViewObservableCollection)
                        {
                            mod.Use = false;
                        }

                        //clear GPTMD mods and replace them with a subset
                        foreach (var mod in GptmdModTypeForTreeViewObservableCollection)
                        {
                            mod.Use = false;
                        }
                        //populate the recommended mods
                        foreach (var mod in UpdateGUISettings.TopDownModsForGPTMD)
                        {
                            ModTypeForTreeView theModType = GptmdModTypeForTreeViewObservableCollection.FirstOrDefault(b => b.DisplayName.Equals(mod.Item1));
                            if (theModType != null)
                            {
                                var theMod = theModType.Children.FirstOrDefault(b => b.ModName.Equals(mod.Item2));
                                if (theMod != null)
                                {
                                    theMod.Use = true;
                                }
                            }
                        }
                    }
                    break;

                case "Arg-C":
                    if (UpdateGUISettings.UseArgCRecommendedSettings())
                    {
                        ProteaseComboBox.SelectedItem = ProteaseDictionary.Dictionary["trypsin"];
                    }
                    break;

                case "chymotrypsin (don't cleave before proline)":
                case "chymotrypsin (cleave before proline)":
                {
                    if (UpdateGUISettings.UseChymotrypsinRecommendedSettings())
                    {
                        MissedCleavagesTextBox.Text = "3";
                    }
                }
                break;

                case "elastase":
                {
                    if (UpdateGUISettings.UseElastaseRecommendedSettings())
                    {
                        MissedCleavagesTextBox.Text = "16";
                    }
                }
                break;

                //nothing to change for semi-trypsin
                default:
                    break;
                }
            }
        }