예제 #1
0
        public string[] resultList()
        {
            if (BasicDia < 0.5 & NoCoating == "Yes")
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                      System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "MAJOR DIA.  " + MajorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MajorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture),

                    "\r\n",
                    "EFF. DIA.   " + EffectiveMax.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMin.ToString("#.##00",                System.Globalization.CultureInfo.InvariantCulture),

                    "\r\n",
                    "MINOR DIA.  " + MinorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture),
                };

                return(list);
            }
            else if (BasicDia < 0.5 & CoatingPS309 == "Yes") // Off 9 thou
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                      System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "BEFORE COATING:",

                    "\r\n",
                    "MAJOR DIA.  " + MajorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MajorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "EFF. DIA.   " + EffectiveMax.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMin.ToString("#.##00",                System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "MINOR DIA.  " + MinorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",
                };

                return(list);
            }
            else if (BasicDia < 0.5 & CoatingOther == "Yes") // off 4 thou
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                      System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "BEFORE COATING:",

                    "\r\n",
                    "MAJOR DIA.  " + MajorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MajorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "EFF. DIA.   " + EffectiveMax.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMin.ToString("#.##00",                System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "MINOR DIA.  " + MinorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",
                };

                return(list);
            }
            else if (BasicDia >= 0.5 & NoCoating == "Yes")
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                      System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "MAJOR DIA.  " + MajorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MajorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "EFF. DIA.   " + EffectiveMax.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " -  " + EffectiveMin.ToString("#.##00",               System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "MINOR DIA.   " + MinorMax.ToString("#.##00",    System.Globalization.CultureInfo.InvariantCulture) + " -  " + MinorMin.ToString("#.##00",                   System.Globalization.CultureInfo.InvariantCulture) + " SPL",
                };

                return(list);
            }
            else if (BasicDia >= 0.5 & CoatingPS309 == "Yes") // off 9 thou
            {
                string[] list1 =
                {
                    BasicDia.ToString("#.##00",                             System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "BEFORE COATING:",

                    "\r\n",
                    "MAJOR DIA.  " + "  " + MajorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MajorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "EFF. DIA.   " + "  " + EffectiveMax.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMin.ToString("#.##00",                System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "MINOR DIA.  " + "  " + MinorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",
                };

                return(list1);
            }
            else if (BasicDia >= 0.5 & CoatingOther == "Yes") // Off 4 thou
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                      System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "BEFORE COATING:",

                    "\r\n",
                    "MAJOR DIA.  " + MajorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MajorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "EFF. DIA.   " + EffectiveMax.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMin.ToString("#.##00",                System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "MINOR DIA.  " + MinorMax.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMin.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",
                };

                return(list);
            }
            else
            {
                string[] list =
                {
                    "0.0000" + "-" + "00" + " " + "None" + "-" + "None" + ", None",

                    "\r\n",
                    "MAJOR DIA.        " + "0.0000" + " - " + "0.0000",

                    "\r\n",
                    "EFF. DIA.              " + "0.0000" + " - " + "0.0000",

                    "\r\n",
                    "MINOR DIA.        " + "0.0000" + " - " + "0.0000",
                };

                return(list);
            }
        }
예제 #2
0
        public string[] resultList()
        {
            if (BasicDia < 0.5 & NoCoating == "Yes") // corrected after the user pointed out that the code above was wrong - displayed allowance for coating
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                          System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "MINOR DIA.  " + MinorMin.ToString("#.##00",         System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMax.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "EFF. DIA.   " + EffectiveMin_B().ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMax_B().ToString("#.##00",            System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "MAJOR DIA.  " + MajorMin_B().ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " MIN." + " SPL",
                };

                return(list);
            }
            else if (BasicDia < 0.5 & CoatingPS309 == "Yes") // Off 2 thou
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                          System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "BEFORE COATING:",

                    "\r\n",
                    "MINOR DIA.  " + MinorMin.ToString("#.##00",         System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMax.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "EFF. DIA.   " + EffectiveMin_B().ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMax_B().ToString("#.##00",            System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "MAJOR DIA.  " + MajorMin_B().ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " MIN." + " SPL",
                };

                return(list);
            }
            else if (BasicDia < 0.5 & CoatingOther == "Yes") // Off 2 thou
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                          System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "BEFORE COATING:",

                    "\r\n",
                    "MINOR DIA.  " + MinorMin.ToString("#.##00",         System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMax.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "EFF. DIA.   " + EffectiveMin_B().ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMax_B().ToString("#.##00",            System.Globalization.CultureInfo.InvariantCulture) + " SPL",

                    "\r\n",
                    "MAJOR DIA.  " + MajorMin_B().ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " MIN." + " SPL",
                };

                return(list);
            }
            else if (BasicDia >= 0.5 & NoCoating == "Yes")
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                       System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "MINOR DIA.   " + MinorMin.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMax.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture),

                    "\r\n",
                    "EFF. DIA.    " + EffectiveMin.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMax.ToString("#.##00",                System.Globalization.CultureInfo.InvariantCulture),

                    "\r\n",
                    "MAJOR DIA.  " + MajorMin.ToString("#.##00",      System.Globalization.CultureInfo.InvariantCulture) + "  " + "MIN.",
                };

                return(list);
            }
            else if (BasicDia >= 0.5 & CoatingPS309 == "Yes")
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                       System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "BEFORE COATING:",

                    "\r\n",
                    "MINOR DIA.   " + MinorMin.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMax.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture),

                    "\r\n",
                    "EFF. DIA.    " + EffectiveMin.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMax.ToString("#.##00",                System.Globalization.CultureInfo.InvariantCulture),

                    "\r\n",
                    "MAJOR DIA.  " + MajorMin.ToString("#.##00",      System.Globalization.CultureInfo.InvariantCulture) + "  " + "MIN.",
                };

                return(list);
            }
            else if (BasicDia >= 0.5 & CoatingOther == "Yes")
            {
                string[] list =
                {
                    BasicDia.ToString("#.##00",                       System.Globalization.CultureInfo.InvariantCulture) + "-" + TPI + " " + Design.GetDesignationModel(BasicDia, TPI) + "-" + ClassThread + ", BS1580",

                    "\r\n",
                    "BEFORE COATING:",

                    "\r\n",
                    "MINOR DIA.   " + MinorMin.ToString("#.##00",     System.Globalization.CultureInfo.InvariantCulture) + " - " + MinorMax.ToString("#.##00",                    System.Globalization.CultureInfo.InvariantCulture),

                    "\r\n",
                    "EFF. DIA.    " + EffectiveMin.ToString("#.##00", System.Globalization.CultureInfo.InvariantCulture) + " - " + EffectiveMax.ToString("#.##00",                System.Globalization.CultureInfo.InvariantCulture),

                    "\r\n",
                    "MAJOR DIA.  " + MajorMin.ToString("#.##00",      System.Globalization.CultureInfo.InvariantCulture) + "  " + "MIN.",
                };

                return(list);
            }
            else
            {
                string[] list =
                {
                    "0.0000" + "-" + "00" + " " + "None" + "-" + "None" + ", None",

                    "\r\n",
                    "MINOR DIA.  " + "0.0000" + " - " + "0.0000",

                    "\r\n",
                    "EFF. DIA.   " + "0.0000" + " - " + "0.0000",

                    "\r\n",
                    "MAJOR DIA.  " + "0.0000" + " - " + "0.0000",
                };

                return(list);
            }
        }