示例#1
0
        public IDDCollarCrossRef()
        {
            InitializeComponent();
            MessageBox.Show("This functionality is not complete yet.", "RESULTS UNKNOWN AT THIS TIME");
            mp = new MethodParamFormFields(AnalysisMethod.COLLAR_DETECTOR_SAVE_RESTORE);

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            if (mp.HasMethod)
            {
                mp.imd = new INCCAnalysisParams.collar_rec((INCCAnalysisParams.collar_rec)mp.ams.GetMethodParameters(mp.am));
            }
            else
            {
                mp.imd = new INCCAnalysisParams.collar_rec(); // not mapped, so make a new one
                mp.imd.modified = true;

            }
            col = (INCCAnalysisParams.collar_rec)mp.imd;
            col.GenParamList();
            mp.RefreshMatTypeComboBox (MaterialTypeComboBox);
            //CrossReferenceFieldFiller(col);
        }
示例#2
0
        public IDDCollarCrossRef(INCCAnalysisParams.collar_combined_rec c = null, bool mod = false)
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.CollarAmLi);

            RelativeDoublesRateTextBox.ToValidate   = NumericTextBox.ValidateType.Float;
            RelativeDoublesRateTextBox.NumberFormat = NumericTextBox.Formatter.F3;

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;
            modified   = mod;
            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            mp.SelectMaterialType(MaterialTypeComboBox);
            if (mp.HasMethod && c == null)
            {
                mp.imd = new INCCAnalysisParams.collar_combined_rec((INCCAnalysisParams.collar_combined_rec)mp.ams.GetMethodParameters(mp.am));
                col    = (INCCAnalysisParams.collar_combined_rec)mp.imd;
            }
            else if (mp.HasMethod && c != null)
            {
                col = c;
            }
            else
            {
                mp.imd   = new INCCAnalysisParams.collar_combined_rec(); // not mapped, so make a new one
                col      = (INCCAnalysisParams.collar_combined_rec)mp.imd;
                modified = true;
            }

            CrossReferenceFieldFiller(col);
            this.TopMost = true;
        }
示例#3
0
        public IDDCorrectionFactors(INCCAnalysisParams.collar_combined_rec c, bool mod)
        {
            InitializeComponent();
            mp       = new MethodParamFormFields(AnalysisMethod.CollarAmLi);
            modified = mod;
            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            col = c;
            MaterialLabel.Text = mp.acq.item_type;
            ModeLabel.Text     = col.collar.collar_mode ? "Fast(Cd)" : "Thermal (no Cd)";
            DetectorLabel.Text = mp.det.Id.DetectorName;

            ATextBox.NumberFormat      = NumericTextBox.Formatter.E6;
            ATextBox.ToValidate        = NumericTextBox.ValidateType.Double;
            AErrorTextBox.NumberFormat = NumericTextBox.Formatter.E6;
            AErrorTextBox.ToValidate   = NumericTextBox.ValidateType.Double;
            BTextBox.NumberFormat      = NumericTextBox.Formatter.E6;
            BTextBox.ToValidate        = NumericTextBox.ValidateType.Double;
            BErrorTextBox.NumberFormat = NumericTextBox.Formatter.E6;
            BErrorTextBox.ToValidate   = NumericTextBox.ValidateType.Double;

            FillForm();
            this.TopMost = true;
        }
示例#4
0
        public IDDCollarCal()
        {
            InitializeComponent();
            MessageBox.Show("This functionality is not complete yet.", "RESULTS UNKNOWN AT THIS TIME");
            mp = new MethodParamFormFields(AnalysisMethod.Collar);

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            //mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            mp.SelectMaterialType(mp.acq.item_type);
            if (mp.HasMethod)
            {
                mp.imd = new INCCAnalysisParams.collar_rec((INCCAnalysisParams.collar_rec)mp.ams.GetMethodParameters(mp.am));
            }
            else
            {
                mp.imd = new INCCAnalysisParams.collar_rec(); // not mapped, so make a new one
                mp.imd.modified = true;
            }
            col = (INCCAnalysisParams.collar_rec)mp.imd;
            mp.cev = col.cev;
            mp.RefreshCurveEqComboBox(CurveTypeComboBox);
            CalibrationFieldFiller(col.cev);
        }
示例#5
0
        public IDDK5CollarItemData(bool suppressBackButton = false)
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.CollarAmLi);
            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            INCCAnalysisParams.collar_combined_rec inDB;

            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;
            }

            K5TextBox.ToValidate        = NumericTextBox.ValidateType.Double;
            K5TextBox.NumberFormat      = NumericTextBox.Formatter.E3;
            K5ErrorTextBox.ToValidate   = NumericTextBox.ValidateType.Double;
            K5ErrorTextBox.NumberFormat = NumericTextBox.Formatter.E3;
            K5TextBox.Value             = col.collar.sample_corr_fact.v;
            K5ErrorTextBox.Value        = col.collar.sample_corr_fact.err;

            for (int i = 0; i < INCCAnalysisParams.MAX_COLLAR_K5_PARAMETERS; i++)
            {
                if (col.k5.k5[i] != null)
                {
                    DataGridViewRow row = new DataGridViewRow();
                    row.CreateCells(dataGridView1);
                    dataGridView1.Rows.Add(new object[] { col.k5.k5_checkbox[i], col.k5.k5_label[i], col.k5.k5[i].v, col.k5.k5[i].err });
                }
            }
            k5TotalTextBox.Value    = total;
            k5TotalErrTextBox.Value = totalerr;
        }
示例#6
0
        public IDDCollarCrossRef(INCCAnalysisParams.collar_combined_rec c = null, bool mod = false)
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.Collar);

            RelativeDoublesRateTextBox.ToValidate = NumericTextBox.ValidateType.Float;
            RelativeDoublesRateTextBox.NumberFormat = NumericTextBox.Formatter.F3;

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;
            modified = mod;
            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            mp.SelectMaterialType(MaterialTypeComboBox);
            if (mp.HasMethod && c == null)
            {
                mp.imd = new INCCAnalysisParams.collar_combined_rec((INCCAnalysisParams.collar_combined_rec)mp.ams.GetMethodParameters(mp.am));
                col = (INCCAnalysisParams.collar_combined_rec)mp.imd;
            }
            else if (mp.HasMethod && c != null)
            {
                col = c;
            }
            else
            {
                mp.imd = new INCCAnalysisParams.collar_combined_rec(); // not mapped, so make a new one
                col = (INCCAnalysisParams.collar_combined_rec)mp.imd;
                modified = true;
            }

            CrossReferenceFieldFiller(col);
            this.TopMost = true;
        }
示例#7
0
        public IDDCollarCal()
        {
            InitializeComponent();
            MessageBox.Show("This functionality is not complete yet.", "RESULTS UNKNOWN AT THIS TIME");
            mp = new MethodParamFormFields(AnalysisMethod.Collar);

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            //mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            mp.SelectMaterialType(mp.acq.item_type);
            if (mp.HasMethod)
            {
                mp.imd = new INCCAnalysisParams.collar_rec((INCCAnalysisParams.collar_rec)mp.ams.GetMethodParameters(mp.am));
            }
            else
            {
                mp.imd          = new INCCAnalysisParams.collar_rec(); // not mapped, so make a new one
                mp.imd.modified = true;
            }
            col    = (INCCAnalysisParams.collar_rec)mp.imd;
            mp.cev = col.cev;
            mp.RefreshCurveEqComboBox(CurveTypeComboBox);
            CalibrationFieldFiller(col.cev);
        }
示例#8
0
        public IDDCorrectionFactors(INCCAnalysisParams.collar_combined_rec c, bool mod)
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.Collar);
            modified = mod;
            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            col = c;
            MaterialLabel.Text = mp.acq.item_type;
            ModeLabel.Text = col.collar.collar_mode ? "Fast(Cd)" : "Thermal (no Cd)";
            DetectorLabel.Text = mp.det.Id.DetectorName;

            ATextBox.NumberFormat = NumericTextBox.Formatter.E6;
            ATextBox.ToValidate = NumericTextBox.ValidateType.Double;
            AErrorTextBox.NumberFormat = NumericTextBox.Formatter.E6;
            AErrorTextBox.ToValidate = NumericTextBox.ValidateType.Double;
            BTextBox.NumberFormat = NumericTextBox.Formatter.E6;
            BTextBox.ToValidate = NumericTextBox.ValidateType.Double;
            BErrorTextBox.NumberFormat = NumericTextBox.Formatter.E6;
            BErrorTextBox.ToValidate = NumericTextBox.ValidateType.Double;

            FillForm();
            this.TopMost = true;
        }
示例#9
0
        public IDDActiveMultCal()
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.ActiveMultiplicity);

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;
            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
        }
示例#10
0
        public IDDActiveMultCal()
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.ActiveMultiplicity);

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;
            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);

        }
示例#11
0
        public IDDActivePassiveCal()
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.ActivePassive);

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            mp.RefreshCurveEqComboBox(CurveTypeComboBox);

            CalibrationFieldFiller(actpass.cev);
        }
示例#12
0
        public IDDActiveCal()
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.Active);

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            mp.RefreshCurveEqComboBox(CurveTypeComboBox);

            CalibrationFieldFiller(active.cev);
        }
示例#13
0
 public IDDKnownMCal()
 {
     InitializeComponent();
     mp = new MethodParamFormFields(AnalysisMethod.KnownM);
     Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
     this.Text += " for " + mp.det.Id.DetectorName;
     this.MaterialTypeComboBox.Items.Clear();
     foreach (INCCDB.Descriptor desc in NC.App.DB.Materials.GetList())
     {
         MaterialTypeComboBox.Items.Add(desc.Name);
     }
     MaterialTypeComboBox.SelectedItem = mp.acq.item_type;
 }
示例#14
0
 public IDDKnownMCal()
 {
     InitializeComponent();
     mp = new MethodParamFormFields(AnalysisMethod.KnownM);
     Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
     this.Text += " for " + mp.det.Id.DetectorName;
     this.MaterialTypeComboBox.Items.Clear();
     foreach (INCCDB.Descriptor desc in NC.App.DB.Materials.GetList())
     {
         MaterialTypeComboBox.Items.Add(desc.Name);
     }
     MaterialTypeComboBox.SelectedItem = mp.acq.item_type;
 }
示例#15
0
        public IDDKnownAlphaCal()
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.KnownA);
            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            mp.RefreshCurveEqComboBox(CurveTypeComboBox, known_alpha.ring_ratio);

            SetNumberFormats();
            FieldFiller(known_alpha.cev);
            FieldFiller();
        }
示例#16
0
        public IDDKnownAlphaCal()
        {
            InitializeComponent();
            mp = new MethodParamFormFields(AnalysisMethod.KnownA);
            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            mp.RefreshCurveEqComboBox(CurveTypeComboBox, known_alpha.ring_ratio);

            SetNumberFormats(); 
            FieldFiller(known_alpha.cev);
            FieldFiller(); 
        }
 public IDDTruncatedMultCalibration()
 {
     InitializeComponent();
     mp = new MethodParamFormFields(AnalysisMethod.TruncatedMultiplicity);
     Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
     this.Text += " for " + mp.det.Id.DetectorName;
     this.MaterialTypeComboBox.Items.Clear();
     foreach (INCCDB.Descriptor desc in NC.App.DB.Materials.GetList())
     {
         MaterialTypeComboBox.Items.Add(desc.Name);
     }
     MaterialTypeComboBox.SelectedItem = mp.acq.item_type;
     mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
     FieldFiller();
 }
示例#18
0
        public IDDCollarCal(INCCAnalysisParams.collar_combined_rec c, bool mod)
        {
            InitializeComponent();
            mp       = new MethodParamFormFields(AnalysisMethod.CollarAmLi);
            modified = mod;
            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            col    = c;
            mp.cev = col.collar.cev;
            mp.RefreshCurveEqComboBox(CurveTypeComboBox);
            CalibrationFieldFiller(col.collar.cev);
            SetHelp();
            this.TopMost = true;
        }
 public IDDTruncatedMultCalibration()
 {
     InitializeComponent();
     mp = new MethodParamFormFields(AnalysisMethod.TruncatedMultiplicity);
     Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
     this.Text += " for " + mp.det.Id.DetectorName;
     this.MaterialTypeComboBox.Items.Clear();
     foreach (INCCDB.Descriptor desc in NC.App.DB.Materials.GetList())
     {
         MaterialTypeComboBox.Items.Add(desc.Name);
     }
     MaterialTypeComboBox.SelectedItem = mp.acq.item_type;
     mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
     FieldFiller();
 }
示例#20
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();
            }
        }
示例#21
0
        public IDDCollarCrossRef()
        {
            InitializeComponent();
            MessageBox.Show("This functionality is not complete yet.", "RESULTS UNKNOWN AT THIS TIME");
            mp = new MethodParamFormFields(AnalysisMethod.COLLAR_DETECTOR_SAVE_RESTORE);

            Integ.GetCurrentAcquireDetectorPair(ref mp.acq, ref mp.det);
            this.Text += " for " + mp.det.Id.DetectorName;

            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            if (mp.HasMethod)
            {
                mp.imd = new INCCAnalysisParams.collar_rec((INCCAnalysisParams.collar_rec)mp.ams.GetMethodParameters(mp.am));
            }
            else
            {
                mp.imd          = new INCCAnalysisParams.collar_rec(); // not mapped, so make a new one
                mp.imd.modified = true;
            }
            col = (INCCAnalysisParams.collar_rec)mp.imd;
            col.GenParamList();
            mp.RefreshMatTypeComboBox(MaterialTypeComboBox);
            //CrossReferenceFieldFiller(col);
        }
示例#22
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();
            }
        }