private bool ModelChooserUI(double[] ParamArray, double[] ChiSquareArray, double[] CovarArray, double[] info, int size, int paramcount, BoxModelSettings InfoStruct)
        {
            StochOutputWindow outwin = new StochOutputWindow(ParamArray, size, paramcount, ChiSquareArray, CovarArray, info, ReflCalc);


            if (outwin.ShowDialog() != DialogResult.Cancel)
            {
                outwin.GetParameters(ReflCalc);
                return(true);
            }
            else
            {
                return(false);
            }
        }
        private void PreviousFitListTB_Click(object sender, EventArgs e)
        {
            if (ErrorWindow != null)
            {
                if (ErrorWindow.ShowDialog() == DialogResult.OK)
                {
                    ErrorWindow.GetParameters(ReflCalc);
                }

                ReflCalc.UpdateProfile();
            }
            else
            {
                MessageBox.Show("No fitting has been performed");
            }
        }