Example #1
0
        private void OKBtn_Click(object sender, EventArgs e)
        {
            // radio change check
            if (!mp.imd.modified)
            {
                INCCAnalysisParams.multiplicity_rec chump = (INCCAnalysisParams.multiplicity_rec)mp.ams.GetMethodParameters(mp.am);
                mp.imd.modified = (chump != null && chump.solve_efficiency != mult.solve_efficiency);
            }
            switch (mult.solve_efficiency)
            {
            case INCCAnalysisParams.MultChoice.CONVENTIONAL_MULT:
                break;

            case INCCAnalysisParams.MultChoice.CONVENTIONAL_MULT_WEIGHTED:
                break;

            case INCCAnalysisParams.MultChoice.MULT_DUAL_ENERGY_MODEL:
                new IDDDualEnergyMult().ShowDialog();
                break;

            case INCCAnalysisParams.MultChoice.MULT_KNOWN_ALPHA:
                break;

            case INCCAnalysisParams.MultChoice.MULT_SOLVE_EFFICIENCY:
                break;
            }
            mp.Persist();
            this.Close();
        }
 private void OKBtn_Click(object sender, EventArgs e)
 {
     if (cct != cal_curve.CalCurveType)
     {
         mp.imd.modified = true;
     }
     mp.Persist();
     this.Close();
 }
Example #3
0
 private void OKBtn_Click(object sender, EventArgs e)
 {
     // radio change check
     if (!mp.imd.modified)
     {
         INCCAnalysisParams.multiplicity_rec chump = (INCCAnalysisParams.multiplicity_rec)mp.ams.GetMethodParameters(mp.am);
         mp.imd.modified = (chump != null && chump.solve_efficiency != mult.solve_efficiency);
     }
     mp.Persist();
     this.Close();
 }
Example #4
0
        private void OKBtn_Click(object sender, EventArgs e)
        {
            //if (cct != cal_curve.CalCurveType)
            //todo: probably should check for changes, but storing each time not super expensive hn 5.6.2015
            mp.imd.modified = true;
            known_alpha.cev.lower_mass_limit = LowerMassLimitTextBox.Value;
            known_alpha.cev.upper_mass_limit = UpperMassLimitTextBox.Value;
            known_alpha.cev.a     = ConventionalATextBox.Value;
            known_alpha.cev.b     = ConventionalBTextBox.Value;
            known_alpha.cev.var_a = VarianceATextBox.Value;
            known_alpha.cev.var_b = VarianceBTextBox.Value;

            known_alpha.cev.setcovar(Coeff.a, Coeff.b, CovarianceABTextBox.Value);

            known_alpha.cev.sigma_x = SigmaXTextBox.Value;

            known_alpha.heavy_metal_reference   = HvyMetalRefTextBox.Value;
            known_alpha.heavy_metal_corr_factor = HvyMetalWeightingTextBox.Value;
            known_alpha.alpha_wt = AlphaWeightTextBox.Value;
            known_alpha.rho_zero = RhoZeroTextBox.Value;
            known_alpha.k        = KTextBox.Value;

            if (ConventionalRadioButton.Checked == true)
            {
                known_alpha.known_alpha_type = INCCAnalysisParams.KnownAlphaVariant.Conventional;
            }
            else if (HeavyMetalRadioButton.Checked == true)
            {
                known_alpha.known_alpha_type = INCCAnalysisParams.KnownAlphaVariant.HeavyMetalCorrection;
            }
            else if (MoistureToDryAlphaRadioButton.Checked == true)
            {
                known_alpha.known_alpha_type = INCCAnalysisParams.KnownAlphaVariant.MoistureCorrAppliedToDryAlpha;
            }
            else if (MoistureToDoublesRadioButton.Checked == true)
            {
                known_alpha.known_alpha_type = INCCAnalysisParams.KnownAlphaVariant.MoistureCorrAppliedToMultCorrDoubles;
            }


            known_alpha.lower_corr_factor_limit = LowerAlphaLimitTextBox.Value;
            known_alpha.upper_corr_factor_limit = UpperAlphaLimitTextBox.Value;

            known_alpha.ring_ratio.a = MoistureATextBox.Value;
            known_alpha.ring_ratio.b = MoistureBTextBox.Value;
            known_alpha.ring_ratio.c = MoistureCTextBox.Value;
            known_alpha.ring_ratio.d = MoistureDTextBox.Value;

            known_alpha.modified = true;
            mp.ams.modified      = true;
            mp.Persist();
            this.Close();
        }
Example #5
0
        private void SaveChanges()
        {
            //Now using NumericTextBox
            //Save every time.
            mp.imd.modified         = true;
            mp.cev.modified         = true;
            mp.cev.lower_mass_limit = LowerMassLimitTextBox.Value;
            mp.cev.upper_mass_limit = UpperMassLimitTextBox.Value;
            mp.cev.a     = ATextBox.Value;
            mp.cev.b     = BTextBox.Value;
            mp.cev.c     = CTextBox.Value;
            mp.cev.d     = DTextBox.Value;
            mp.cev.var_a = VarianceATextBox.Value;
            mp.cev.var_b = VarianceBTextBox.Value;
            mp.cev.var_c = VarianceCTextBox.Value;
            mp.cev.var_d = VarianceDTextBox.Value;
            mp.cev.setcovar(Coeff.a, Coeff.b, CovarianceABTextBox.Value);
            mp.cev.setcovar(Coeff.a, Coeff.c, CovarianceACTextBox.Value);
            mp.cev.setcovar(Coeff.a, Coeff.d, CovarianceADTextBox.Value);
            mp.cev.setcovar(Coeff.b, Coeff.c, CovarianceBCTextBox.Value);
            mp.cev.setcovar(Coeff.b, Coeff.d, CovarianceBDTextBox.Value);
            mp.cev.setcovar(Coeff.c, Coeff.d, CovarianceCDTextBox.Value);
            mp.cev.sigma_x            = SigmaXTextBox.Value;
            mp.cev.lower_mass_limit   = LowerMassLimitTextBox.Value;
            mp.cev.upper_mass_limit   = UpperMassLimitTextBox.Value;
            mp.cev.useSingles         = SinglesForMassRadioButton.Checked;
            mp.cev.cal_curve_equation = (INCCAnalysisParams.CurveEquation)CurveTypeComboBox.SelectedIndex;

            if (HeavyMetalRadioButton.Checked)
            {
                cal_curve.heavy_metal_corr_factor = HvyMetalWeightingTextBox.Value;
                cal_curve.heavy_metal_reference   = HvyMetalRefTextBox.Value;
                cal_curve.CalCurveType            = INCCAnalysisParams.CalCurveType.HM;
            }
            else if (PassiveUraniumRadioButton.Checked)
            {
                cal_curve.CalCurveType = INCCAnalysisParams.CalCurveType.U;
                cal_curve.percent_u235 = U235PercentTextBox.Value;
            }
            else
            {
                cal_curve.CalCurveType = INCCAnalysisParams.CalCurveType.STD;
            }
            mp.Persist();
        }
Example #6
0
        private void SaveParamsToDb()
        {
            mp = new MethodParamFormFields(AnalysisMethod.CollarAmLi);
            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            INCCAnalysisParams.collar_combined_rec inDB;

            if (!string.IsNullOrEmpty(col.k5.k5_item_type) &&                     // not null
                string.Compare(col.k5.k5_item_type, mp.acq.item_type, true) != 0) // and not the same string
            {
                modified = true;
            }
            if (modified)
            {
                if (mp.HasMethod)
                {
                    mp.imd = new INCCAnalysisParams.collar_combined_rec((INCCAnalysisParams.collar_combined_rec)mp.ams.GetMethodParameters(mp.am));
                    inDB   = (INCCAnalysisParams.collar_combined_rec)mp.imd;
                    inDB.GenParamList();
                    if (!string.IsNullOrEmpty(col.k5.k5_item_type))
                    {
                        mp.acq.item_type = col.k5.k5_item_type;
                    }
                }
                else
                {
                    mp.imd          = new INCCAnalysisParams.collar_combined_rec(); // not mapped, so make a new one
                    mp.imd.modified = true;
                    inDB            = (INCCAnalysisParams.collar_combined_rec)mp.imd;
                    inDB.GenParamList();
                    if (!string.IsNullOrEmpty(col.k5.k5_item_type))
                    {
                        mp.acq.item_type = col.k5.k5_item_type;
                    }
                }

                col.k5.CopyTo(inDB.k5);
                inDB.k5.modified = true;
                mp.Persist();
            }
        }
Example #7
0
 private void OKBtn_Click(object sender, EventArgs e)
 {
     mp.Persist();
     this.Close();
 }
Example #8
0
        private void SaveParamsToDb()
        {
            mp = new MethodParamFormFields(AnalysisMethod.Collar);
            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            INCCAnalysisParams.collar_combined_rec inDB;

            if (!string.IsNullOrEmpty(col.k5.k5_item_type) &&  // not null
                string.Compare(col.k5.k5_item_type, mp.acq.item_type, true) != 0)  // and not the same string
            {
                modified = true;
            }
            if (modified)
            {
                if (mp.HasMethod)
                {
                    mp.imd = new INCCAnalysisParams.collar_combined_rec((INCCAnalysisParams.collar_combined_rec)mp.ams.GetMethodParameters(mp.am));
                    inDB = (INCCAnalysisParams.collar_combined_rec)mp.imd;
                    inDB.GenParamList();
                    if (!string.IsNullOrEmpty(col.k5.k5_item_type))
                        mp.acq.item_type = col.k5.k5_item_type;
                }
                else
                {
                    mp.imd = new INCCAnalysisParams.collar_combined_rec(); // not mapped, so make a new one
                    mp.imd.modified = true;
                    inDB = (INCCAnalysisParams.collar_combined_rec)mp.imd;
                    inDB.GenParamList();
                    if (!string.IsNullOrEmpty(col.k5.k5_item_type))
                        mp.acq.item_type = col.k5.k5_item_type;
                }

                col.k5.CopyTo(inDB.k5);
                inDB.k5.modified = true;
                mp.Persist();
            }
        }