private void ClearCalculationTextboxes()
        {
            TextboxHelpers.ClearTextBox(ref txtTmax2);
            TextboxHelpers.ClearTextBox(ref txtTmin2);
            TextboxHelpers.ClearTextBox(ref txtAltitude2);
            TextboxHelpers.ClearTextBox(ref txtTmaxA);
            TextboxHelpers.ClearTextBox(ref txtTminA);

            TextboxHelpers.ClearTextBox(ref txtDesignLife2);
            TextboxHelpers.ClearTextBox(ref txtP);
            TextboxHelpers.ClearTextBox(ref txtTmaxADL);
            TextboxHelpers.ClearTextBox(ref txtTminADL);

            TextboxHelpers.ClearTextBox(ref txtType2);
            TextboxHelpers.ClearTextBox(ref txtTemax);
            TextboxHelpers.ClearTextBox(ref txtTemin);
            TextboxHelpers.ClearTextBox(ref txtSurfacing2);
            TextboxHelpers.ClearTextBox(ref txtTemaxadj);
            TextboxHelpers.ClearTextBox(ref txtTeminadj);

            TextboxHelpers.ClearTextBox(ref txtTNexp);
            TextboxHelpers.ClearTextBox(ref txtTNcon);

            TextboxHelpers.ClearTextBox(ref txtTemaxadj2);
            TextboxHelpers.ClearTextBox(ref txtTeminadj2);
            TextboxHelpers.ClearTextBox(ref txtT02);
            TextboxHelpers.ClearTextBox(ref txtTNexp);
            TextboxHelpers.ClearTextBox(ref txtTNcon);

            TextboxHelpers.ClearTextBox(ref txtLength2);
            TextboxHelpers.ClearTextBox(ref txtAlpha2);

            TextboxHelpers.ClearTextBox(ref txtVxexp);
            TextboxHelpers.ClearTextBox(ref txtVxcon);
            TextboxHelpers.ClearTextBox(ref txtTol);

            TextboxHelpers.ClearTextBox(ref txtVxexpULS);
            TextboxHelpers.ClearTextBox(ref txtVxconULS);
            TextboxHelpers.ClearTextBox(ref txtVxexpSLS);
            TextboxHelpers.ClearTextBox(ref txtVxconSLS);
        }
        private BearingDesignDisplacements ReturnBearingDesignDisplacemetnsObjectFromTBInputs()
        {
            //Convert input boxes to variables and use try-catch to check for illegal input.
            double Tmax               = TextboxHelpers.TextBoxToDouble(txtTmax);
            double Tmin               = TextboxHelpers.TextBoxToDouble(txtTmin);
            double T0                 = TextboxHelpers.TextBoxToDouble(txtT0);
            double Altitude           = TextboxHelpers.TextBoxToDouble(txtAltitude);
            double SurfacingThickness = TextboxHelpers.TextBoxToDouble(txtSurfacing);
            double L = TextboxHelpers.TextBoxToDouble(txtLength) * 1000;  //Convert to mm

            double DesignLife = TextboxHelpers.TextBoxToDouble(txtDesignLife);
            double alpha      = TextboxHelpers.TextBoxToDouble(txtAlpha);
            double k1         = TextboxHelpers.TextBoxToDouble(txtK1);
            double k2         = TextboxHelpers.TextBoxToDouble(txtK2);
            double k3         = TextboxHelpers.TextBoxToDouble(txtK3);
            double k4         = TextboxHelpers.TextBoxToDouble(txtK4);
            double yQ         = TextboxHelpers.TextBoxToDouble(txtGammaQ);

            //Instantiate instance of BearingDesignDisplacements object
            BearingDesignDisplacements b = new BearingDesignDisplacements()
            {
                Alpha              = alpha,
                DesignLife         = DesignLife,
                Altitude           = Altitude,
                L                  = L,
                SurfacingThickness = SurfacingThickness,
                T0                 = T0,
                Tmax               = Tmax,
                Tmin               = Tmin,
                K1                 = k1,
                K2                 = k2,
                K3                 = k3,
                K4                 = k4,
                yQ                 = yQ
            };

            return(b);
        }