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

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

            TextView tv1 = FindViewById <TextView> (Resource.Id.editText1);
            TextView tv2 = FindViewById <TextView> (Resource.Id.editText2);
            TextView tv3 = FindViewById <TextView> (Resource.Id.editText3);
            TextView tv4 = FindViewById <TextView> (Resource.Id.editText4);
            TextView tv5 = FindViewById <TextView> (Resource.Id.editText5);
            TextView tv6 = FindViewById <TextView> (Resource.Id.editText6);
            TextView tv7 = FindViewById <TextView> (Resource.Id.editText7);

            // Create your application here

            decimal[] AREA = new decimal[9];
            AREA [0] = 1000;
            AREA [1] = 100000000;
            AREA [2] = 1020;
            AREA [3] = 986;
            AREA [4] = 750060;
            AREA [5] = 10197;
            AREA [6] = 14505;

            tv1.TextChanged += delegate
            {
                if (tv1.IsFocused)
                {
                    if (tv1.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[1] * AREA[0]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[2] * AREA[0]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[3] * AREA[0]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[4] * AREA[0]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[5] * AREA[0]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[6] * AREA[0]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = "";
                    }
                }
            };
            tv2.TextChanged += delegate
            {
                if (tv2.IsFocused)
                {
                    if (tv2.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[0] * AREA[1]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[2] * AREA[1]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[3] * AREA[1]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[4] * AREA[1]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[5] * AREA[1]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[6] * AREA[1]).ToString());
                    }
                    else
                    {
                        tv1.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = "";
                    }
                }
            };
            tv3.TextChanged += delegate
            {
                if (tv3.IsFocused)
                {
                    if (tv3.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[1] * AREA[2]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[0] * AREA[2]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[3] * AREA[2]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[4] * AREA[2]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[5] * AREA[2]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[6] * AREA[2]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv1.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = "";
                    }
                }
            };
            tv4.TextChanged += delegate
            {
                if (tv4.IsFocused)
                {
                    if (tv4.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[1] * AREA[3]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[2] * AREA[3]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[0] * AREA[3]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[4] * AREA[3]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[5] * AREA[3]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[6] * AREA[3]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv1.Text = tv5.Text = tv6.Text = tv7.Text = "";
                    }
                }
            };
            tv5.TextChanged += delegate
            {
                if (tv5.IsFocused)
                {
                    if (tv5.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[1] * AREA[4]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[2] * AREA[4]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[3] * AREA[4]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[0] * AREA[4]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[5] * AREA[4]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[6] * AREA[4]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv1.Text = tv6.Text = tv7.Text = "";
                    }
                }
            };
            tv6.TextChanged += delegate
            {
                if (tv6.IsFocused)
                {
                    if (tv6.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[1] * AREA[5]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[2] * AREA[5]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[3] * AREA[5]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[4] * AREA[5]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[0] * AREA[5]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[6] * AREA[5]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv1.Text = tv7.Text = "";
                    }
                }
            };
            tv7.TextChanged += delegate
            {
                if (tv7.IsFocused)
                {
                    if (tv7.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[1] * AREA[6]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[2] * AREA[6]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[3] * AREA[6]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[4] * AREA[6]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[5] * AREA[6]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[0] * AREA[6]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv1.Text = "";
                    }
                }
            };
        }
Пример #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Time);
            // Create your application here

            TextView tv1 = FindViewById <TextView> (Resource.Id.editText1);
            TextView tv2 = FindViewById <TextView> (Resource.Id.editText2);
            TextView tv3 = FindViewById <TextView> (Resource.Id.editText3);
            TextView tv4 = FindViewById <TextView> (Resource.Id.editText4);
            TextView tv5 = FindViewById <TextView> (Resource.Id.editText5);
            TextView tv6 = FindViewById <TextView> (Resource.Id.editText6);

            tv1.TextChanged += delegate {
                if (tv1.IsFocused)
                {
                    if (tv1.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / 60).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / 3600).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / 86400).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / 604800).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / 31556926).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = "";
                    }
                }
            };
            tv2.TextChanged += delegate {
                if (tv2.IsFocused)
                {
                    if (tv2.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv2.Text) * 60).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / 60).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / 1440).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / 10080).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / 31556926 * 60).ToString());
                    }
                    else
                    {
                        tv1.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = "";
                    }
                }
            };

            tv3.TextChanged += delegate {
                if (tv3.IsFocused)
                {
                    if (tv3.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv3.Text) * 3600).ToString());
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv3.Text) * 60).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / 86400 * 3600).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / 604800 * 3600).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / 31556926 * 3600).ToString());
                    }
                    else
                    {
                        tv2.Text = tv1.Text = tv4.Text = tv5.Text = tv6.Text = "";
                    }
                }
            };
            tv4.TextChanged += delegate {
                if (tv4.IsFocused)
                {
                    if (tv4.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv4.Text) * 86400).ToString());
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv4.Text) * 1440).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv4.Text) * 24).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / 604800 * 86400).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / 31556926 * 86400).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv1.Text = tv5.Text = tv6.Text = "";
                    }
                }
            };
            tv5.TextChanged += delegate {
                if (tv5.IsFocused)
                {
                    if (tv5.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv5.Text) * 604800).ToString());
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv5.Text) * 10080).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv5.Text) * 168).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv5.Text) * 7).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / 31556926 * 604800).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv1.Text = tv6.Text = "";
                    }
                }
            };
            tv6.TextChanged += delegate {
                if (tv6.IsFocused)
                {
                    if (tv6.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv6.Text) * 31556926).ToString());
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / 60 * 31556926).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / 3600 * 31556926).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / 86400 * 31556926).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / 604800 * 31556926).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv1.Text = "";
                    }
                }
            };
        }
Пример #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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

            TextView tv1 = FindViewById <TextView> (Resource.Id.editText1);
            TextView tv2 = FindViewById <TextView> (Resource.Id.editText2);
            TextView tv3 = FindViewById <TextView> (Resource.Id.editText3);
            TextView tv4 = FindViewById <TextView> (Resource.Id.editText4);
            TextView tv5 = FindViewById <TextView> (Resource.Id.editText5);
            TextView tv6 = FindViewById <TextView> (Resource.Id.editText6);
            TextView tv7 = FindViewById <TextView> (Resource.Id.editText7);
            TextView tv8 = FindViewById <TextView> (Resource.Id.editText8);
            TextView tv9 = FindViewById <TextView> (Resource.Id.editText9);

            // Create your application here

            decimal[] AREA = new decimal[9];
            AREA [0] = 1000;
            AREA [1] = 1000000;
            AREA [2] = 10000000;
            AREA [3] = 1000000000;
            AREA [4] = 1000000000000000000;
            AREA [5] = 16387;
            AREA [6] = 28316846;
            AREA [7] = 764554858;
            AREA [8] = 4168181830000000000;

            tv1.TextChanged += delegate
            {
                if (tv1.IsFocused)
                {
                    if (tv1.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[1] * AREA[0]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[2] * AREA[0]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[3] * AREA[0]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[4] * AREA[0]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[5] * AREA[0]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[6] * AREA[0]).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[7] * AREA[0]).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[8] * AREA[0]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = "";
                    }
                }
            };
            tv2.TextChanged += delegate
            {
                if (tv2.IsFocused)
                {
                    if (tv2.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[0] * AREA[1]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[2] * AREA[1]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[3] * AREA[1]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[4] * AREA[1]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[5] * AREA[1]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[6] * AREA[1]).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[7] * AREA[1]).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[8] * AREA[1]).ToString());
                    }
                    else
                    {
                        tv1.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = "";
                    }
                }
            };
            tv3.TextChanged += delegate
            {
                if (tv3.IsFocused)
                {
                    if (tv3.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[1] * AREA[2]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[0] * AREA[2]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[3] * AREA[2]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[4] * AREA[2]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[5] * AREA[2]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[6] * AREA[2]).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[7] * AREA[2]).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[8] * AREA[2]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv1.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = "";
                    }
                }
            };
            tv4.TextChanged += delegate
            {
                if (tv4.IsFocused)
                {
                    if (tv4.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[1] * AREA[3]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[2] * AREA[3]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[0] * AREA[3]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[4] * AREA[3]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[5] * AREA[3]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[6] * AREA[3]).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[7] * AREA[3]).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[8] * AREA[3]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv1.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = "";
                    }
                }
            };
            tv5.TextChanged += delegate
            {
                if (tv5.IsFocused)
                {
                    if (tv5.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[1] * AREA[4]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[2] * AREA[4]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[3] * AREA[4]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[0] * AREA[4]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[5] * AREA[4]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[6] * AREA[4]).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[7] * AREA[4]).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[8] * AREA[4]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv1.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = "";
                    }
                }
            };
            tv6.TextChanged += delegate
            {
                if (tv6.IsFocused)
                {
                    if (tv6.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[1] * AREA[5]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[2] * AREA[5]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[3] * AREA[5]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[4] * AREA[5]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[0] * AREA[5]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[6] * AREA[5]).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[7] * AREA[5]).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[8] * AREA[5]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv1.Text = tv7.Text = tv8.Text = tv9.Text = "";
                    }
                }
            };
            tv7.TextChanged += delegate
            {
                if (tv7.IsFocused)
                {
                    if (tv7.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[1] * AREA[6]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[2] * AREA[6]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[3] * AREA[6]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[4] * AREA[6]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[5] * AREA[6]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[0] * AREA[6]).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[7] * AREA[6]).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / AREA[8] * AREA[6]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv1.Text = tv8.Text = tv9.Text = "";
                    }
                }
            };
            tv8.TextChanged += delegate
            {
                if (tv8.IsFocused)
                {
                    if (tv8.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / AREA[1] * AREA[7]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / AREA[2] * AREA[7]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / AREA[3] * AREA[7]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / AREA[4] * AREA[7]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / AREA[5] * AREA[7]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / AREA[6] * AREA[7]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / AREA[0] * AREA[7]).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / AREA[8] * AREA[7]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv1.Text = tv9.Text = "";
                    }
                }
            };
            tv9.TextChanged += delegate
            {
                if (tv9.IsFocused)
                {
                    if (tv9.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / AREA[1] * AREA[8]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / AREA[2] * AREA[8]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / AREA[3] * AREA[8]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / AREA[4] * AREA[8]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / AREA[5] * AREA[8]).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / AREA[6] * AREA[8]).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / AREA[7] * AREA[8]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / AREA[0] * AREA[8]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv1.Text = "";
                    }
                }
            };
        }
Пример #4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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

            TextView tv1 = FindViewById <TextView> (Resource.Id.editText1);
            TextView tv2 = FindViewById <TextView> (Resource.Id.editText2);
            TextView tv3 = FindViewById <TextView> (Resource.Id.editText3);
            TextView tv4 = FindViewById <TextView> (Resource.Id.editText4);
            TextView tv5 = FindViewById <TextView> (Resource.Id.editText5);
            TextView tv6 = FindViewById <TextView> (Resource.Id.editText6);

            // Create your application here

            decimal[] AREA = new decimal[9];
            AREA [0] = 1;
            AREA [1] = 1024;
            AREA [2] = 1048576;
            AREA [3] = 1073741824;
            AREA [4] = 1099511627776;
            AREA [5] = 1125899906842624;

            tv1.TextChanged += delegate
            {
                if (tv1.IsFocused)
                {
                    if (tv1.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[1] * AREA[0]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[2] * AREA[0]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[3] * AREA[0]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[4] * AREA[0]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[5] * AREA[0]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = "";
                    }
                }
            };
            tv2.TextChanged += delegate
            {
                if (tv2.IsFocused)
                {
                    if (tv2.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[0] * AREA[1]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[2] * AREA[1]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[3] * AREA[1]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[4] * AREA[1]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[5] * AREA[1]).ToString());
                    }
                    else
                    {
                        tv1.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = "";
                    }
                }
            };
            tv3.TextChanged += delegate
            {
                if (tv3.IsFocused)
                {
                    if (tv3.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[1] * AREA[2]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[0] * AREA[2]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[3] * AREA[2]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[4] * AREA[2]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[5] * AREA[2]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv1.Text = tv4.Text = tv5.Text = tv6.Text = "";
                    }
                }
            };
            tv4.TextChanged += delegate
            {
                if (tv4.IsFocused)
                {
                    if (tv4.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[1] * AREA[3]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[2] * AREA[3]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[0] * AREA[3]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[4] * AREA[3]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[5] * AREA[3]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv1.Text = tv5.Text = tv6.Text = "";
                    }
                }
            };
            tv5.TextChanged += delegate
            {
                if (tv5.IsFocused)
                {
                    if (tv5.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[1] * AREA[4]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[2] * AREA[4]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[3] * AREA[4]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[0] * AREA[4]).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / AREA[5] * AREA[4]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv1.Text = tv6.Text = "";
                    }
                }
            };
            tv6.TextChanged += delegate
            {
                if (tv6.IsFocused)
                {
                    if (tv6.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[1] * AREA[5]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[2] * AREA[5]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[3] * AREA[5]).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[4] * AREA[5]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / AREA[0] * AREA[5]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv1.Text = "";
                    }
                }
            };
        }
Пример #5
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Distance);
            // Create your application here

            TextView tv1  = FindViewById <TextView> (Resource.Id.editText1);
            TextView tv2  = FindViewById <TextView> (Resource.Id.editText2);
            TextView tv3  = FindViewById <TextView> (Resource.Id.editText3);
            TextView tv4  = FindViewById <TextView> (Resource.Id.editText4);
            TextView tv5  = FindViewById <TextView> (Resource.Id.editText5);
            TextView tv6  = FindViewById <TextView> (Resource.Id.editText6);
            TextView tv7  = FindViewById <TextView> (Resource.Id.editText7);
            TextView tv8  = FindViewById <TextView> (Resource.Id.editText8);
            TextView tv9  = FindViewById <TextView> (Resource.Id.editText9);
            TextView tv10 = FindViewById <TextView> (Resource.Id.editText10);

            tv1.TextChanged += delegate {
                if (tv1.IsFocused)
                {
                    if (tv1.Text != "")
                    {
                        tv2.Text  = CS.F((System.Convert.ToDecimal(tv1.Text) / 1000).ToString());
                        tv3.Text  = CS.F((System.Convert.ToDecimal(tv1.Text) / 10000).ToString());
                        tv4.Text  = CS.F((System.Convert.ToDecimal(tv1.Text) / 100000).ToString());
                        tv5.Text  = CS.F((System.Convert.ToDecimal(tv1.Text) / 1000000).ToString());
                        tv6.Text  = CS.F((System.Convert.ToDecimal(tv1.Text) / 1000000000).ToString());
                        tv7.Text  = CS.F((System.Convert.ToDecimal(tv1.Text) / 25400).ToString());
                        tv8.Text  = CS.F((System.Convert.ToDecimal(tv1.Text) / 304800).ToString());
                        tv9.Text  = CS.F((System.Convert.ToDecimal(tv1.Text) / 914400).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / 1609344000).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = tv10.Text = "";
                    }
                }
            };
            tv2.TextChanged += delegate {
                if (tv2.IsFocused)
                {
                    if (tv2.Text != "")
                    {
                        tv1.Text  = CS.F((System.Convert.ToDecimal(tv2.Text) * 1000).ToString());
                        tv3.Text  = CS.F((System.Convert.ToDecimal(tv2.Text) / 10).ToString());
                        tv4.Text  = CS.F((System.Convert.ToDecimal(tv2.Text) / 100).ToString());
                        tv5.Text  = CS.F((System.Convert.ToDecimal(tv2.Text) / 1000).ToString());
                        tv6.Text  = CS.F((System.Convert.ToDecimal(tv2.Text) / 1000000).ToString());
                        tv7.Text  = CS.F((System.Convert.ToDecimal(tv2.Text) / 254 * 10).ToString());
                        tv8.Text  = CS.F((System.Convert.ToDecimal(tv2.Text) / 3048 * 10).ToString());
                        tv9.Text  = CS.F((System.Convert.ToDecimal(tv2.Text) / 9144 * 10).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / 1609344).ToString());
                    }
                    else
                    {
                        tv1.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = tv10.Text = "";
                    }
                }
            };
            tv3.TextChanged += delegate {
                if (tv3.IsFocused)
                {
                    if (tv3.Text != "")
                    {
                        tv2.Text  = CS.F((System.Convert.ToDecimal(tv3.Text) * 10).ToString());
                        tv1.Text  = CS.F((System.Convert.ToDecimal(tv3.Text) * 10000).ToString());
                        tv4.Text  = CS.F((System.Convert.ToDecimal(tv3.Text) / 10).ToString());
                        tv5.Text  = CS.F((System.Convert.ToDecimal(tv3.Text) / 100).ToString());
                        tv6.Text  = CS.F((System.Convert.ToDecimal(tv3.Text) / 100000).ToString());
                        tv7.Text  = CS.F((System.Convert.ToDecimal(tv3.Text) / 254 * 100).ToString());
                        tv8.Text  = CS.F((System.Convert.ToDecimal(tv3.Text) / 3048 * 100).ToString());
                        tv9.Text  = CS.F((System.Convert.ToDecimal(tv3.Text) / 9144 * 100).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / 1609344 * 10).ToString());
                    }
                    else
                    {
                        tv1.Text = tv2.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = tv10.Text = "";
                    }
                }
            };
            tv4.TextChanged += delegate {
                if (tv4.IsFocused)
                {
                    if (tv4.Text != "")
                    {
                        tv2.Text  = CS.F((System.Convert.ToDecimal(tv4.Text) * 100).ToString());
                        tv3.Text  = CS.F((System.Convert.ToDecimal(tv4.Text) * 10).ToString());
                        tv1.Text  = CS.F((System.Convert.ToDecimal(tv4.Text) * 100000).ToString());
                        tv5.Text  = CS.F((System.Convert.ToDecimal(tv4.Text) / 10).ToString());
                        tv6.Text  = CS.F((System.Convert.ToDecimal(tv4.Text) / 10000).ToString());
                        tv7.Text  = CS.F((System.Convert.ToDecimal(tv4.Text) / 254 * 1000).ToString());
                        tv8.Text  = CS.F((System.Convert.ToDecimal(tv4.Text) / 3048 * 1000).ToString());
                        tv9.Text  = CS.F((System.Convert.ToDecimal(tv4.Text) / 9144 * 1000).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / 1609344 * 100).ToString());
                    }
                    else
                    {
                        tv1.Text = tv2.Text = tv3.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = tv10.Text = "";
                    }
                }
            };
            tv5.TextChanged += delegate {
                if (tv5.IsFocused)
                {
                    if (tv5.Text != "")
                    {
                        tv2.Text  = CS.F((System.Convert.ToDecimal(tv5.Text) * 1000).ToString());
                        tv3.Text  = CS.F((System.Convert.ToDecimal(tv5.Text) * 100).ToString());
                        tv4.Text  = CS.F((System.Convert.ToDecimal(tv5.Text) * 10).ToString());
                        tv1.Text  = CS.F((System.Convert.ToDecimal(tv5.Text) * 1000000).ToString());
                        tv6.Text  = CS.F((System.Convert.ToDecimal(tv5.Text) / 1000).ToString());
                        tv7.Text  = CS.F((System.Convert.ToDecimal(tv5.Text) / 254 * 10000).ToString());
                        tv8.Text  = CS.F((System.Convert.ToDecimal(tv5.Text) / 3048 * 10000).ToString());
                        tv9.Text  = CS.F((System.Convert.ToDecimal(tv5.Text) / 9144 * 10000).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv5.Text) / 1609344 * 1000).ToString());
                    }
                    else
                    {
                        tv1.Text = tv2.Text = tv3.Text = tv4.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = tv10.Text = "";
                    }
                }
            };
            tv6.TextChanged += delegate {
                if (tv6.IsFocused)
                {
                    if (tv6.Text != "")
                    {
                        tv2.Text  = CS.F((System.Convert.ToDecimal(tv6.Text) * 1000000).ToString());
                        tv3.Text  = CS.F((System.Convert.ToDecimal(tv6.Text) * 100000).ToString());
                        tv4.Text  = CS.F((System.Convert.ToDecimal(tv6.Text) * 10000).ToString());
                        tv5.Text  = CS.F((System.Convert.ToDecimal(tv6.Text) * 1000).ToString());
                        tv1.Text  = CS.F((System.Convert.ToDecimal(tv6.Text) * 1000000000).ToString());
                        tv7.Text  = CS.F((System.Convert.ToDecimal(tv6.Text) / 25400 * 1000000000).ToString());
                        tv8.Text  = CS.F((System.Convert.ToDecimal(tv6.Text) / 304800 * 1000000000).ToString());
                        tv9.Text  = CS.F((System.Convert.ToDecimal(tv6.Text) / 914400 * 1000000000).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv6.Text) / 1609344000 * 1000000000).ToString());
                    }
                    else
                    {
                        tv1.Text = tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv7.Text = tv8.Text = tv9.Text = tv10.Text = "";
                    }
                }
            };
            tv7.TextChanged += delegate {
                if (tv7.IsFocused)
                {
                    if (tv7.Text != "")
                    {
                        tv2.Text  = CS.F((System.Convert.ToDecimal(tv7.Text) * 254 / 10).ToString());
                        tv3.Text  = CS.F((System.Convert.ToDecimal(tv7.Text) * 254 / 100).ToString());
                        tv4.Text  = CS.F((System.Convert.ToDecimal(tv7.Text) * 254 / 1000).ToString());
                        tv5.Text  = CS.F((System.Convert.ToDecimal(tv7.Text) * 254 / 10000).ToString());
                        tv6.Text  = CS.F((System.Convert.ToDecimal(tv7.Text) * 254 / 1000000000).ToString());
                        tv1.Text  = CS.F((System.Convert.ToDecimal(tv7.Text) * 25400).ToString());
                        tv8.Text  = CS.F((System.Convert.ToDecimal(tv7.Text) / 12).ToString());
                        tv9.Text  = CS.F((System.Convert.ToDecimal(tv7.Text) / 36).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv7.Text) / 63360).ToString());
                    }
                    else
                    {
                        tv1.Text = tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv8.Text = tv9.Text = tv10.Text = "";
                    }
                }
            };
            tv8.TextChanged += delegate {
                if (tv8.IsFocused)
                {
                    if (tv8.Text != "")
                    {
                        tv2.Text  = CS.F((System.Convert.ToDecimal(tv8.Text) * 3048 / 10).ToString());
                        tv3.Text  = CS.F((System.Convert.ToDecimal(tv8.Text) * 3048 / 100).ToString());
                        tv4.Text  = CS.F((System.Convert.ToDecimal(tv8.Text) * 3048 / 1000).ToString());
                        tv5.Text  = CS.F((System.Convert.ToDecimal(tv8.Text) * 3048 / 10000).ToString());
                        tv6.Text  = CS.F((System.Convert.ToDecimal(tv8.Text) * 3048 / 10000000).ToString());
                        tv7.Text  = CS.F((System.Convert.ToDecimal(tv8.Text) * 12).ToString());
                        tv1.Text  = CS.F((System.Convert.ToDecimal(tv8.Text) * 304800).ToString());
                        tv9.Text  = CS.F((System.Convert.ToDecimal(tv8.Text) / 3).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv8.Text) / 5280).ToString());
                    }
                    else
                    {
                        tv1.Text = tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv9.Text = tv10.Text = "";
                    }
                }
            };
            tv9.TextChanged += delegate {
                if (tv9.IsFocused)
                {
                    if (tv9.Text != "")
                    {
                        tv2.Text  = CS.F((System.Convert.ToDecimal(tv9.Text) * 3048 * 30).ToString());
                        tv3.Text  = CS.F((System.Convert.ToDecimal(tv9.Text) * 3048 * 300).ToString());
                        tv4.Text  = CS.F((System.Convert.ToDecimal(tv9.Text) * 3048 * 3000).ToString());
                        tv5.Text  = CS.F((System.Convert.ToDecimal(tv9.Text) * 3048 * 30000).ToString());
                        tv6.Text  = CS.F((System.Convert.ToDecimal(tv9.Text) * 3048 * 3000000).ToString());
                        tv7.Text  = CS.F((System.Convert.ToDecimal(tv9.Text) * 12 * 3).ToString());
                        tv8.Text  = CS.F((System.Convert.ToDecimal(tv9.Text) * 3).ToString());
                        tv1.Text  = CS.F((System.Convert.ToDecimal(tv9.Text) * 914400).ToString());
                        tv10.Text = CS.F((System.Convert.ToDecimal(tv9.Text) / 1760).ToString());
                    }
                    else
                    {
                        tv1.Text = tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv10.Text = "";
                    }
                }
            };
            tv10.TextChanged += delegate {
                if (tv10.IsFocused)
                {
                    if (tv10.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 1609344000).ToString());
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 1609344).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 1609344 / 10).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 1609344 / 100).ToString());
                        tv5.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 1609344 / 1000).ToString());
                        tv6.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 1609344 / 1000000).ToString());
                        tv7.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 63360).ToString());
                        tv8.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 5280).ToString());
                        tv9.Text = CS.F((System.Convert.ToDecimal(tv10.Text) * 1760).ToString());
                    }
                    else
                    {
                        tv1.Text = tv2.Text = tv3.Text = tv4.Text = tv5.Text = tv6.Text = tv7.Text = tv8.Text = tv9.Text = "";
                    }
                }
            };
        }
Пример #6
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

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

            TextView tv1 = FindViewById <TextView> (Resource.Id.editText1);
            TextView tv2 = FindViewById <TextView> (Resource.Id.editText2);
            TextView tv3 = FindViewById <TextView> (Resource.Id.editText3);
            TextView tv4 = FindViewById <TextView> (Resource.Id.editText4);


            // Create your application here

            decimal[] AREA = new decimal[9];
            AREA [0] = 100000000000;
            AREA [1] = 7716049;
            AREA [2] = 91440000000;
            AREA [3] = 2540000000;



            tv1.TextChanged += delegate
            {
                if (tv1.IsFocused)
                {
                    if (tv1.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[1] * AREA[0]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[2] * AREA[0]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv1.Text) / AREA[3] * AREA[0]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv4.Text = "";
                    }
                }
            };
            tv2.TextChanged += delegate
            {
                if (tv2.IsFocused)
                {
                    if (tv2.Text != "")
                    {
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[0] * AREA[1]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[2] * AREA[1]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv2.Text) / AREA[3] * AREA[1]).ToString());
                    }
                    else
                    {
                        tv1.Text = tv3.Text = tv4.Text = "";
                    }
                }
            };
            tv3.TextChanged += delegate
            {
                if (tv3.IsFocused)
                {
                    if (tv3.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[1] * AREA[2]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[0] * AREA[2]).ToString());
                        tv4.Text = CS.F((System.Convert.ToDecimal(tv3.Text) / AREA[3] * AREA[2]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv1.Text = tv4.Text = "";
                    }
                }
            };
            tv4.TextChanged += delegate
            {
                if (tv4.IsFocused)
                {
                    if (tv4.Text != "")
                    {
                        tv2.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[1] * AREA[3]).ToString());
                        tv3.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[2] * AREA[3]).ToString());
                        tv1.Text = CS.F((System.Convert.ToDecimal(tv4.Text) / AREA[0] * AREA[3]).ToString());
                    }
                    else
                    {
                        tv2.Text = tv3.Text = tv1.Text = "";
                    }
                }
            };
        }