예제 #1
0
        // NEXT: create new method calib param entry if not found for curve/mtl type/det? Verify

        private void button1_Click(object sender, EventArgs e)
        {
            // dialog that opens a DMR file, and loads the resulting values into a coeff instance
            OpenFileDialog aDlg = new OpenFileDialog();

            aDlg.CheckFileExists  = true;
            aDlg.FileName         = "Deming.dmr";
            aDlg.Filter           = "DMR files (*.dmr)|*.dmr|All files (*.*)|*.*";
            aDlg.DefaultExt       = ".dmr";
            aDlg.InitialDirectory = N.App.AppContext.FileInput;
            aDlg.Title            = "Select a Deming results file";
            aDlg.Multiselect      = false;
            aDlg.RestoreDirectory = true;
            DialogResult c645 = aDlg.ShowDialog();

            if (c645 == DialogResult.OK)
            {
                NCCFile.CoefficientFile onefile = new NCCFile.CoefficientFile();
                string path = System.IO.Path.GetFullPath(aDlg.FileName);
                onefile.Process(path);
                CurveEquation = (INCCAnalysisParams.CurveEquation)CurveTypeComboBox.SelectedIndex;
                EqCoeffViewer c = new EqCoeffViewer(onefile.Coefficients, CurveEquation, CalcDataList);
                c.SetMatAlgLabel(Material, AnalysisMethod);
                if (c.ShowDialog() == DialogResult.OK)
                {
                    ApplyCoefficients(c.Coefficients, c.CalcDataList);                      // apply Coefficients, lower and upper limits, and data point array to the currently selected analysis method
                }
            }
        }
예제 #2
0
 // NEXT: create new method calib param entry if not found for curve/mtl type/det? Verify
 private void button1_Click(object sender, EventArgs e)
 {
     // dialog that opens a DMR file, and loads the resulting values into a coeff instance
     OpenFileDialog aDlg =  new OpenFileDialog();
     aDlg.CheckFileExists = true;
     aDlg.FileName = "Deming.dmr";
     aDlg.Filter = "DMR files (*.dmr)|*.dmr|All files (*.*)|*.*";
     aDlg.DefaultExt = ".dmr";
     aDlg.InitialDirectory = N.App.AppContext.FileInput;
     aDlg.Title = "Select a Deming results file";
     aDlg.Multiselect = false;
     aDlg.RestoreDirectory = true;
     DialogResult c645 = aDlg.ShowDialog();
     if (c645 == DialogResult.OK)
     {
         NCCFile.CoefficientFile onefile = new NCCFile.CoefficientFile();
         string path = System.IO.Path.GetFullPath(aDlg.FileName);
         onefile.Process(path);
         CurveEquation = (INCCAnalysisParams.CurveEquation)CurveTypeComboBox.SelectedIndex;
         EqCoeffViewer c = new EqCoeffViewer(onefile.Coefficients, CurveEquation, CalcDataList);
         c.SetMatAlgLabel(Material, AnalysisMethod);
         if (c.ShowDialog() == DialogResult.OK)
             ApplyCoefficients(c.Coefficients, c.CalcDataList);  // apply Coefficients, lower and upper limits, and data point array to the currently selected analysis method
     }
 }