Пример #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.h_Layout_3);

            var lblWindPIME = FindViewById <TextView>(Resource.Id.txtQuestion1);
            var btn0to15    = FindViewById <Button>(Resource.Id.btnQ1C1);
            var btn16to20   = FindViewById <Button>(Resource.Id.btnQ1C2);
            var btn21to25   = FindViewById <Button>(Resource.Id.btnQ1C3);
            var txtWindPIME = FindViewById <TextView>(Resource.Id.txtAnswer1);

            var lblWindComm  = FindViewById <TextView>(Resource.Id.txtQuestion2);
            var btn0to15Comm = FindViewById <Button>(Resource.Id.btnQ2C1);
            var btn16to23    = FindViewById <Button>(Resource.Id.btnQ2C2);
            var btn24to30    = FindViewById <Button>(Resource.Id.btnQ2C3);
            var txtWindComm  = FindViewById <TextView>(Resource.Id.txtAnswer2);

            var lblWindCFI  = FindViewById <TextView>(Resource.Id.txtQuestion3);
            var btn0to15CFI = FindViewById <Button>(Resource.Id.btnQ3C1);
            var btn16to25   = FindViewById <Button>(Resource.Id.btnQ3C2);
            var btn26to35   = FindViewById <Button>(Resource.Id.btnQ3C3);
            var txtWindCFI  = FindViewById <TextView>(Resource.Id.txtAnswer3);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txtRiskText);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txtRiskNum);
            var btnBack    = FindViewById <ImageButton>(Resource.Id.btnBackfrom3);
            var btnNext    = FindViewById <ImageButton>(Resource.Id.btnContinueFrom3);

            lblWindPIME.Text = "Wind (P, I, ME)";
            btn0to15.Text    = "0 - 15 kts";
            btn16to20.Text   = "16 - 20 kts";
            btn21to25.Text   = "21 - 25 kts";

            lblWindComm.Text  = "Wind (Comm)";
            btn0to15Comm.Text = "0 - 15 kts";
            btn16to23.Text    = "16 - 23 kts";
            btn24to30.Text    = "24 - 30 kts";

            lblWindCFI.Text  = "Wind (CFI)";
            btn0to15CFI.Text = "0 - 5 kts";
            btn16to25.Text   = "6 - 10 kts";
            btn26to35.Text   = "11 - 15 kts";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn0to15, btn16to20, btn21to25, txtWindPIME, windPime);
            class1.defaultVals(btn0to15Comm, btn16to23, btn24to30, txtWindComm, windComm);
            class1.defaultVals(btn0to15CFI, btn16to25, btn26to35, txtWindCFI, windCFI);

            DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
            class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);

            btn0to15.Touch += (s, e) =>
            {
                windPime      = class1.button1Pressed(btn0to15, btn16to20, btn21to25, txtWindPIME);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };
            btn16to20.Touch += (s, e) =>
            {
                windPime      = class1.button2Pressed(btn0to15, btn16to20, btn21to25, txtWindPIME);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };
            btn21to25.Touch += (s, e) =>
            {
                windPime      = class1.button3Pressed(btn0to15, btn16to20, btn21to25, txtWindPIME);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };

            btn0to15Comm.Touch += (s, e) =>
            {
                windComm      = class1.button1Pressed(btn0to15Comm, btn16to23, btn24to30, txtWindComm);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };
            btn16to23.Touch += (s, e) =>
            {
                windComm      = class1.button2Pressed(btn0to15Comm, btn16to23, btn24to30, txtWindComm);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };
            btn24to30.Touch += (s, e) =>
            {
                windComm      = class1.button3Pressed(btn0to15Comm, btn16to23, btn24to30, txtWindComm);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };

            btn0to15CFI.Touch += (s, e) =>
            {
                windCFI       = class1.button1Pressed(btn0to15CFI, btn16to25, btn26to35, txtWindCFI);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };
            btn16to25.Touch += (s, e) =>
            {
                windCFI       = class1.button2Pressed(btn0to15CFI, btn16to25, btn26to35, txtWindCFI);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };
            btn26to35.Touch += (s, e) =>
            {
                windCFI       = class1.button3Pressed(btn0to15CFI, btn16to25, btn26to35, txtWindCFI);
                DepartureRisk = windCFI + windPime + windComm + K_VFR_Dual_XC2.xwind + K_VFR_Dual_XC2.ceiling + K_VFR_Dual_XC2.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", DepartureRisk, 7, 9);
            };

            btnBack.Touch += (s, e) =>
            {
                StartActivity(typeof(G_Student_Human_Factors_2));
            };

            btnNext.Touch += (s, e) =>
            {
                StartActivity(typeof(K_VFR_Dual_XC2));
            };
        }
Пример #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.h_Layout_3);

            var lblWind   = FindViewById <TextView>(Resource.Id.txtQuestion1);
            var btn0to15  = FindViewById <Button>(Resource.Id.btnQ1C1);
            var btn16to20 = FindViewById <Button>(Resource.Id.btnQ1C2);
            var btn21to25 = FindViewById <Button>(Resource.Id.btnQ1C3);
            var txtWInd   = FindViewById <TextView>(Resource.Id.txtAnswer1);

            var lblXwind  = FindViewById <TextView>(Resource.Id.txtQuestion2);
            var btn0to5   = FindViewById <Button>(Resource.Id.btnQ2C1);
            var btn6to10  = FindViewById <Button>(Resource.Id.btnQ2C2);
            var btn11to15 = FindViewById <Button>(Resource.Id.btnQ2C3);
            var txtxWind  = FindViewById <TextView>(Resource.Id.txtAnswer2);

            var lblCeiling = FindViewById <TextView>(Resource.Id.txtQuestion3);
            var btn4000    = FindViewById <Button>(Resource.Id.btnQ3C1);
            var btn3500    = FindViewById <Button>(Resource.Id.btnQ3C2);
            var btn3000    = FindViewById <Button>(Resource.Id.btnQ3C3);
            var txtCieling = FindViewById <TextView>(Resource.Id.txtAnswer3);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txtRiskText);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txtRiskNum);

            lblWind.Text   = "Wind";
            btn0to15.Text  = "0 - 15 kts";
            btn16to20.Text = "16 - 20 kts";
            btn21to25.Text = "21 - 25 kts";

            lblXwind.Text  = "Xwind";
            btn0to5.Text   = "0 - 5 kts";
            btn6to10.Text  = "6 - 10 kts";
            btn11to15.Text = "11 - 15 kts";

            lblCeiling.Text = "Ceiling";
            btn4000.Text    = "4000+ ft";
            btn3500.Text    = "3500 - 3999 ft";
            btn3000.Text    = "3000 - 3499 ft";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn0to15, btn16to20, btn21to25, txtWInd, wind);
            class1.defaultVals(btn0to5, btn6to10, btn11to15, txtxWind, xwind);
            class1.defaultVals(btn4000, btn3500, btn3000, txtCieling, ceiling);

            altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
            class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);

            btn0to15.Touch += (s, e) =>
            {
                wind    = class1.button1Pressed(btn0to15, btn16to20, btn21to25, txtWInd);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };
            btn16to20.Touch += (s, e) =>
            {
                wind    = class1.button2Pressed(btn0to15, btn16to20, btn21to25, txtWInd);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };
            btn21to25.Touch += (s, e) =>
            {
                wind    = class1.button3Pressed(btn0to15, btn16to20, btn21to25, txtWInd);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };

            btn0to5.Touch += (s, e) =>
            {
                xwind   = class1.button1Pressed(btn0to5, btn6to10, btn11to15, txtxWind);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };
            btn6to10.Touch += (s, e) =>
            {
                xwind   = class1.button2Pressed(btn0to5, btn6to10, btn11to15, txtxWind);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };
            btn11to15.Touch += (s, e) =>
            {
                xwind   = class1.button3Pressed(btn0to5, btn6to10, btn11to15, txtxWind);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };

            btn4000.Touch += (s, e) =>
            {
                ceiling = class1.button1Pressed(btn4000, btn3500, btn3000, txtCieling);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };
            btn3500.Touch += (s, e) =>
            {
                ceiling = class1.button2Pressed(btn4000, btn3500, btn3000, txtCieling);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };
            btn3000.Touch += (s, e) =>
            {
                ceiling = class1.button3Pressed(btn4000, btn3500, btn3000, txtCieling);
                altRisk = wind + xwind + ceiling + M_VFR_Night_XC8.vis + M_VFR_Night_XC8.fuel + M_VFR_Night_XC8.iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", altRisk, 9, 12);
            };

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom3);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom3);

            btnNext.Click += delegate
            {
                StartActivity(typeof(M_VFR_Night_XC8));
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(M_VFR_Night_XC6));
            };
        }
Пример #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.h_Layout_3);

            var lblxwind  = FindViewById <TextView>(Resource.Id.txtQuestion1);
            var btn0to5   = FindViewById <Button>(Resource.Id.btnQ1C1);
            var btn6to10  = FindViewById <Button>(Resource.Id.btnQ1C2);
            var btn11to15 = FindViewById <Button>(Resource.Id.btnQ1C3);
            var txtxwind  = FindViewById <TextView>(Resource.Id.txtAnswer1);

            var lblCeiling = FindViewById <TextView>(Resource.Id.txtQuestion2);
            var btn4000    = FindViewById <Button>(Resource.Id.btnQ2C1);
            var btn3500    = FindViewById <Button>(Resource.Id.btnQ2C2);
            var btn3000    = FindViewById <Button>(Resource.Id.btnQ2C3);
            var txtCeiling = FindViewById <TextView>(Resource.Id.txtAnswer2);

            var lblvis = FindViewById <TextView>(Resource.Id.txtQuestion3);
            var btn7   = FindViewById <Button>(Resource.Id.btnQ3C1);
            var btn6   = FindViewById <Button>(Resource.Id.btnQ3C2);
            var btn5   = FindViewById <Button>(Resource.Id.btnQ3C3);
            var txtvis = FindViewById <TextView>(Resource.Id.txtAnswer3);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txtRiskText);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txtRiskNum);
            var btnBack    = FindViewById <ImageButton>(Resource.Id.btnBackfrom3);
            var btnNext    = FindViewById <ImageButton>(Resource.Id.btnContinueFrom3);

            lblxwind.Text  = "Xwind";
            btn0to5.Text   = "0 - 5 kts";
            btn6to10.Text  = "6 - 10 kts";
            btn11to15.Text = "11 - 15 kts";

            lblCeiling.Text = "Ceiling";
            btn4000.Text    = "4000 ft";
            btn3500.Text    = "3500 - 3999 ft";
            btn3000.Text    = "3000 - 3499 ft";

            lblvis.Text = "Visibility";
            btn7.Text   = "7+ SM";
            btn6.Text   = "6 SM";
            btn5.Text   = "5 SM";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn0to5, btn6to10, btn11to15, txtxwind, xwind);
            class1.defaultVals(btn4000, btn3500, btn3000, txtCeiling, ceiling);
            class1.defaultVals(btn7, btn6, btn5, txtvis, vis);

            K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
            class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);

            btn0to5.Touch += (s, e) =>
            {
                xwind = class1.button1Pressed(btn0to5, btn6to10, btn11to15, txtxwind);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };
            btn6to10.Touch += (s, e) =>
            {
                xwind = class1.button2Pressed(btn0to5, btn6to10, btn11to15, txtxwind);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };
            btn11to15.Touch += (s, e) =>
            {
                xwind = class1.button3Pressed(btn0to5, btn6to10, btn11to15, txtxwind);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };

            btn4000.Touch += (s, e) =>
            {
                ceiling = class1.button1Pressed(btn4000, btn3500, btn3000, txtCeiling);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };
            btn3500.Touch += (s, e) =>
            {
                ceiling = class1.button2Pressed(btn4000, btn3500, btn3000, txtCeiling);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };
            btn3000.Touch += (s, e) =>
            {
                ceiling = class1.button3Pressed(btn4000, btn3500, btn3000, txtCeiling);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };

            btn7.Touch += (s, e) =>
            {
                vis = class1.button1Pressed(btn7, btn6, btn5, txtvis);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };
            btn6.Touch += (s, e) =>
            {
                vis = class1.button2Pressed(btn7, btn6, btn5, txtvis);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };
            btn5.Touch += (s, e) =>
            {
                vis = class1.button3Pressed(btn7, btn6, btn5, txtvis);
                K_VFR_Dual_XC1.DepartureRisk = vis + xwind + ceiling + K_VFR_Dual_XC1.windCFI + K_VFR_Dual_XC1.windComm + K_VFR_Dual_XC1.windPime;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", K_VFR_Dual_XC1.DepartureRisk, 7, 9);
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(K_VFR_Dual_XC1));
            };

            btnNext.Click += delegate
            {
                if (K_VFR_Dual_XC1.DepartureRisk > 8)
                {
                    AlertDialog.Builder alert = new AlertDialog.Builder(this);
                    alert.SetTitle("Alert");
                    alert.SetMessage("Your departure risk is too high!");
                    alert.SetNeutralButton("OK", delegate
                    {
                        alert.Dispose();
                    });
                    alert.Show();
                }
                else
                {
                    StartActivity(typeof(K_VFR_Dual_XC3));
                }
            };
        }
Пример #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.h_Layout2);

            // Create your application here
            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblVIs = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn7   = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn6   = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn5   = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtVis = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblAIP          = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btnPrecision    = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btnNonPrecision = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btnCircling     = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtAIP          = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblVIs.Text = "Visibility";
            btn7.Text   = "7+ SM";
            btn6.Text   = "6 SM";
            btn5.Text   = "5 SM";
            txtVis.Text = "You have selected the '" + btn7.Text + "' choice.";

            lblAIP.Text          = "Best IAP Available";
            btnPrecision.Text    = "Precision";
            btnNonPrecision.Text = "Non-Precision";
            btnCircling.Text     = "Circling";
            txtAIP.Text          = "You have selected the '" + btnPrecision.Text + "' choice.";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn7, btn6, btn5, txtVis, vis);
            class1.defaultVals(btnPrecision, btnNonPrecision, btnCircling, txtAIP, iap);

            M_VFR_Night_XC1.departureRisk = M_VFR_Night_XC1.ceiling + M_VFR_Night_XC1.wind + M_VFR_Night_XC1.xwind + vis + iap;
            class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", M_VFR_Night_XC1.departureRisk, 8, 10);

            btn7.Touch += (s, e) =>
            {
                vis = class1.button1Pressed(btn7, btn6, btn5, txtVis);
                M_VFR_Night_XC1.departureRisk = M_VFR_Night_XC1.ceiling + M_VFR_Night_XC1.wind + M_VFR_Night_XC1.xwind + vis + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", M_VFR_Night_XC1.departureRisk, 8, 10);
            };
            btn6.Touch += (s, e) =>
            {
                vis = class1.button2Pressed(btn7, btn6, btn5, txtVis);
                M_VFR_Night_XC1.departureRisk = M_VFR_Night_XC1.ceiling + M_VFR_Night_XC1.wind + M_VFR_Night_XC1.xwind + vis + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", M_VFR_Night_XC1.departureRisk, 8, 10);
            };
            btn5.Touch += (s, e) =>
            {
                vis = class1.button3Pressed(btn7, btn6, btn5, txtVis);
                M_VFR_Night_XC1.departureRisk = M_VFR_Night_XC1.ceiling + M_VFR_Night_XC1.wind + M_VFR_Night_XC1.xwind + vis + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", M_VFR_Night_XC1.departureRisk, 8, 10);
            };

            btnPrecision.Touch += (s, e) =>
            {
                iap = class1.button1Pressed(btnPrecision, btnNonPrecision, btnCircling, txtAIP);
                M_VFR_Night_XC1.departureRisk = M_VFR_Night_XC1.ceiling + M_VFR_Night_XC1.wind + M_VFR_Night_XC1.xwind + vis + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", M_VFR_Night_XC1.departureRisk, 8, 10);
            };
            btnNonPrecision.Touch += (s, e) =>
            {
                iap = class1.button2Pressed(btnPrecision, btnNonPrecision, btnCircling, txtAIP);
                M_VFR_Night_XC1.departureRisk = M_VFR_Night_XC1.ceiling + M_VFR_Night_XC1.wind + M_VFR_Night_XC1.xwind + vis + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", M_VFR_Night_XC1.departureRisk, 8, 10);
            };
            btnCircling.Touch += (s, e) =>
            {
                iap = class1.button3Pressed(btnPrecision, btnNonPrecision, btnCircling, txtAIP);
                M_VFR_Night_XC1.departureRisk = M_VFR_Night_XC1.ceiling + M_VFR_Night_XC1.wind + M_VFR_Night_XC1.xwind + vis + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Risk", M_VFR_Night_XC1.departureRisk, 8, 10);
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(M_VFR_Night_XC1));
            };

            btnNext.Click += delegate
            {
                if (M_VFR_Night_XC1.departureRisk > 9)
                {
                    class1.alertShow("Departure Risk", this);

                    class1.defaultVals(btn7, btn6, btn5, txtVis, vis);
                    class1.defaultVals(btnPrecision, btnNonPrecision, btnCircling, txtAIP, iap);
                }
                else
                {
                    StartActivity(typeof(M_VFR_Night_XC3));
                }
            };
        }
Пример #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblVIs = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn7   = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn6   = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn5   = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtVis = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblFuel   = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btn60     = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn45to60 = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var bnt30to45 = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtFuel   = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblVIs.Text = "Visibility";
            btn7.Text   = "7+ SM";
            btn6.Text   = "6 SM";
            btn5.Text   = "5 SM";
            txtVis.Text = "You have selected the '" + btn7.Text + "' choice.";

            lblFuel.Text   = "Fuel Remaining";
            btn60.Text     = "> 60 min";
            btn45to60.Text = "45 - 60 min";
            bnt30to45.Text = "30 - 45 min";
            txtFuel.Text   = "You have selected the '" + btn60.Text + "' choice.";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn7, btn6, btn5, txtVis, vis);
            class1.defaultVals(btn60, btn45to60, bnt30to45, txtFuel, fuel);

            K_VFR_Dual_XC8.altRisk = K_VFR_Dual_XC8.windCFI + K_VFR_Dual_XC8.windComm + K_VFR_Dual_XC8.windPime + K_VFR_Dual_XC9.ceiling + K_VFR_Dual_XC9.xwind + fuel + vis;
            class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", K_VFR_Dual_XC8.altRisk, 8, 10);

            btn7.Touch += (s, e) =>
            {
                vis = class1.button1Pressed(btn7, btn6, btn5, txtVis);
                K_VFR_Dual_XC8.altRisk = K_VFR_Dual_XC8.windCFI + K_VFR_Dual_XC8.windComm + K_VFR_Dual_XC8.windPime + K_VFR_Dual_XC9.ceiling + K_VFR_Dual_XC9.xwind + fuel + vis;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", K_VFR_Dual_XC8.altRisk, 8, 10);
            };
            btn6.Touch += (s, e) =>
            {
                vis = class1.button2Pressed(btn7, btn6, btn5, txtVis);
                K_VFR_Dual_XC8.altRisk = K_VFR_Dual_XC8.windCFI + K_VFR_Dual_XC8.windComm + K_VFR_Dual_XC8.windPime + K_VFR_Dual_XC9.ceiling + K_VFR_Dual_XC9.xwind + fuel + vis;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", K_VFR_Dual_XC8.altRisk, 8, 10);
            };
            btn5.Touch += (s, e) =>
            {
                vis = class1.button3Pressed(btn7, btn6, btn5, txtVis);
                K_VFR_Dual_XC8.altRisk = K_VFR_Dual_XC8.windCFI + K_VFR_Dual_XC8.windComm + K_VFR_Dual_XC8.windPime + K_VFR_Dual_XC9.ceiling + K_VFR_Dual_XC9.xwind + fuel + vis;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", K_VFR_Dual_XC8.altRisk, 8, 10);
            };

            btn60.Touch += (s, e) =>
            {
                fuel = class1.button1Pressed(btn60, btn45to60, bnt30to45, txtFuel);
                K_VFR_Dual_XC8.altRisk = K_VFR_Dual_XC8.windCFI + K_VFR_Dual_XC8.windComm + K_VFR_Dual_XC8.windPime + K_VFR_Dual_XC9.ceiling + K_VFR_Dual_XC9.xwind + fuel + vis;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", K_VFR_Dual_XC8.altRisk, 8, 10);
            };
            btn45to60.Touch += (s, e) =>
            {
                fuel = class1.button2Pressed(btn60, btn45to60, bnt30to45, txtFuel);
                K_VFR_Dual_XC8.altRisk = K_VFR_Dual_XC8.windCFI + K_VFR_Dual_XC8.windComm + K_VFR_Dual_XC8.windPime + K_VFR_Dual_XC9.ceiling + K_VFR_Dual_XC9.xwind + fuel + vis;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", K_VFR_Dual_XC8.altRisk, 8, 10);
            };
            bnt30to45.Touch += (s, e) =>
            {
                fuel = class1.button3Pressed(btn60, btn45to60, bnt30to45, txtFuel);
                K_VFR_Dual_XC8.altRisk = K_VFR_Dual_XC8.windCFI + K_VFR_Dual_XC8.windComm + K_VFR_Dual_XC8.windPime + K_VFR_Dual_XC9.ceiling + K_VFR_Dual_XC9.xwind + fuel + vis;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", K_VFR_Dual_XC8.altRisk, 8, 10);
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(K_VFR_Dual_XC9));
            };

            btnNext.Click += delegate
            {
                if (K_VFR_Dual_XC8.altRisk > 9)
                {
                    AlertDialog.Builder alert = new AlertDialog.Builder(this);
                    alert.SetTitle("Alert");
                    alert.SetMessage("Your alternate risk is too high!");
                    alert.SetNeutralButton("OK", delegate
                    {
                        alert.Dispose();
                    });
                    alert.Show();
                }
                else
                {
                    StartActivity(typeof(Y_Aircraft_and_Instructor));
                }
            };
        }
Пример #6
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblDual       = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btnLessThan30 = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn30to45     = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn45Plus     = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtDual       = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lbl3Night     = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btnLessthan45 = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn45         = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn90         = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txt3Night     = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtPICRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtPICRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblDual.Text       = "Last dual landing";
            btnLessThan30.Text = "<30 days";
            btn30to45.Text     = "30 - 45 days";
            btn45Plus.Text     = ">45 days";
            txtDual.Text       = "You have selected the '" + btnLessThan30.Text + "' choice.";

            lbl3Night.Text     = "3 Night Landings";
            btnLessthan45.Text = "< 45 days";
            btn45.Text         = "45 - 90 days";
            btn90.Text         = "> 90 days";
            txt3Night.Text     = "You have selected the '" + btnLessthan45.Text + "' choice.";

            ShortCutFunctions sc = new ShortCutFunctions();

            sc.defaultVals(btnLessThan30, btn30to45, btn45Plus, txtDual, ldl);
            sc.defaultVals(btnLessthan45, btn45, btn90, txt3Night, Night3);

            pic = Night3 + ldl + M_VFR_Night_XCA10.dia + M_VFR_Night_XCA10.IFRCurr;
            sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", pic, 2, 3);

            btnLessThan30.Touch += (s, e) =>
            {
                ldl = sc.button1Pressed(btnLessThan30, btn30to45, btn45Plus, txtDual);
                pic = Night3 + ldl + M_VFR_Night_XCA10.dia + M_VFR_Night_XCA10.IFRCurr;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", pic, 2, 3);
            };
            btn30to45.Touch += (s, e) =>
            {
                ldl = sc.button2Pressed(btnLessThan30, btn30to45, btn45Plus, txtDual);
                pic = Night3 + ldl + M_VFR_Night_XCA10.dia + M_VFR_Night_XCA10.IFRCurr;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", pic, 2, 3);
            };
            btn45Plus.Touch += (s, e) =>
            {
                ldl = sc.button3Pressed(btnLessThan30, btn30to45, btn45Plus, txtDual);
                pic = Night3 + ldl + M_VFR_Night_XCA10.dia + M_VFR_Night_XCA10.IFRCurr;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", pic, 2, 3);
            };

            btnLessthan45.Touch += (s, e) =>
            {
                Night3 = sc.button1Pressed(btnLessthan45, btn45, btn90, txt3Night);
                pic    = Night3 + ldl + M_VFR_Night_XCA10.dia + M_VFR_Night_XCA10.IFRCurr;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", pic, 2, 3);
            };
            btn45.Touch += (s, e) =>
            {
                Night3 = sc.button2Pressed(btnLessthan45, btn45, btn90, txt3Night);
                pic    = Night3 + ldl + M_VFR_Night_XCA10.dia + M_VFR_Night_XCA10.IFRCurr;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", pic, 2, 3);
            };
            btn90.Touch += (s, e) =>
            {
                Night3 = sc.button3Pressed(btnLessthan45, btn45, btn90, txt3Night);
                pic    = Night3 + ldl + M_VFR_Night_XCA10.dia + M_VFR_Night_XCA10.IFRCurr;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", pic, 2, 3);
            };

            btnNext.Click += delegate
            {
                StartActivity(typeof(M_VFR_Night_XCA10));
            };
            btnBack.Click += delegate
            {
                StartActivity(typeof(M_VFR_Night_XC8));
            };
        }
Пример #7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblCeiling = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn3000    = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn2500    = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn2000    = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtCeiling = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblVIs = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btn5   = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn4   = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn3   = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtVis = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblCeiling.Text = "Ceiling (day)";
            btn3000.Text    = "3000 + ft";
            btn2500.Text    = "2500 - 2999 ft";
            btn2000.Text    = "2000 - 2499 ft";
            txtCeiling.Text = "You have selected the '" + btn3000.Text + "' choice.";

            lblVIs.Text = "Visibility (day)";
            btn5.Text   = "5+ SM";
            btn4.Text   = "4 SM";
            btn3.Text   = "3 SM";
            txtVis.Text = "You have selected the '" + btn5.Text + "' choice.";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn3000, btn2500, btn2000, txtCeiling, ceilingDay);
            class1.defaultVals(btn5, btn4, btn3, txtVis, visDay);

            if (J_VFR_Dual_Local2.time == 3)
            {
                J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
            }
            else
            {
                J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay;
            }
            class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);

            btn3000.Touch += (s, e) =>
            {
                ceilingDay = class1.button1Pressed(btn3000, btn2500, btn2000, txtCeiling);
                if (J_VFR_Dual_Local2.time == 3)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };
            btn2500.Touch += (s, e) =>
            {
                ceilingDay = class1.button2Pressed(btn3000, btn2500, btn2000, txtCeiling);
                if (J_VFR_Dual_Local2.time == 3)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };
            btn2000.Touch += (s, e) =>
            {
                ceilingDay = class1.button3Pressed(btn3000, btn2500, btn2000, txtCeiling);
                if (J_VFR_Dual_Local2.time == 3)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };

            btn5.Touch += (s, e) =>
            {
                visDay = class1.button1Pressed(btn5, btn4, btn3, txtVis);
                if (J_VFR_Dual_Local2.time == 3)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };
            btn4.Touch += (s, e) =>
            {
                visDay = class1.button2Pressed(btn5, btn4, btn3, txtVis);
                if (J_VFR_Dual_Local2.time == 3)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };
            btn3.Touch += (s, e) =>
            {
                visDay = class1.button3Pressed(btn5, btn4, btn3, txtVis);
                if (J_VFR_Dual_Local2.time == 3)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + J_VFR_Dual_Local2.xwind + visDay + ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };

            btnNext.Touch += (s, e) =>
            {
                if (J_VFR_Dual_Local2.time == 3)
                {
                    StartActivity(typeof(J_VFR_Dual_Local4Night));
                }
                else
                {
                    if (J_VFR_Dual_Local1.homeRisk > 9)
                    {
                        AlertDialog.Builder alert = new AlertDialog.Builder(this);
                        alert.SetTitle("Alert");
                        alert.SetMessage("Your home airfield risk is too high!");
                        alert.SetNeutralButton("OK", delegate
                        {
                            alert.Dispose();
                        });
                        alert.Show();
                    }
                }
            };

            btnBack.Touch += (s, e) =>
            {
                StartActivity(typeof(J_VFR_Dual_Local2));
            };
        }
Пример #8
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.h_Layout_3);

            var lblTime  = FindViewById <TextView>(Resource.Id.txtQuestion1);
            var btnDay   = FindViewById <Button>(Resource.Id.btnQ1C1);
            var btnNight = FindViewById <Button>(Resource.Id.btnQ1C2);
            var btnBoth  = FindViewById <Button>(Resource.Id.btnQ1C3);
            var txtTime  = FindViewById <TextView>(Resource.Id.txtAnswer1);

            var lblDay  = FindViewById <TextView>(Resource.Id.txtQuestion2);
            var btn1000 = FindViewById <Button>(Resource.Id.btnQ2C1);
            var btn800  = FindViewById <Button>(Resource.Id.btnQ2C2);
            var btn600  = FindViewById <Button>(Resource.Id.btnQ2C3);
            var txtDay  = FindViewById <TextView>(Resource.Id.txtAnswer2);

            var lblNight  = FindViewById <TextView>(Resource.Id.txtQuestion3);
            var btn1500   = FindViewById <Button>(Resource.Id.btnQ3C1);
            var btn1200   = FindViewById <Button>(Resource.Id.btnQ3C2);
            var btn1000to = FindViewById <Button>(Resource.Id.btnQ3C3);
            var txtNight  = FindViewById <TextView>(Resource.Id.txtAnswer3);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txtRiskText);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txtRiskNum);

            lblTime.Text  = "What time of day are you flying?";
            btnDay.Text   = "Day";
            btnNight.Text = "Night";
            btnBoth.Text  = "Both Day and Night";

            lblDay.Text  = "Ceiling (Day)";
            btn1000.Text = "> 1000 ft";
            btn800.Text  = "800 - 999 ft";
            btn600.Text  = "600 - 799 ft";

            lblNight.Text  = "Ceiling (Night)";
            btn1500.Text   = "> 1500 ft";
            btn1200.Text   = "1200 - 1499 ft";
            btn1000to.Text = "1000 - 1199 ft";

            ShortCutFunctions sc = new ShortCutFunctions();

            sc.defaultVals(btnDay, btnNight, btnBoth, txtTime, time);
            sc.defaultVals(btn1000, btn800, btn600, txtDay, dayCeiling);
            sc.defaultVals(btn1500, btn1200, btn1000to, txtNight, nightCeiling);

            if (time == 0)
            {
                timeRisk             = dayCeiling;
                lblDay.Visibility    = ViewStates.Visible;
                btn1000.Visibility   = ViewStates.Visible;
                btn800.Visibility    = ViewStates.Visible;
                btn600.Visibility    = ViewStates.Visible;
                txtDay.Visibility    = ViewStates.Visible;
                lblNight.Visibility  = ViewStates.Invisible;
                btn1500.Visibility   = ViewStates.Invisible;
                btn1200.Visibility   = ViewStates.Invisible;
                btn1000to.Visibility = ViewStates.Invisible;
                txtNight.Visibility  = ViewStates.Invisible;
            }
            else if (time == 1)
            {
                timeRisk             = nightCeiling;
                lblDay.Visibility    = ViewStates.Invisible;
                btn1000.Visibility   = ViewStates.Invisible;
                btn800.Visibility    = ViewStates.Invisible;
                btn600.Visibility    = ViewStates.Invisible;
                lblNight.Visibility  = ViewStates.Visible;
                btn1500.Visibility   = ViewStates.Visible;
                btn1200.Visibility   = ViewStates.Visible;
                btn1000to.Visibility = ViewStates.Visible;
                txtNight.Visibility  = ViewStates.Visible;
                txtDay.Visibility    = ViewStates.Invisible;
            }
            else
            {
                timeRisk             = dayCeiling + nightCeiling;
                lblDay.Visibility    = ViewStates.Visible;
                btn1000.Visibility   = ViewStates.Visible;
                btn800.Visibility    = ViewStates.Visible;
                btn600.Visibility    = ViewStates.Visible;
                lblNight.Visibility  = ViewStates.Visible;
                btn1500.Visibility   = ViewStates.Visible;
                btn1200.Visibility   = ViewStates.Visible;
                btn1000to.Visibility = ViewStates.Visible;
                txtDay.Visibility    = ViewStates.Visible;
                txtNight.Visibility  = ViewStates.Visible;
            }
            P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
            sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);

            btnDay.Touch += (s, e) =>
            {
                time = sc.button1Pressed(btnDay, btnNight, btnBoth, txtTime);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };
            btnNight.Touch += (s, e) =>
            {
                time = sc.button2Pressed(btnDay, btnNight, btnBoth, txtTime);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };
            btnBoth.Touch += (s, e) =>
            {
                time = sc.button3Pressed(btnDay, btnNight, btnBoth, txtTime);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };

            btn1000.Touch += (s, e) =>
            {
                dayCeiling = sc.button1Pressed(btn1000, btn800, btn600, txtDay);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };
            btn800.Touch += (s, e) =>
            {
                dayCeiling = sc.button2Pressed(btn1000, btn800, btn600, txtDay);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };
            btn600.Touch += (s, e) =>
            {
                dayCeiling = sc.button3Pressed(btn1000, btn800, btn600, txtDay);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };

            btn1500.Touch += (s, e) =>
            {
                nightCeiling = sc.button1Pressed(btn1500, btn1200, btn1000to, txtNight);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };
            btn1200.Touch += (s, e) =>
            {
                nightCeiling = sc.button2Pressed(btn1500, btn1200, btn1000to, txtNight);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };
            btn1000to.Touch += (s, e) =>
            {
                nightCeiling = sc.button3Pressed(btn1500, btn1200, btn1000to, txtNight);
                if (time == 0)
                {
                    timeRisk             = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (time == 1)
                {
                    timeRisk             = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    timeRisk             = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                P_IFR_Dual_Local_2Home.homeRisk = timeRisk + P_IFR_Dual_Local1.risk1 + P_IFR_Dual_Local1.risk2 + P_IFR_Dual_Local2.risk4 + P_IFR_Dual_Local2.risk5;
                sc.riskShow(txtRisk, txtRiskNum, "Home Airport Risk", P_IFR_Dual_Local_2Home.homeRisk, 8, 10);
            };

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom3);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom3);

            btnNext.Click += delegate
            {
                StartActivity(typeof(P_IFR_Dual_Local_2Home));
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(G_Student_Human_Factors_2));
            };
        }
Пример #9
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblDual       = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btnLessThan30 = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn30to45     = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn45Plus     = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtDual       = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblIFR    = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btnYes    = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btnfio    = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btnNo     = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txt3Night = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtPICRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtPICRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblDual.Text       = "Dual Instrument Approach";
            btnLessThan30.Text = "<30 days";
            btn30to45.Text     = "30 - 45 days";
            btn45Plus.Text     = ">45 days";
            txtDual.Text       = "You have selected the '" + btnLessThan30.Text + "' choice.";

            lblIFR.Text       = "IFR current?";
            btnYes.Text       = "Yes";
            btnfio.Visibility = ViewStates.Invisible;
            btnNo.Text        = "No"; // only two options for this question

            txt3Night.Text = "You have selected the '" + btnYes.Text + "' choice.";

            ShortCutFunctions sc = new ShortCutFunctions();

            sc.defaultVals(btnLessThan30, btn30to45, btn45Plus, txtDual, dia);
            sc.defaultVals(btnYes, btnfio, btnNo, txt3Night, IFRCurr);

            M_VFR_Night_XC9.pic = IFRCurr + dia + M_VFR_Night_XC9.Night3 + M_VFR_Night_XC9.ldl;
            sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", M_VFR_Night_XC9.pic, 2, 3);

            btnLessThan30.Touch += (s, e) =>
            {
                dia = sc.button1Pressed(btnLessThan30, btn30to45, btn45Plus, txtDual);
                M_VFR_Night_XC9.pic = IFRCurr + dia + M_VFR_Night_XC9.Night3 + M_VFR_Night_XC9.ldl;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", M_VFR_Night_XC9.pic, 2, 3);
            };
            btn30to45.Touch += (s, e) =>
            {
                dia = sc.button2Pressed(btnLessThan30, btn30to45, btn45Plus, txtDual);
                M_VFR_Night_XC9.pic = IFRCurr + dia + M_VFR_Night_XC9.Night3 + M_VFR_Night_XC9.ldl;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", M_VFR_Night_XC9.pic, 2, 3);
            };
            btn45Plus.Touch += (s, e) =>
            {
                dia = sc.button3Pressed(btnLessThan30, btn30to45, btn45Plus, txtDual);
                M_VFR_Night_XC9.pic = IFRCurr + dia + M_VFR_Night_XC9.Night3 + M_VFR_Night_XC9.ldl;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", M_VFR_Night_XC9.pic, 2, 3);
            };

            btnYes.Touch += (s, e) =>
            {
                IFRCurr             = sc.button1Pressed(btnYes, btnfio, btnNo, txt3Night);
                M_VFR_Night_XC9.pic = IFRCurr + dia + M_VFR_Night_XC9.Night3 + M_VFR_Night_XC9.ldl;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", M_VFR_Night_XC9.pic, 2, 3);
            };
            btnNo.Touch += (s, e) =>
            {
                IFRCurr             = sc.button3Pressed(btnYes, btnfio, btnNo, txt3Night);
                M_VFR_Night_XC9.pic = IFRCurr + dia + M_VFR_Night_XC9.Night3 + M_VFR_Night_XC9.ldl;
                sc.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", M_VFR_Night_XC9.pic, 2, 3);
            };


            btnNext.Click += delegate
            {
                if (M_VFR_Night_XC9.pic < 3)
                {
                    StartActivity(typeof(Y_Aircraft_and_Instructor));
                }
                else
                {
                    sc.alertShow("PIC Risk", this);
                }
            };
            btnBack.Click += delegate
            {
                StartActivity(typeof(M_VFR_Night_XC9));
            };
        }
Пример #10
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblCheckpoints = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btnMult        = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btnMod         = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btnFew         = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtCheckpoints = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblTimeEnroute = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btnLessThan60  = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn60to120     = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn120Plus     = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtTime        = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblCheckpoints.Text = "Checkpoints (XC)";
            btnMult.Text        = "Multiple";
            btnMod.Text         = "Moderate";
            btnFew.Text         = "Few to none";
            txtCheckpoints.Text = "You have selected the '" + btnMult.Text + "' choice.";

            lblTimeEnroute.Text = "Time enroute";
            btnLessThan60.Text  = "< 60 min";
            btn60to120.Text     = "60 - 120 min";
            btn120Plus.Text     = "> 120 min";
            txtTime.Text        = "You have selected the '" + btnLessThan60.Text + "' choice.";

            ShortCutFunctions sc = new ShortCutFunctions();

            sc.defaultVals(btnMult, btnMod, btnFew, txtCheckpoints, checkpoints);
            sc.defaultVals(btnLessThan60, btn60to120, btn120Plus, txtTime, timeEnroute);

            M_VFR_Night_XC3.enrouteRisk = M_VFR_Night_XC3.ceiling + M_VFR_Night_XC3.vis + checkpoints + timeEnroute;
            sc.riskShow(txtRisk, txtRiskNum, "Enroute Risk", M_VFR_Night_XC3.enrouteRisk, 7, 9);

            btnMult.Touch += (s, e) =>
            {
                checkpoints = sc.button1Pressed(btnMult, btnMod, btnFew, txtCheckpoints);
                M_VFR_Night_XC3.enrouteRisk = M_VFR_Night_XC3.ceiling + M_VFR_Night_XC3.vis + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute Risk", M_VFR_Night_XC3.enrouteRisk, 7, 9);
            };
            btnMod.Touch += (s, e) =>
            {
                checkpoints = sc.button2Pressed(btnMult, btnMod, btnFew, txtCheckpoints);
                M_VFR_Night_XC3.enrouteRisk = M_VFR_Night_XC3.ceiling + M_VFR_Night_XC3.vis + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute Risk", M_VFR_Night_XC3.enrouteRisk, 7, 9);
            };
            btnFew.Touch += (s, e) =>
            {
                checkpoints = sc.button3Pressed(btnMult, btnMod, btnFew, txtCheckpoints);
                M_VFR_Night_XC3.enrouteRisk = M_VFR_Night_XC3.ceiling + M_VFR_Night_XC3.vis + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute Risk", M_VFR_Night_XC3.enrouteRisk, 7, 9);
            };

            btnLessThan60.Touch += (s, e) =>
            {
                timeEnroute = sc.button1Pressed(btnLessThan60, btn60to120, btn120Plus, txtTime);
                M_VFR_Night_XC3.enrouteRisk = M_VFR_Night_XC3.ceiling + M_VFR_Night_XC3.vis + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute Risk", M_VFR_Night_XC3.enrouteRisk, 7, 9);
            };
            btn60to120.Touch += (s, e) =>
            {
                timeEnroute = sc.button2Pressed(btnLessThan60, btn60to120, btn120Plus, txtTime);
                M_VFR_Night_XC3.enrouteRisk = M_VFR_Night_XC3.ceiling + M_VFR_Night_XC3.vis + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute Risk", M_VFR_Night_XC3.enrouteRisk, 7, 9);
            };
            btn120Plus.Touch += (s, e) =>
            {
                timeEnroute = sc.button3Pressed(btnLessThan60, btn60to120, btn120Plus, txtTime);
                M_VFR_Night_XC3.enrouteRisk = M_VFR_Night_XC3.ceiling + M_VFR_Night_XC3.vis + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute Risk", M_VFR_Night_XC3.enrouteRisk, 7, 9);
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(M_VFR_Night_XC3));
            };

            btnNext.Click += delegate
            {
                if (M_VFR_Night_XC3.enrouteRisk > 8)
                {
                    sc.alertShow("Enroute Risk", this);
                }
                else
                {
                    StartActivity(typeof(M_VFR_Night_XC5));
                }
            };
        }
Пример #11
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblCheckpoints = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btnMult        = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btnMod         = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btnFew         = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtCheckpoints = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblTimeEnroute = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btnLessThan60  = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn60to120     = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn120Plus     = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtTime        = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblCheckpoints.Text = "Checkpoints (XC)";
            btnMult.Text        = "Multiple";
            btnMod.Text         = "Moderate";
            btnFew.Text         = "Few to none";
            txtCheckpoints.Text = "You have selected the '" + btnMult.Text + "' choice.";

            lblTimeEnroute.Text = "Time enroute";
            btnLessThan60.Text  = "< 60 min";
            btn60to120.Text     = "60 - 120 min";
            btn120Plus.Text     = "> 120 min";
            txtTime.Text        = "You have selected the '" + btnLessThan60.Text + "' choice.";

            ShortCutFunctions sc = new ShortCutFunctions();

            sc.defaultVals(btnMult, btnMod, btnFew, txtCheckpoints, checkpoints);
            sc.defaultVals(btnLessThan60, btn60to120, btn120Plus, txtTime, timeEnroute);

            K_VFR_Dual_XC3.enrouteRisk = K_VFR_Dual_XC3.vis + K_VFR_Dual_XC3.ceiling + K_VFR_Dual_XC3.manu + checkpoints + timeEnroute;
            sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", K_VFR_Dual_XC3.enrouteRisk, 7, 9);

            btnMult.Touch += (s, e) =>
            {
                checkpoints = sc.button1Pressed(btnMult, btnMod, btnFew, txtCheckpoints);
                K_VFR_Dual_XC3.enrouteRisk = K_VFR_Dual_XC3.vis + K_VFR_Dual_XC3.ceiling + K_VFR_Dual_XC3.manu + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", K_VFR_Dual_XC3.enrouteRisk, 7, 9);
            };
            btnMod.Touch += (s, e) =>
            {
                checkpoints = sc.button2Pressed(btnMult, btnMod, btnFew, txtCheckpoints);
                K_VFR_Dual_XC3.enrouteRisk = K_VFR_Dual_XC3.vis + K_VFR_Dual_XC3.ceiling + K_VFR_Dual_XC3.manu + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", K_VFR_Dual_XC3.enrouteRisk, 7, 9);
            };
            btnFew.Touch += (s, e) =>
            {
                checkpoints = sc.button3Pressed(btnMult, btnMod, btnFew, txtCheckpoints);
                K_VFR_Dual_XC3.enrouteRisk = K_VFR_Dual_XC3.vis + K_VFR_Dual_XC3.ceiling + K_VFR_Dual_XC3.manu + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", K_VFR_Dual_XC3.enrouteRisk, 7, 9);
            };

            btnLessThan60.Touch += (s, e) =>
            {
                timeEnroute = sc.button1Pressed(btnLessThan60, btn60to120, btn120Plus, txtTime);
                K_VFR_Dual_XC3.enrouteRisk = K_VFR_Dual_XC3.vis + K_VFR_Dual_XC3.ceiling + K_VFR_Dual_XC3.manu + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", K_VFR_Dual_XC3.enrouteRisk, 7, 9);
            };
            btn60to120.Touch += (s, e) =>
            {
                timeEnroute = sc.button2Pressed(btnLessThan60, btn60to120, btn120Plus, txtTime);
                K_VFR_Dual_XC3.enrouteRisk = K_VFR_Dual_XC3.vis + K_VFR_Dual_XC3.ceiling + K_VFR_Dual_XC3.manu + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", K_VFR_Dual_XC3.enrouteRisk, 7, 9);
            };
            btn120Plus.Touch += (s, e) =>
            {
                timeEnroute = sc.button3Pressed(btnLessThan60, btn60to120, btn120Plus, txtTime);
                K_VFR_Dual_XC3.enrouteRisk = K_VFR_Dual_XC3.vis + K_VFR_Dual_XC3.ceiling + K_VFR_Dual_XC3.manu + checkpoints + timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", K_VFR_Dual_XC3.enrouteRisk, 7, 9);
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(K_VFR_Dual_XC3));
            };

            btnNext.Click += delegate
            {
                if (K_VFR_Dual_XC3.enrouteRisk > 8)
                {
                    AlertDialog.Builder alert = new AlertDialog.Builder(this);
                    alert.SetTitle("Alert");
                    alert.SetMessage("Your enroute or practice area risk is too high!");
                    alert.SetNeutralButton("OK", delegate
                    {
                        alert.Dispose();
                    });
                    alert.Show();
                }
                else
                {
                    StartActivity(typeof(K_VFR_Dual_XC5));
                }
            };
        }
Пример #12
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.h_Layout2);

            // Create your application here
            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblVIs = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn7   = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn6   = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn5   = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtVis = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblFuel   = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btn90     = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn75to90 = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn60to75 = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtFuel   = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblVIs.Text = "Visibility";
            btn7.Text   = "7+ SM";
            btn6.Text   = "6 SM";
            btn5.Text   = "5 SM";
            txtVis.Text = "You have selected the '" + btn7.Text + "' choice.";

            lblFuel.Text   = "Fuel Remaining";
            btn90.Text     = "> 90 min";
            btn75to90.Text = "75 - 90 min";
            btn60to75.Text = "60 - 75 min";
            txtFuel.Text   = "You have selected the '" + btn90.Text + "' choice.";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn7, btn6, btn5, txtVis, vis);
            class1.defaultVals(btn90, btn75to90, btn60to75, txtFuel, fuel);

            I_VFR_Day_XC5.DestinationRisk = vis + fuel + I_VFR_Day_XC5.ceiling + I_VFR_Day_XC5.xwind + I_VFR_Day_XC5.wind;
            class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", I_VFR_Day_XC5.DestinationRisk, 8, 10);

            btn7.Touch += (s, e) =>
            {
                vis = class1.button1Pressed(btn7, btn6, btn5, txtVis);
                I_VFR_Day_XC5.DestinationRisk = vis + fuel + I_VFR_Day_XC5.ceiling + I_VFR_Day_XC5.xwind + I_VFR_Day_XC5.wind;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", I_VFR_Day_XC5.DestinationRisk, 8, 10);
            };
            btn6.Touch += (s, e) =>
            {
                vis = class1.button2Pressed(btn7, btn6, btn5, txtVis);
                I_VFR_Day_XC5.DestinationRisk = vis + fuel + I_VFR_Day_XC5.ceiling + I_VFR_Day_XC5.xwind + I_VFR_Day_XC5.wind;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", I_VFR_Day_XC5.DestinationRisk, 8, 10);
            };
            btn5.Touch += (s, e) =>
            {
                vis = class1.button3Pressed(btn7, btn6, btn5, txtVis);
                I_VFR_Day_XC5.DestinationRisk = vis + fuel + I_VFR_Day_XC5.ceiling + I_VFR_Day_XC5.xwind + I_VFR_Day_XC5.wind;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", I_VFR_Day_XC5.DestinationRisk, 8, 10);
            };

            btn90.Touch += (s, e) =>
            {
                fuel = class1.button1Pressed(btn90, btn75to90, btn60to75, txtFuel);
                I_VFR_Day_XC5.DestinationRisk = vis + fuel + I_VFR_Day_XC5.ceiling + I_VFR_Day_XC5.xwind + I_VFR_Day_XC5.wind;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", I_VFR_Day_XC5.DestinationRisk, 8, 10);
            };
            btn75to90.Touch += (s, e) =>
            {
                fuel = class1.button2Pressed(btn90, btn75to90, btn60to75, txtFuel);
                I_VFR_Day_XC5.DestinationRisk = vis + fuel + I_VFR_Day_XC5.ceiling + I_VFR_Day_XC5.xwind + I_VFR_Day_XC5.wind;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", I_VFR_Day_XC5.DestinationRisk, 8, 10);
            };
            btn60to75.Touch += (s, e) =>
            {
                fuel = class1.button3Pressed(btn90, btn75to90, btn60to75, txtFuel);
                I_VFR_Day_XC5.DestinationRisk = vis + fuel + I_VFR_Day_XC5.ceiling + I_VFR_Day_XC5.xwind + I_VFR_Day_XC5.wind;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", I_VFR_Day_XC5.DestinationRisk, 8, 10);
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(I_VFR_Day_XC5));
            };

            btnNext.Click += delegate
            {
                if (I_VFR_Day_XC5.DestinationRisk > 9)
                {
                    AlertDialog.Builder alert = new AlertDialog.Builder(this);
                    alert.SetTitle("Alert");
                    alert.SetMessage("Your Destination Risk is too high!");
                    alert.SetNeutralButton("OK", delegate
                    {
                        alert.Dispose();
                    });
                    alert.Show();

                    class1.defaultVals(btn7, btn6, btn5, txtVis, vis);
                    class1.defaultVals(btn90, btn75to90, btn60to75, txtFuel, fuel);
                }
                else
                {
                    StartActivity(typeof(I_VFR_Day_XC7));
                }
            };
        }
Пример #13
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblCFILanding = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btnLessThan30 = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn30to45     = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn45Plus     = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtCFILanding = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblOtherLanding = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btnLessThan10   = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn10to14       = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btnPlus14       = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtOtherLanding = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtPICRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtPICRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblCFILanding.Text = "Last dual landing (C, CFI)";
            btnLessThan30.Text = "<30 days";
            btn30to45.Text     = "30 - 45 days";
            btn45Plus.Text     = ">45 days";
            txtCFILanding.Text = "You have selected the '" + btnLessThan30.Text + "' choice.";

            lblOtherLanding.Text = "Last dual landing (Other)";
            btnLessThan10.Text   = "<10 days";
            btn10to14.Text       = "10 - 14 days";
            btnPlus14.Text       = ">14 days";
            txtOtherLanding.Text = "You have selected the '" + btnLessThan10.Text + "' choice.";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btnLessThan30, btn30to45, btn45Plus, txtCFILanding, CFI_Landing);
            class1.defaultVals(btnLessThan10, btn10to14, btnPlus14, txtOtherLanding, Other_Landing);

            class1.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", CFI_Landing + Other_Landing, 1, 3);

            btnLessThan30.Click += delegate
            {
                CFI_Landing = class1.button1Pressed(btnLessThan30, btn30to45, btn45Plus, txtCFILanding);
                class1.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", CFI_Landing + Other_Landing, 1, 3);
            };

            btn30to45.Click += delegate
            {
                CFI_Landing = class1.button2Pressed(btnLessThan30, btn30to45, btn45Plus, txtCFILanding);
                class1.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", CFI_Landing + Other_Landing, 1, 3);
            };

            btn45Plus.Click += delegate
            {
                CFI_Landing = class1.button3Pressed(btnLessThan30, btn30to45, btn45Plus, txtCFILanding);
                class1.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", CFI_Landing + Other_Landing, 1, 3);
            };

            btnLessThan10.Click += delegate
            {
                Other_Landing = class1.button1Pressed(btnLessThan10, btn10to14, btnPlus14, txtOtherLanding);
                class1.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", CFI_Landing + Other_Landing, 1, 3);
            };

            btn10to14.Click += delegate
            {
                Other_Landing = class1.button2Pressed(btnLessThan10, btn10to14, btnPlus14, txtOtherLanding);
                class1.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", CFI_Landing + Other_Landing, 1, 3);
            };

            btnPlus14.Click += delegate
            {
                Other_Landing = class1.button3Pressed(btnLessThan10, btn10to14, btnPlus14, txtOtherLanding);
                class1.riskShow(txtPICRisk, txtPICRiskNum, "PIC Risk", CFI_Landing + Other_Landing, 1, 3);
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(I_VFR_Day_XC8));
            };

            btnNext.Click += delegate
            {
                if (I_VFR_Day_XC7.altRisk > 2)
                {
                    AlertDialog.Builder alert = new AlertDialog.Builder(this);
                    alert.SetTitle("Alert");
                    alert.SetMessage("Your PIC Risk is too high!");
                    alert.SetNeutralButton("OK", delegate
                    {
                        alert.Dispose();
                    });
                    alert.Show();

                    class1.defaultVals(btnLessThan30, btn30to45, btn45Plus, txtCFILanding, CFI_Landing);
                    class1.defaultVals(btnLessThan10, btn10to14, btnPlus14, txtOtherLanding, Other_Landing);
                }
                else
                {
                    StartActivity(typeof(Y_Aircraft_and_Instructor));
                }
            };
        }
Пример #14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblDepartureWind = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn0to15         = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn16to20        = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn21to25        = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtDepartureWind = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblDepartureXwind = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btn0to5           = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn6to10          = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn11to15         = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtDepartureXwind = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblDepartureWind.Text = "Wind";
            btn0to15.Text         = "0 - 15 kts";
            btn16to20.Text        = "16 - 20 kts";
            btn21to25.Text        = "21 - 25 kts";
            txtDepartureWind.Text = "You have selected the '" + btn0to15.Text + "' choice.";

            lblDepartureXwind.Text = "Xwind";
            btn0to5.Text           = "0 - 5 kts";
            btn6to10.Text          = "6 - 10 kts";
            btn11to15.Text         = "11 - 15 kts";
            txtDepartureXwind.Text = "You have selected the '" + btn0to5.Text + "' choice.";

            ShortCutFunctions sc = new ShortCutFunctions();

            sc.defaultVals(btn0to15, btn16to20, btn21to25, txtDepartureWind, wind);
            sc.defaultVals(btn0to5, btn6to10, btn11to15, txtDepartureXwind, xwind);

            departureRisk = wind + xwind + L_VFR_Night_Local2.ceiling + L_VFR_Night_Local2.vis;
            sc.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", departureRisk, 7, 9);

            btn0to15.Touch += (s, e) =>
            {
                wind          = sc.button1Pressed(btn0to15, btn16to20, btn21to25, txtDepartureWind);
                departureRisk = wind + xwind + L_VFR_Night_Local2.ceiling + L_VFR_Night_Local2.vis;
                sc.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", departureRisk, 7, 9);
            };
            btn16to20.Touch += (s, e) =>
            {
                wind          = sc.button2Pressed(btn0to15, btn16to20, btn21to25, txtDepartureWind);
                departureRisk = wind + xwind + L_VFR_Night_Local2.ceiling + L_VFR_Night_Local2.vis;
                sc.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", departureRisk, 7, 9);
            };
            btn21to25.Touch += (s, e) =>
            {
                wind          = sc.button3Pressed(btn0to15, btn16to20, btn21to25, txtDepartureWind);
                departureRisk = wind + xwind + L_VFR_Night_Local2.ceiling + L_VFR_Night_Local2.vis;
                sc.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", departureRisk, 7, 9);
            };

            btn0to5.Touch += (s, e) =>
            {
                xwind         = sc.button1Pressed(btn0to5, btn6to10, btn11to15, txtDepartureXwind);
                departureRisk = wind + xwind + L_VFR_Night_Local2.ceiling + L_VFR_Night_Local2.vis;
                sc.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", departureRisk, 7, 9);
            };
            btn6to10.Touch += (s, e) =>
            {
                xwind         = sc.button2Pressed(btn0to5, btn6to10, btn11to15, txtDepartureXwind);
                departureRisk = wind + xwind + L_VFR_Night_Local2.ceiling + L_VFR_Night_Local2.vis;
                sc.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", departureRisk, 7, 9);
            };
            btn11to15.Touch += (s, e) =>
            {
                xwind         = sc.button3Pressed(btn0to5, btn6to10, btn11to15, txtDepartureXwind);
                departureRisk = wind + xwind + L_VFR_Night_Local2.ceiling + L_VFR_Night_Local2.vis;
                sc.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", departureRisk, 7, 9);
            };

            btnNext.Click += delegate
            {
                StartActivity(typeof(L_VFR_Night_Local2));
            };
            btnBack.Click += delegate
            {
                StartActivity(typeof(G_Student_Human_Factors_2));
            };
        }
Пример #15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.h_Layout_3);

            var lblCeiling    = FindViewById <TextView>(Resource.Id.txtQuestion1);
            var btn4000       = FindViewById <Button>(Resource.Id.btnQ1C1);
            var btn3500to3999 = FindViewById <Button>(Resource.Id.btnQ1C2);
            var btn3000to3499 = FindViewById <Button>(Resource.Id.btnQ1C3);
            var txtCeiling    = FindViewById <TextView>(Resource.Id.txtAnswer1);

            var lblVis = FindViewById <TextView>(Resource.Id.txtQuestion2);
            var btn7   = FindViewById <Button>(Resource.Id.btnQ2C1);
            var btn6   = FindViewById <Button>(Resource.Id.btnQ2C2);
            var btn5   = FindViewById <Button>(Resource.Id.btnQ2C3);
            var txtVis = FindViewById <TextView>(Resource.Id.txtAnswer2);

            var lblAreaManuevers = FindViewById <TextView>(Resource.Id.txtQuestion3);
            var btnNone          = FindViewById <Button>(Resource.Id.btnQ3C1);
            var btn12            = FindViewById <Button>(Resource.Id.btnQ3C2);
            var btn3             = FindViewById <Button>(Resource.Id.btnQ3C3);
            var txtXWindSolo     = FindViewById <TextView>(Resource.Id.txtAnswer3);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txtRiskText);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txtRiskNum);
            var btnBack    = FindViewById <ImageButton>(Resource.Id.btnBackfrom3);
            var btnNext    = FindViewById <ImageButton>(Resource.Id.btnContinueFrom3);

            lblCeiling.Text    = "Ceiling";
            btn4000.Text       = "4000+ ft";
            btn3500to3999.Text = "3500 - 3999 ft";
            btn3000to3499.Text = "3000 - 3499 ft";

            lblVis.Text = "Visibility";
            btn7.Text   = "7+ SM";
            btn6.Text   = "6 SM";
            btn5.Text   = "5 SM";

            lblAreaManuevers.Text = "Area Manuevers";
            btnNone.Text          = "None";
            btn12.Text            = "1 - 2";
            btn3.Text             = "3 or more";

            ShortCutFunctions sc = new ShortCutFunctions();

            sc.defaultVals(btn4000, btn3500to3999, btn3000to3499, txtCeiling, ceiling);
            sc.defaultVals(btn7, btn6, btn5, txtVis, vis);
            sc.defaultVals(btnNone, btn12, btn3, txtXWindSolo, manu);

            enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
            sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);

            btn4000.Touch += (s, e) =>
            {
                ceiling     = sc.button1Pressed(btn4000, btn3500to3999, btn3000to3499, txtCeiling);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };
            btn3500to3999.Touch += (s, e) =>
            {
                ceiling     = sc.button2Pressed(btn4000, btn3500to3999, btn3000to3499, txtCeiling);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };
            btn3000to3499.Touch += (s, e) =>
            {
                ceiling     = sc.button3Pressed(btn4000, btn3500to3999, btn3000to3499, txtCeiling);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };

            btn7.Touch += (s, e) =>
            {
                vis         = sc.button1Pressed(btn7, btn6, btn5, txtVis);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };
            btn6.Touch += (s, e) =>
            {
                vis         = sc.button2Pressed(btn7, btn6, btn5, txtVis);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };
            btn5.Touch += (s, e) =>
            {
                vis         = sc.button3Pressed(btn7, btn6, btn5, txtVis);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };

            btnNone.Touch += (s, e) =>
            {
                manu        = sc.button1Pressed(btnNone, btn12, btn3, txtXWindSolo);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };
            btn12.Touch += (s, e) =>
            {
                manu        = sc.button2Pressed(btnNone, btn12, btn3, txtXWindSolo);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };
            btn3.Touch += (s, e) =>
            {
                manu        = sc.button3Pressed(btnNone, btn12, btn3, txtXWindSolo);
                enrouteRisk = ceiling + vis + manu + K_VFR_Dual_XC4.checkpoints + K_VFR_Dual_XC4.timeEnroute;
                sc.riskShow(txtRisk, txtRiskNum, "Enroute or Practice Area Risk", enrouteRisk, 7, 9);
            };

            btnBack.Touch += (s, e) =>
            {
                StartActivity(typeof(K_VFR_Dual_XC2));
            };

            btnNext.Touch += (s, e) =>
            {
                StartActivity(typeof(K_VFR_Dual_XC4));
            };
        }
Пример #16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.h_Layout_3);

            var lblbVis = FindViewById <TextView>(Resource.Id.txtQuestion1);
            var btn7    = FindViewById <Button>(Resource.Id.btnQ1C1);
            var bnt6    = FindViewById <Button>(Resource.Id.btnQ1C2);
            var btn5    = FindViewById <Button>(Resource.Id.btnQ1C3);
            var txtVis  = FindViewById <TextView>(Resource.Id.txtAnswer1);

            var lblFuel = FindViewById <TextView>(Resource.Id.txtQuestion2);
            var btn90   = FindViewById <Button>(Resource.Id.btnQ2C1);
            var btn75   = FindViewById <Button>(Resource.Id.btnQ2C2);
            var btn60   = FindViewById <Button>(Resource.Id.btnQ2C3);
            var txtFuel = FindViewById <TextView>(Resource.Id.txtAnswer2);

            var lblIAP       = FindViewById <TextView>(Resource.Id.txtQuestion3);
            var btnPrecisoin = FindViewById <Button>(Resource.Id.btnQ3C1);
            var btnNon       = FindViewById <Button>(Resource.Id.btnQ3C2);
            var btnCircle    = FindViewById <Button>(Resource.Id.btnQ3C3);
            var txtIAP       = FindViewById <TextView>(Resource.Id.txtAnswer3);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txtRiskText);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txtRiskNum);

            lblbVis.Text = "Visibility";
            btn7.Text    = "7+ SM";
            bnt6.Text    = "6 SM";
            btn5.Text    = "5 SM";

            lblFuel.Text = "Fuel Remaining";
            btn90.Text   = "> 76 min";
            btn75.Text   = "60 - 75 min";
            btn60.Text   = "45 - 60 min";

            lblIAP.Text       = "Best IAP Available";
            btnPrecisoin.Text = "Precision";
            btnNon.Text       = "Non-Precision";
            btnCircle.Text    = "Circling";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn7, bnt6, btn5, txtVis, vis);
            class1.defaultVals(btn90, btn75, btn60, txtFuel, fuel);
            class1.defaultVals(btnPrecisoin, btnNon, btnCircle, txtIAP, iap);

            M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
            class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);

            btn7.Touch += (s, e) =>
            {
                vis = class1.button1Pressed(btn7, bnt6, btn5, txtVis);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };
            bnt6.Touch += (s, e) =>
            {
                vis = class1.button2Pressed(btn7, bnt6, btn5, txtVis);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };
            btn5.Touch += (s, e) =>
            {
                vis = class1.button3Pressed(btn7, bnt6, btn5, txtVis);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };

            btn90.Touch += (s, e) =>
            {
                fuel = class1.button1Pressed(btn90, btn75, btn60, txtFuel);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };
            btn75.Touch += (s, e) =>
            {
                fuel = class1.button2Pressed(btn90, btn75, btn60, txtFuel);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };
            btn60.Touch += (s, e) =>
            {
                fuel = class1.button3Pressed(btn90, btn75, btn60, txtFuel);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };

            btnPrecisoin.Touch += (s, e) =>
            {
                iap = class1.button1Pressed(btnPrecisoin, btnNon, btnCircle, txtIAP);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };
            btnNon.Touch += (s, e) =>
            {
                iap = class1.button2Pressed(btnPrecisoin, btnNon, btnCircle, txtIAP);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };
            btnCircle.Touch += (s, e) =>
            {
                iap = class1.button3Pressed(btnPrecisoin, btnNon, btnCircle, txtIAP);
                M_VFR_Night_XC7.altRisk = M_VFR_Night_XC7.wind + M_VFR_Night_XC7.xwind + M_VFR_Night_XC7.ceiling + vis + fuel + iap;
                class1.riskShow(txtRisk, txtRiskNum, "Alternate Risk", M_VFR_Night_XC7.altRisk, 9, 12);
            };

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom3);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom3);

            btnNext.Click += delegate
            {
                if (M_VFR_Night_XC7.altRisk > 11)
                {
                    class1.alertShow("Alternate Risk", this);
                }
                else
                {
                    StartActivity(typeof(M_VFR_Night_XC9));
                }
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(M_VFR_Night_XC7));
            };
        }
Пример #17
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.h_Layout_3);

            var lblLast   = FindViewById <TextView>(Resource.Id.txtQuestion1);
            var btn30     = FindViewById <Button>(Resource.Id.btnQ1C1);
            var btn30to45 = FindViewById <Button>(Resource.Id.btnQ1C2);
            var btn45     = FindViewById <Button>(Resource.Id.btnQ1C3);
            var txtLast   = FindViewById <TextView>(Resource.Id.txtAnswer1);

            var lblDual    = FindViewById <TextView>(Resource.Id.txtQuestion2);
            var btnLess30  = FindViewById <Button>(Resource.Id.btnQ2C1);
            var btn30to452 = FindViewById <Button>(Resource.Id.btnQ2C2);
            var btn45Plus  = FindViewById <Button>(Resource.Id.btnQ2C3);
            var txtDulal   = FindViewById <TextView>(Resource.Id.txtAnswer2);

            var lblIFR = FindViewById <TextView>(Resource.Id.txtQuestion3);
            var btnYes = FindViewById <Button>(Resource.Id.btnQ3C1);
            var btnNon = FindViewById <Button>(Resource.Id.btnQ3C2);
            var btnNo  = FindViewById <Button>(Resource.Id.btnQ3C3);
            var txtiFR = FindViewById <TextView>(Resource.Id.txtAnswer3);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txtRiskText);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txtRiskNum);

            lblLast.Text   = "Last Dual Landing";
            btn30.Text     = "< 30 days";
            btn30to45.Text = "30 - 45 days";
            btn45.Text     = "> 45 days";

            lblDual.Text    = "Dual Instrument Approach";
            btnLess30.Text  = "< 30 days";
            btn30to452.Text = "30 - 45 days";
            btn45Plus.Text  = "> 45 days";

            lblIFR.Text       = "IFR Current?";
            btnYes.Text       = "Yes";
            btnNon.Text       = "Non-Precision";
            btnNon.Visibility = ViewStates.Invisible;
            btnNo.Text        = "No";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn30, btn30to45, btn45, txtLast, last);
            class1.defaultVals(btnLess30, btn30to452, btn45Plus, txtDulal, dual);
            class1.defaultVals(btnYes, btnNon, btnNo, txtiFR, curr);

            PIC = last + dual + curr;
            class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);

            btn30.Touch += (s, e) =>
            {
                last = class1.button1Pressed(btn30, btn30to45, btn45, txtLast);
                PIC  = last + dual + curr;
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);
            };
            btn30to45.Touch += (s, e) =>
            {
                last = class1.button2Pressed(btn30, btn30to45, btn45, txtLast);
                PIC  = last + dual + curr;
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);
            };
            btn45.Touch += (s, e) =>
            {
                last = class1.button3Pressed(btn30, btn30to45, btn45, txtLast);
                PIC  = last + dual + curr;
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);
            };

            btnLess30.Touch += (s, e) =>
            {
                dual = class1.button1Pressed(btnLess30, btn30to452, btn45Plus, txtDulal);
                PIC  = last + dual + curr;
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);
            };
            btn30to452.Touch += (s, e) =>
            {
                dual = class1.button2Pressed(btnLess30, btn30to452, btn45Plus, txtDulal);
                PIC  = last + dual + curr;
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);
            };
            btn45Plus.Touch += (s, e) =>
            {
                dual = class1.button3Pressed(btnLess30, btn30to452, btn45Plus, txtDulal);
                PIC  = last + dual + curr;
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);
            };

            btnYes.Touch += (s, e) =>
            {
                curr = class1.button1Pressed(btnYes, btnNon, btnNo, txtiFR);
                PIC  = last + dual + curr;
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);
            };
            btnNo.Touch += (s, e) =>
            {
                curr = class1.button3Pressed(btnYes, btnNon, btnNo, txtiFR);
                PIC  = last + dual + curr;
                class1.riskShow(txtRisk, txtRiskNum, "PIC Risk", PIC, 2, 3);
            };

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom3);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom3);

            btnNext.Click += delegate
            {
                if (PIC > 2)
                {
                    class1.alertShow("PIC Risk", this);
                }
                else
                {
                    StartActivity(typeof(Y_Aircraft_and_Instructor));
                }
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(O_IFR_Day_XC_4Alternate));
            };
        }
Пример #18
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var lblxwind  = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn0to5   = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn6to10  = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn11to15 = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtxwind  = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblCeiling = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btn4000    = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn3500    = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn3000    = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtCeiling = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);
            var btnBack    = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);
            var btnNext    = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);

            lblxwind.Text  = "Xwind";
            btn0to5.Text   = "0 - 5 kts";
            btn6to10.Text  = "6 - 10 kts";
            btn11to15.Text = "11 - 15 kts";

            lblCeiling.Text = "Ceiling";
            btn4000.Text    = "4000 ft";
            btn3500.Text    = "3500 - 3999 ft";
            btn3000.Text    = "3000 - 3499 ft";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn0to5, btn6to10, btn11to15, txtxwind, xwind);
            class1.defaultVals(btn4000, btn3500, btn3000, txtCeiling, ceiling);

            K_VFR_Dual_XC5.DestinationRisk = K_VFR_Dual_XC5.windPime + K_VFR_Dual_XC5.windComm + K_VFR_Dual_XC5.windCFI + xwind + ceiling + K_VFR_Dual_XC7.fuel + K_VFR_Dual_XC7.vis;
            class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", K_VFR_Dual_XC5.DestinationRisk, 8, 10);

            btn0to5.Touch += (s, e) =>
            {
                xwind = class1.button1Pressed(btn0to5, btn6to10, btn11to15, txtxwind);
                K_VFR_Dual_XC5.DestinationRisk = K_VFR_Dual_XC5.windPime + K_VFR_Dual_XC5.windComm + K_VFR_Dual_XC5.windCFI + xwind + ceiling + K_VFR_Dual_XC7.fuel + K_VFR_Dual_XC7.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", K_VFR_Dual_XC5.DestinationRisk, 8, 10);
            };
            btn6to10.Touch += (s, e) =>
            {
                xwind = class1.button2Pressed(btn0to5, btn6to10, btn11to15, txtxwind);
                K_VFR_Dual_XC5.DestinationRisk = K_VFR_Dual_XC5.windPime + K_VFR_Dual_XC5.windComm + K_VFR_Dual_XC5.windCFI + xwind + ceiling + K_VFR_Dual_XC7.fuel + K_VFR_Dual_XC7.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", K_VFR_Dual_XC5.DestinationRisk, 8, 10);
            };
            btn11to15.Touch += (s, e) =>
            {
                xwind = class1.button3Pressed(btn0to5, btn6to10, btn11to15, txtxwind);
                K_VFR_Dual_XC5.DestinationRisk = K_VFR_Dual_XC5.windPime + K_VFR_Dual_XC5.windComm + K_VFR_Dual_XC5.windCFI + xwind + ceiling + K_VFR_Dual_XC7.fuel + K_VFR_Dual_XC7.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", K_VFR_Dual_XC5.DestinationRisk, 8, 10);
            };

            btn4000.Touch += (s, e) =>
            {
                ceiling = class1.button1Pressed(btn4000, btn3500, btn3000, txtCeiling);
                K_VFR_Dual_XC5.DestinationRisk = K_VFR_Dual_XC5.windPime + K_VFR_Dual_XC5.windComm + K_VFR_Dual_XC5.windCFI + xwind + ceiling + K_VFR_Dual_XC7.fuel + K_VFR_Dual_XC7.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", K_VFR_Dual_XC5.DestinationRisk, 8, 10);
            };
            btn3500.Touch += (s, e) =>
            {
                ceiling = class1.button2Pressed(btn4000, btn3500, btn3000, txtCeiling);
                K_VFR_Dual_XC5.DestinationRisk = K_VFR_Dual_XC5.windPime + K_VFR_Dual_XC5.windComm + K_VFR_Dual_XC5.windCFI + xwind + ceiling + K_VFR_Dual_XC7.fuel + K_VFR_Dual_XC7.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", K_VFR_Dual_XC5.DestinationRisk, 8, 10);
            };
            btn3000.Touch += (s, e) =>
            {
                ceiling = class1.button3Pressed(btn4000, btn3500, btn3000, txtCeiling);
                K_VFR_Dual_XC5.DestinationRisk = K_VFR_Dual_XC5.windPime + K_VFR_Dual_XC5.windComm + K_VFR_Dual_XC5.windCFI + xwind + ceiling + K_VFR_Dual_XC7.fuel + K_VFR_Dual_XC7.vis;
                class1.riskShow(txtRisk, txtRiskNum, "Destination or Aux Field Risk", K_VFR_Dual_XC5.DestinationRisk, 8, 10);
            };

            btnBack.Touch += (s, e) =>
            {
                StartActivity(typeof(K_VFR_Dual_XC5));
            };

            btnNext.Touch += (s, e) =>
            {
                StartActivity(typeof(K_VFR_Dual_XC7));
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.h_Layout2);

            var lblNight  = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn1500   = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn1200   = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn1000to = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtNight  = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblDay  = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btn1000 = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn800  = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn600  = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtDay  = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblNight.Text  = "Ceiling (Night)";
            btn1500.Text   = "> 1500 ft";
            btn1200.Text   = "1200 - 1499 ft";
            btn1000to.Text = "1000 - 1199 ft";

            lblDay.Text  = "Ceiling (Day)";
            btn1000.Text = "> 1000 ft";
            btn800.Text  = "800 - 999 ft";
            btn600.Text  = "600 - 799 ft";

            ShortCutFunctions sc = new ShortCutFunctions();

            sc.defaultVals(btn1500, btn1200, btn1000to, txtNight, nightCeiling);
            sc.defaultVals(btn1000, btn800, btn600, txtDay, dayCeiling);

            if (Q_IFR_Dual_XC_1DayNight.time == 0)
            {
                ceilingRisk          = dayCeiling;
                lblDay.Visibility    = ViewStates.Visible;
                btn1000.Visibility   = ViewStates.Visible;
                btn800.Visibility    = ViewStates.Visible;
                btn600.Visibility    = ViewStates.Visible;
                txtDay.Visibility    = ViewStates.Visible;
                lblNight.Visibility  = ViewStates.Invisible;
                btn1500.Visibility   = ViewStates.Invisible;
                btn1200.Visibility   = ViewStates.Invisible;
                btn1000to.Visibility = ViewStates.Invisible;
                txtNight.Visibility  = ViewStates.Invisible;
            }
            else if (Q_IFR_Dual_XC_1DayNight.time == 1)
            {
                ceilingRisk          = nightCeiling;
                lblDay.Visibility    = ViewStates.Invisible;
                btn1000.Visibility   = ViewStates.Invisible;
                btn800.Visibility    = ViewStates.Invisible;
                btn600.Visibility    = ViewStates.Invisible;
                lblNight.Visibility  = ViewStates.Visible;
                btn1500.Visibility   = ViewStates.Visible;
                btn1200.Visibility   = ViewStates.Visible;
                btn1000to.Visibility = ViewStates.Visible;
                txtNight.Visibility  = ViewStates.Visible;
                txtDay.Visibility    = ViewStates.Invisible;
            }
            else
            {
                ceilingRisk          = dayCeiling + nightCeiling;
                lblDay.Visibility    = ViewStates.Visible;
                btn1000.Visibility   = ViewStates.Visible;
                btn800.Visibility    = ViewStates.Visible;
                btn600.Visibility    = ViewStates.Visible;
                lblNight.Visibility  = ViewStates.Visible;
                btn1500.Visibility   = ViewStates.Visible;
                btn1200.Visibility   = ViewStates.Visible;
                btn1000to.Visibility = ViewStates.Visible;
                txtDay.Visibility    = ViewStates.Visible;
                txtNight.Visibility  = ViewStates.Visible;
            }
            Q_IFR_Dual_XC_6Destination.destinationRisk = Q_IFR_Dual_XC5.risk1 + Q_IFR_Dual_XC5.risk2 + Q_IFR_Dual_XC6.risk3 + Q_IFR_Dual_XC6.risk4 + Q_IFR_Dual_XC_5DestinationDayandNight.ceilingRisk;
            sc.riskShow(txtRisk, txtRiskNum, "Destination Risk", Q_IFR_Dual_XC_6Destination.destinationRisk, 8, 10);

            btn1500.Touch += (s, e) =>
            {
                nightCeiling = sc.button1Pressed(btn1500, btn1200, btn1000to, txtNight);
                if (Q_IFR_Dual_XC_1DayNight.time == 0)
                {
                    ceilingRisk          = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (Q_IFR_Dual_XC_1DayNight.time == 1)
                {
                    ceilingRisk          = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    ceilingRisk          = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                Q_IFR_Dual_XC_6Destination.destinationRisk = Q_IFR_Dual_XC5.risk1 + Q_IFR_Dual_XC5.risk2 + Q_IFR_Dual_XC6.risk3 + Q_IFR_Dual_XC6.risk4 + Q_IFR_Dual_XC_5DestinationDayandNight.ceilingRisk;
                sc.riskShow(txtRisk, txtRiskNum, "Destination Risk", Q_IFR_Dual_XC_6Destination.destinationRisk, 8, 10);
            };
            btn1200.Touch += (s, e) =>
            {
                nightCeiling = sc.button2Pressed(btn1500, btn1200, btn1000to, txtNight);
                if (Q_IFR_Dual_XC_1DayNight.time == 0)
                {
                    ceilingRisk          = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (Q_IFR_Dual_XC_1DayNight.time == 1)
                {
                    ceilingRisk          = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    ceilingRisk          = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                Q_IFR_Dual_XC_6Destination.destinationRisk = Q_IFR_Dual_XC5.risk1 + Q_IFR_Dual_XC5.risk2 + Q_IFR_Dual_XC6.risk3 + Q_IFR_Dual_XC6.risk4 + Q_IFR_Dual_XC_5DestinationDayandNight.ceilingRisk;
                sc.riskShow(txtRisk, txtRiskNum, "Destination Risk", Q_IFR_Dual_XC_6Destination.destinationRisk, 8, 10);
            };
            btn1000to.Touch += (s, e) =>
            {
                nightCeiling = sc.button3Pressed(btn1500, btn1200, btn1000to, txtNight);
                if (Q_IFR_Dual_XC_1DayNight.time == 0)
                {
                    ceilingRisk          = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (Q_IFR_Dual_XC_1DayNight.time == 1)
                {
                    ceilingRisk          = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    ceilingRisk          = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                Q_IFR_Dual_XC_6Destination.destinationRisk = Q_IFR_Dual_XC5.risk1 + Q_IFR_Dual_XC5.risk2 + Q_IFR_Dual_XC6.risk3 + Q_IFR_Dual_XC6.risk4 + Q_IFR_Dual_XC_5DestinationDayandNight.ceilingRisk;
                sc.riskShow(txtRisk, txtRiskNum, "Destination Risk", Q_IFR_Dual_XC_6Destination.destinationRisk, 8, 10);
            };

            btn1000.Touch += (s, e) =>
            {
                dayCeiling = sc.button1Pressed(btn1000, btn800, btn600, txtDay);
                if (Q_IFR_Dual_XC_1DayNight.time == 0)
                {
                    ceilingRisk          = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (Q_IFR_Dual_XC_1DayNight.time == 1)
                {
                    ceilingRisk          = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    ceilingRisk          = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                Q_IFR_Dual_XC_6Destination.destinationRisk = Q_IFR_Dual_XC5.risk1 + Q_IFR_Dual_XC5.risk2 + Q_IFR_Dual_XC6.risk3 + Q_IFR_Dual_XC6.risk4 + Q_IFR_Dual_XC_5DestinationDayandNight.ceilingRisk;
                sc.riskShow(txtRisk, txtRiskNum, "Destination Risk", Q_IFR_Dual_XC_6Destination.destinationRisk, 8, 10);
            };
            btn800.Touch += (s, e) =>
            {
                dayCeiling = sc.button2Pressed(btn1000, btn800, btn600, txtDay);
                if (Q_IFR_Dual_XC_1DayNight.time == 0)
                {
                    ceilingRisk          = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (Q_IFR_Dual_XC_1DayNight.time == 1)
                {
                    ceilingRisk          = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    ceilingRisk          = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                Q_IFR_Dual_XC_6Destination.destinationRisk = Q_IFR_Dual_XC5.risk1 + Q_IFR_Dual_XC5.risk2 + Q_IFR_Dual_XC6.risk3 + Q_IFR_Dual_XC6.risk4 + Q_IFR_Dual_XC_5DestinationDayandNight.ceilingRisk;
                sc.riskShow(txtRisk, txtRiskNum, "Destination Risk", Q_IFR_Dual_XC_6Destination.destinationRisk, 8, 10);
            };
            btn600.Touch += (s, e) =>
            {
                dayCeiling = sc.button3Pressed(btn1000, btn800, btn600, txtDay);
                if (Q_IFR_Dual_XC_1DayNight.time == 0)
                {
                    ceilingRisk          = dayCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Invisible;
                    btn1500.Visibility   = ViewStates.Invisible;
                    btn1200.Visibility   = ViewStates.Invisible;
                    btn1000to.Visibility = ViewStates.Invisible;
                    txtNight.Visibility  = ViewStates.Invisible;
                }
                else if (Q_IFR_Dual_XC_1DayNight.time == 1)
                {
                    ceilingRisk          = nightCeiling;
                    lblDay.Visibility    = ViewStates.Invisible;
                    btn1000.Visibility   = ViewStates.Invisible;
                    btn800.Visibility    = ViewStates.Invisible;
                    btn600.Visibility    = ViewStates.Invisible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Invisible;
                }
                else
                {
                    ceilingRisk          = dayCeiling + nightCeiling;
                    lblDay.Visibility    = ViewStates.Visible;
                    btn1000.Visibility   = ViewStates.Visible;
                    btn800.Visibility    = ViewStates.Visible;
                    btn600.Visibility    = ViewStates.Visible;
                    lblNight.Visibility  = ViewStates.Visible;
                    btn1500.Visibility   = ViewStates.Visible;
                    btn1200.Visibility   = ViewStates.Visible;
                    btn1000to.Visibility = ViewStates.Visible;
                    txtDay.Visibility    = ViewStates.Visible;
                    txtNight.Visibility  = ViewStates.Visible;
                }
                Q_IFR_Dual_XC_6Destination.destinationRisk = Q_IFR_Dual_XC5.risk1 + Q_IFR_Dual_XC5.risk2 + Q_IFR_Dual_XC6.risk3 + Q_IFR_Dual_XC6.risk4 + Q_IFR_Dual_XC_5DestinationDayandNight.ceilingRisk;
                sc.riskShow(txtRisk, txtRiskNum, "Destination Risk", Q_IFR_Dual_XC_6Destination.destinationRisk, 8, 10);
            };


            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            btnNext.Click += delegate
            {
                StartActivity(typeof(Q_IFR_Dual_XC_6Destination));
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(Q_IFR_Dual_XC_4Enroute));
            };
        }
Пример #20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.h_Layout2);

            // Create your application here
            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblVIs = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn7   = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn6   = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn5   = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtVis = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblCeiling = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btn4000    = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btn3500    = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btn3000    = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtCieling = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblVIs.Text = "Visibility";
            btn7.Text   = "7+ SM";
            btn6.Text   = "6 SM";
            btn5.Text   = "5 SM";
            txtVis.Text = "You have selected the '" + btn7.Text + "' choice.";

            lblCeiling.Text = "Ceiling";
            btn4000.Text    = "4000+ ft";
            btn3500.Text    = "3500 - 3999 ft";
            btn3000.Text    = "3000 - 3499 ft";
            txtCieling.Text = "You have selected the '" + btn4000.Text + "' choice.";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn7, btn6, btn5, txtVis, vis);
            class1.defaultVals(btn4000, btn3500, btn3000, txtCieling, ceiling);

            L_VFR_Night_Local1.departureRisk = vis + ceiling + L_VFR_Night_Local1.wind + L_VFR_Night_Local1.xwind;
            class1.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", L_VFR_Night_Local1.departureRisk, 7, 9);

            btn7.Touch += (s, e) =>
            {
                vis = class1.button1Pressed(btn7, btn6, btn5, txtVis);
                L_VFR_Night_Local1.departureRisk = vis + ceiling + L_VFR_Night_Local1.wind + L_VFR_Night_Local1.xwind;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", L_VFR_Night_Local1.departureRisk, 7, 9);
            };
            btn6.Touch += (s, e) =>
            {
                vis = class1.button2Pressed(btn7, btn6, btn5, txtVis);
                L_VFR_Night_Local1.departureRisk = vis + ceiling + L_VFR_Night_Local1.wind + L_VFR_Night_Local1.xwind;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", L_VFR_Night_Local1.departureRisk, 7, 9);
            };
            btn5.Touch += (s, e) =>
            {
                vis = class1.button3Pressed(btn7, btn6, btn5, txtVis);
                L_VFR_Night_Local1.departureRisk = vis + ceiling + L_VFR_Night_Local1.wind + L_VFR_Night_Local1.xwind;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", L_VFR_Night_Local1.departureRisk, 7, 9);
            };

            btn4000.Touch += (s, e) =>
            {
                ceiling = class1.button1Pressed(btn4000, btn3500, btn3000, txtCieling);
                L_VFR_Night_Local1.departureRisk = vis + ceiling + L_VFR_Night_Local1.wind + L_VFR_Night_Local1.xwind;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", L_VFR_Night_Local1.departureRisk, 7, 9);
            };
            btn3500.Touch += (s, e) =>
            {
                ceiling = class1.button2Pressed(btn4000, btn3500, btn3000, txtCieling);
                L_VFR_Night_Local1.departureRisk = vis + ceiling + L_VFR_Night_Local1.wind + L_VFR_Night_Local1.xwind;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", L_VFR_Night_Local1.departureRisk, 7, 9);
            };
            btn3000.Touch += (s, e) =>
            {
                ceiling = class1.button3Pressed(btn4000, btn3500, btn3000, txtCieling);
                L_VFR_Night_Local1.departureRisk = vis + ceiling + L_VFR_Night_Local1.wind + L_VFR_Night_Local1.xwind;
                class1.riskShow(txtRisk, txtRiskNum, "Departure Airfield Risk", L_VFR_Night_Local1.departureRisk, 7, 9);
            };

            btnBack.Click += delegate
            {
                StartActivity(typeof(L_VFR_Night_Local1));
            };

            btnNext.Click += delegate
            {
                if (L_VFR_Night_Local1.departureRisk > 8)
                {
                    class1.alertShow("Departure Airfield Risk", this);

                    class1.defaultVals(btn7, btn6, btn5, txtVis, vis);
                    class1.defaultVals(btn4000, btn3500, btn3000, txtCieling, ceiling);
                }
                else
                {
                    StartActivity(typeof(L_VFR_Night_Local3));
                }
            };
        }
Пример #21
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here
            SetContentView(Resource.Layout.h_Layout2);

            var btnNext = FindViewById <ImageButton>(Resource.Id.btnContinueFrom2);
            var btnBack = FindViewById <ImageButton>(Resource.Id.btnBackfrom2);

            var lblxwind  = FindViewById <TextView>(Resource.Id.txt2Question1);
            var btn0to5   = FindViewById <Button>(Resource.Id.btn2Q1C1);
            var btn6to10  = FindViewById <Button>(Resource.Id.btn2Q1C2);
            var btn11to15 = FindViewById <Button>(Resource.Id.btn2Q1C3);
            var txtxwind  = FindViewById <TextView>(Resource.Id.txt2Answer1);

            var lblTime  = FindViewById <TextView>(Resource.Id.txt2Question2);
            var btnDay   = FindViewById <Button>(Resource.Id.btn2Q2C1);
            var btnNight = FindViewById <Button>(Resource.Id.btn2Q2C2);
            var btnBoth  = FindViewById <Button>(Resource.Id.btn2Q2C3);
            var txtTime  = FindViewById <TextView>(Resource.Id.txt2Answer2);

            var txtRisk    = FindViewById <TextView>(Resource.Id.txt2RiskText2);
            var txtRiskNum = FindViewById <TextView>(Resource.Id.txt2RiskNum);

            lblxwind.Text  = "Xwind";
            btn0to5.Text   = "0 - 5 kts";
            btn6to10.Text  = "6 - 10 kts";
            btn11to15.Text = "11 to 15 kts";
            txtxwind.Text  = "You have selected the '" + btn0to5.Text + "' choice.";

            lblTime.Text  = "What time of day are you flying?";
            btnDay.Text   = "Day";
            btnNight.Text = "Night";
            btnBoth.Text  = "Both Day and Night";
            txtTime.Text  = "You have selected the '" + btnDay.Text + "' choice.";

            ShortCutFunctions class1 = new ShortCutFunctions();

            class1.defaultVals(btn0to5, btn6to10, btn11to15, txtxwind, xwind);
            class1.defaultVals(btnDay, btnNight, btnBoth, txtTime, time);


            if (time == 0)
            {
                J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local3Day.ceilingDay + J_VFR_Dual_Local3Day.visDay;
            }
            else if (time == 1)
            {
                J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
            }
            else
            {
                J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local4Night.nightVis + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local3Day.visDay + J_VFR_Dual_Local3Day.ceilingDay;
            }

            class1.riskShow(txtRisk, txtRiskNum, "Home Airfield Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);

            btn0to5.Touch += (s, e) =>
            {
                xwind = class1.button1Pressed(btn0to5, btn6to10, btn11to15, txtxwind);

                if (time == 0)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local3Day.ceilingDay + J_VFR_Dual_Local3Day.visDay;
                }
                else if (time == 1)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local4Night.nightVis + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local3Day.visDay + J_VFR_Dual_Local3Day.ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "Home Airfield Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };
            btn6to10.Touch += (s, e) =>
            {
                xwind = class1.button2Pressed(btn0to5, btn6to10, btn11to15, txtxwind);

                if (time == 0)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local3Day.ceilingDay + J_VFR_Dual_Local3Day.visDay;
                }
                else if (time == 1)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local4Night.nightVis + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local3Day.visDay + J_VFR_Dual_Local3Day.ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "Home Airfield Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };
            btn11to15.Touch += (s, e) =>
            {
                xwind = class1.button3Pressed(btn0to5, btn6to10, btn11to15, txtxwind);

                if (time == 0)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local3Day.ceilingDay + J_VFR_Dual_Local3Day.visDay;
                }
                else if (time == 1)
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local4Night.nightVis;
                }
                else
                {
                    J_VFR_Dual_Local1.homeRisk = J_VFR_Dual_Local1.windCFI + J_VFR_Dual_Local1.windComm + J_VFR_Dual_Local1.windPime + xwind + J_VFR_Dual_Local4Night.nightVis + J_VFR_Dual_Local4Night.nightCeiling + J_VFR_Dual_Local3Day.visDay + J_VFR_Dual_Local3Day.ceilingDay;
                }
                class1.riskShow(txtRisk, txtRiskNum, "Home Airfield Risk", J_VFR_Dual_Local1.homeRisk, 7, 9);
            };

            btnDay.Touch += (s, e) =>
            {
                time = class1.button1Pressed(btnDay, btnNight, btnBoth, txtTime);
            };
            btnNight.Touch += (s, e) =>
            {
                time = class1.button2Pressed(btnDay, btnNight, btnBoth, txtTime);
            };
            btnBoth.Touch += (s, e) =>
            {
                time = class1.button3Pressed(btnDay, btnNight, btnBoth, txtTime);
            };

            btnNext.Touch += (s, e) =>
            {
                if (time == 0 || time == 3)
                {
                    StartActivity(typeof(J_VFR_Dual_Local3Day));
                }
                else if (time == 1)
                {
                    StartActivity(typeof(J_VFR_Dual_Local4Night));
                }
            };

            btnBack.Touch += (s, e) =>
            {
                StartActivity(typeof(J_VFR_Dual_Local1));
            };
        }