private bool CheckType(object sender, ref INCCAnalysisParams.CuriumRatioVariant type)
        {
            bool modified = false;

            if (((RadioButton)sender).Checked)
            {
                switch (((RadioButton)sender).Text)
                {
                case "Use singles to calculate mass":
                    modified = (INCCAnalysisParams.CuriumRatioVariant.UseSingles != type);
                    if (modified)
                    {
                        type = INCCAnalysisParams.CuriumRatioVariant.UseSingles;
                    }
                    break;

                case "Use doubles to calculate mass":
                    modified = (INCCAnalysisParams.CuriumRatioVariant.UseDoubles != type);
                    if (modified)
                    {
                        type = INCCAnalysisParams.CuriumRatioVariant.UseDoubles;
                    }
                    break;

                case "UseAddASourceRadioButton":
                    modified = (INCCAnalysisParams.CuriumRatioVariant.UseAddASourceDoubles != type);
                    if (modified)
                    {
                        type = INCCAnalysisParams.CuriumRatioVariant.UseAddASourceDoubles;
                    }
                    break;
                }
            }
            return(modified);
        }
 private void UseAddASourceRadioButton_CheckedChanged(object sender, EventArgs e)
 {
     INCCAnalysisParams.CuriumRatioVariant type = cm_ratio.curium_ratio_type;
     if (CheckType((RadioButton)sender, ref type))
     {
         cm_ratio.curium_ratio_type = type;
         cm_ratio.modified          = true;
     }
 }