private void HideAll()
        {
            frmFOOTPRINTPedotransferInput input = this;

            input.grpAdditionalInput.Visible = false;
            input.grpIntroduction.Visible    = false;
            input.grpLandUse.Visible         = false;
            input = null;
        }
Beispiel #2
0
        private static bool DepthRestriction(int horizon, frmFOOTPRINTPedotransferInput frm)
        {
            int num3  = horizon - 1;
            int index = 1;

            while (true)
            {
                float num2;
                int   num4 = num3;
                if (index > num4)
                {
                    num2 = Conversions.ToSingle(Operators.AddObject(num2, Operators.DivideObject(GlobalVariables.thickness[horizon], 2)));
                    return(!(((num2 > UpperLimit()) & (num2 < LowerLimit())) & ((LowerLimit() - UpperLimit()) > 20f)));
                }
                num2 = Conversions.ToSingle(Operators.AddObject(num2, GlobalVariables.thickness[index]));
                index++;
            }
        }
Beispiel #3
0
        public static short fp_StructureClass(int i, float midpoint, frmFOOTPRINTPedotransferInput frm)
        {
            short num;

            if (Strings.Left(GlobalVariables.designat[i], 1) == "A")
            {
                num = !((GlobalVariables.designat[i] == "At") | (TextureClassification(ref GlobalVariables.Texture[i]) == "coarse")) ? ((GlobalVariables.designat[i] != "Ap") ? (!(frm.chkTrafficked.Checked & ((LargeBiopores(frm, i) == MACROConstants.BioporeFrequency.Common) | (LargeBiopores(frm, i) == MACROConstants.BioporeFrequency.Abundant))) ? 2 : 3) : ((GlobalVariables.orgc[i] <= 5f) ? ((TextureClassification(ref GlobalVariables.Texture[i]) != "fine") ? 2 : 3) : 1)) : 1;
            }
            else if (((GlobalVariables.designat[i] == "C") | (GlobalVariables.designat[i] == "O")) | (GlobalVariables.designat[i] == "H"))
            {
                num = 1;
            }
            else if ((((GlobalVariables.designat[i] == "BC") | (GlobalVariables.designat[i] == "E")) | (GlobalVariables.designat[i] == "B")) | (GlobalVariables.designat[i] == "Bpan"))
            {
                num = (TextureClassification(ref GlobalVariables.Texture[i]) != "coarse") ? (!((TextureClassification(ref GlobalVariables.Texture[i]) == "fine") | (LargeBiopores(frm, i) == MACROConstants.BioporeFrequency.Abundant)) ? ((LargeBiopores(frm, i) != MACROConstants.BioporeFrequency.Common) ? 2 : ((GlobalVariables.designat[i] != "Bpan") ? 3 : 4)) : 4) : 1;
            }
            else
            {
                num = 1;
            }
            return(num);
        }
        private void DisplayStep()
        {
            Point point;

            this.HideAll();
            frmFOOTPRINTPedotransferInput input = this;

            switch (this.m_Step)
            {
            case MACROConstants.FootprintPedotransferStep.Introduction:
                input.grpIntroduction.Visible = true;
                point = new Point(12, 12);
                input.grpIntroduction.Location = point;
                this.btnPrevious.Enabled       = false;
                this.cmdSetInformation.Enabled = true;
                break;

            case MACROConstants.FootprintPedotransferStep.LandUse:
                input.grpLandUse.Visible = true;
                point = new Point(12, 12);
                input.grpLandUse.Location = point;
                this.btnPrevious.Enabled  = true;
                break;

            case MACROConstants.FootprintPedotransferStep.AdditionalInput:
                input.grpAdditionalInput.Visible = true;
                point = new Point(12, 12);
                input.grpAdditionalInput.Location = point;
                input.cmdSetInformation.Text      = "&Finish";
                break;

            default:
                break;
            }
            input = null;
        }
Beispiel #5
0
        public static float macroporosity(ref short seq, ref string text_class, ref string desig, ref float midpoint, frmFOOTPRINTPedotransferInput frm)
        {
            float num;

            if (Strings.Left(desig, 1) == "A")
            {
                num = !(((GlobalVariables.sw_landuse == MACROConstants.Switch.Tritium) | frm.chkZeroTillOrManure.Checked) | (desig == "A")) ? ((Strings.Left(desig, 2) != "At") ? ((Strings.Left(desig, 2) != "Ap") ? ((Strings.Left(desig, 1) != "A") ? (!((Strings.Left(desig, 1) == "O") | (Strings.Left(desig, 1) == "H")) ? 5f : 5f) : ((text_class != "fine") ? ((text_class != "coarse") ? 3f : 4f) : 2f)) : ((text_class != "fine") ? ((text_class != "coarse") ? 4f : 5f) : 3f)) : 5f) : 5f;
            }
            else if (desig == "BC")
            {
                num = (text_class != "fine") ? ((text_class != "coarse") ? 0.4f : 4f) : 0.2f;
            }
            else if (((Strings.Left(desig, 1) == "B") | (Strings.Left(desig, 1) == "E")) & (midpoint <= 50f))
            {
                num = (text_class != "fine") ? ((text_class != "coarse") ? 1.6f : 5f) : 1.6f;
            }
            else if (((Strings.Left(desig, 1) == "B") | (Strings.Left(desig, 1) == "E")) & (midpoint > 50f))
            {
                num = (text_class != "fine") ? ((text_class != "coarse") ? 0.8f : 5f) : 0.8f;
            }
            else if (Strings.Left(desig, 1) == "C")
            {
                num = (text_class != "fine") ? ((text_class != "coarse") ? 0.4f : 3f) : 0.2f;
            }
            else if ((Strings.Left(desig, 1) == "O") | (Strings.Left(desig, 1) == "H"))
            {
                num = 5f;
            }
            else if (desig == "Bpan")
            {
                num = 0.1f;
            }
            else
            {
                num = 0f;
            }
            return(num);
        }
Beispiel #6
0
 private static MACROConstants.BioporeFrequency LargeBiopores(frmFOOTPRINTPedotransferInput frm, int horizon) =>
 !(frm.chkAridicTorric.Checked | frm.chkCryicPergelic.Checked) ? (!DepthRestriction(horizon, frm) ? ((GlobalVariables.sw_landuse != MACROConstants.Switch.Tritium) ? (!(frm.chkZeroTillOrManure.Checked | frm.optNoTillPerennial.Checked) ? ((TextureClassification(ref GlobalVariables.Texture[horizon]) != "medium") ? MACROConstants.BioporeFrequency.Rare : MACROConstants.BioporeFrequency.Common) : ((TextureClassification(ref GlobalVariables.Texture[horizon]) != "medium") ? MACROConstants.BioporeFrequency.Common : MACROConstants.BioporeFrequency.Abundant)) : MACROConstants.BioporeFrequency.Abundant) : MACROConstants.BioporeFrequency.Rare) : MACROConstants.BioporeFrequency.Rare;