/// <summary>
        /// Load spiral parameters from input textboxes and verify they are correct
        /// </summary>
        /// <returns>spiral parameters<</returns>
        public SpiralParameters GetSpiralParametres()
        {
            if (areParametersPhysical)
            {
                double wallWidth  = Convert.ToDouble(textBoxWidthWall.Text, CultureInfo.InvariantCulture);
                double spaceWidth = Convert.ToDouble(textBoxWidthStructure.Text, CultureInfo.InvariantCulture);
                double depth      = Convert.ToDouble(textBoxLength.Text, CultureInfo.InvariantCulture);
                double innerSize  = Convert.ToDouble(textBoxInnerDiameter.Text, CultureInfo.InvariantCulture);
                double outerSize  = Convert.ToDouble(textBoxOuterDiameter.Text, CultureInfo.InvariantCulture);
                if (!(Validator.ValidNumber(wallWidth) && Validator.ValidNumber(spaceWidth) && Validator.ValidNumber(depth) && Validator.ValidNumber(innerSize) && Validator.ValidNumber(outerSize)))
                {
                    return(null);
                }

                double climb = ConvertorOfParametres.CountClimb(spaceWidth, wallWidth);
                double move  = ConvertorOfParametres.CountMove(innerSize, wallWidth, climb);
                double turns = ConvertorOfParametres.CountTurns(climb, wallWidth, outerSize, move);
                double circ  = ConvertorOfParametres.CountCircumference(move, climb, turns);
                return(new SpiralParameters(move, climb, depth, circ, wallWidth));
            }
            double           move1         = Convert.ToDouble(textBoxWidthWall.Text, CultureInfo.InvariantCulture);
            double           climb1        = Convert.ToDouble(textBoxWidthStructure.Text, CultureInfo.InvariantCulture);
            double           depth1        = Convert.ToDouble(textBoxLength.Text, CultureInfo.InvariantCulture);
            double           circumference = Convert.ToDouble(textBoxInnerDiameter.Text, CultureInfo.InvariantCulture);
            double           wallWidth1    = Convert.ToDouble(textBoxOuterDiameter.Text, CultureInfo.InvariantCulture);
            SpiralParameters sp            = new SpiralParameters(move1, climb1, depth1, circumference, wallWidth1);

            if (!Validator.ValidSpiral(sp))
            {
                return(null);
            }
            return(sp);
        }
        /// <summary>
        /// Load pipe parameters from input textboxes and verify they are correct
        /// </summary>
        /// <returns>pipe parameters</returns>
        public CylinderParameters GetPipeParametres()
        {
            double depth = Convert.ToDouble(textBoxLength.Text);

            if (areParametersPhysical)
            {
                double innerSize = Convert.ToDouble(textBoxInnerDiameter.Text, CultureInfo.InvariantCulture);
                double outerSize = Convert.ToDouble(textBoxOuterDiameter.Text, CultureInfo.InvariantCulture);
                double circ      = ConvertorOfParametres.CircumferenceOfTheCircle(innerSize, outerSize); //count circumference of a circle
                double height    = (outerSize - innerSize) / 2;
                return(new CylinderParameters(depth, circ, height));
            }
            double             circumference = Convert.ToDouble(textBoxInnerDiameter.Text, CultureInfo.InvariantCulture);
            double             wallWidth1    = Convert.ToDouble(textBoxOuterDiameter.Text, CultureInfo.InvariantCulture);
            CylinderParameters pp            = new CylinderParameters(depth, circumference, wallWidth1);

            if (!Validator.ValidPipe(pp))
            {
                return(null);
            }
            return(pp);
        }