Example #1
0
            public int check(string name, int b)
            {
                Sbras     sbras     = new Sbras();
                Bolshe202 bolshe202 = new Bolshe202();
                Bolshe180 bolshe180 = new Bolshe180();

                if (b == 200)
                {
                    b = 100;
                    sbras.Chit(name);
                }
                else
                {
                    if (b == 201 || b == 202)
                    {
                        b = 0;
                        sbras.Chit(name);
                    }
                    else
                    {
                        if (b > 202)
                        {
                            bolshe202.Chit(name);
                        }
                    }
                }
                return(b);
            }
Example #2
0
        private void button_Click_1(object sender, RoutedEventArgs e)
        {
            Check       check       = new Check();
            Sbras       sbras       = new Sbras();
            Provnesk180 provnesk180 = new Provnesk180();
            proverka    proverka    = new proverka();
            Bolshe180   bolshe180   = new Bolshe180();
            Neskolko180 neskolko180 = new Neskolko180();

            _12.Text = proverka.check(_12.Text);
            _22.Text = proverka.check(_22.Text);
            _32.Text = proverka.check(_32.Text);
            _42.Text = proverka.check(_42.Text);


            _11.Text = Convert.ToString(Convert.ToInt16(_11.Text) + Convert.ToInt16(_12.Text)); //я
            _12.Text = Convert.ToString(0);

            _21.Text = Convert.ToString(Convert.ToInt16(_21.Text) + Convert.ToInt16(_22.Text)); //линар
            _22.Text = Convert.ToString(0);

            _31.Text = Convert.ToString(Convert.ToInt16(_31.Text) + Convert.ToInt16(_32.Text)); //сергей
            _32.Text = Convert.ToString(0);

            _41.Text = Convert.ToString(Convert.ToInt16(_41.Text) + Convert.ToInt16(_42.Text)); //дмитрий
            _42.Text = Convert.ToString(0);
            int ca = 0;

            ca = provnesk180.check(Convert.ToInt16(_11.Text), Convert.ToInt16(_21.Text), Convert.ToInt16(_31.Text), Convert.ToInt16(_41.Text));
            switch (ca)
            {
            case 1:
                bolshe180.Chit(_10.Text);
                break;

            case 10:
                bolshe180.Chit(_20.Text);
                break;

            case 100:
                bolshe180.Chit(_30.Text);
                break;

            case 1000:
                bolshe180.Chit(_40.Text);
                break;

            case 11:
                neskolko180.Chit1(_10.Text, _20.Text);
                break;

            case 101:
                neskolko180.Chit1(_10.Text, _30.Text);
                break;

            case 1001:
                neskolko180.Chit1(_10.Text, _40.Text);
                break;

            case 1010:
                neskolko180.Chit1(_20.Text, _40.Text);
                break;

            case 1100:
                neskolko180.Chit1(_30.Text, _40.Text);
                break;

            case 110:
                neskolko180.Chit1(_20.Text, _30.Text);
                break;

            case 111:
                neskolko180.Chit1(_10.Text, _20.Text, _30.Text);
                break;

            case 1110:
                neskolko180.Chit1(_20.Text, _30.Text, _40.Text);
                break;

            case 1101:
                neskolko180.Chit1(_10.Text, _20.Text, _40.Text);
                break;

            case 1011:
                neskolko180.Chit1(_10.Text, _20.Text, _40.Text);
                break;

            case 1111:
                neskolko180.Chit1(_10.Text, _20.Text, _30.Text, _40.Text);
                break;
            }
            if (ca == 0)
            {
                _11.Text = Convert.ToString(check.check(_10.Text, Convert.ToInt16(_11.Text)));
                _21.Text = Convert.ToString(check.check(_20.Text, Convert.ToInt16(_21.Text)));
                _31.Text = Convert.ToString(check.check(_30.Text, Convert.ToInt16(_31.Text)));
                _41.Text = Convert.ToString(check.check(_40.Text, Convert.ToInt16(_41.Text)));
            }
        }