Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int count = ReadFile();

        if (dropTurn.SelectedItem.Value == "all")
        {
            txtTurn.Text = _StrNow;
            ArrayList alReturn = new ArrayList();

            for (int i = 1; i <= MaxStatistics; i++)
            {
                _StrNow = dropTurn.Items[i].Value.Split('_')[1];
                _ArrStr = FindAllStr(_Input, _RedBall, count, int.Parse(dropTurn.Items[i].Value.Split('_')[0]));

                alReturn = StatisticsAll(float.Parse(dropTurn.Items[i].Text), _Min, _Max, _Middle, _Input, _ArrStr, _ArrMyStr, _ArrNowStr, alReturn);
            }

            ArrayList al = MyGame.GiveMyOpinion(alReturn, "0");

            DisplayStatisticsArray(al, 1);
            //DisplayStatisticsArray(alReturn, 0);
        }
        else
        {
            if (dropTurn.SelectedItem.Value == "now")
            {
                _StrNow = "";
                _ArrStr = FindAllStr(_Input, _RedBall, count, 0);
            }
            else
            {
                _StrNow = dropTurn.SelectedItem.Value.Split('_')[1];
                _ArrStr = FindAllStr(_Input, _RedBall, count, int.Parse(dropTurn.SelectedItem.Value.Split('_')[0]));
            }
            txtTurn.Text = _StrNow;
            DisplayResult(_Min, _Max, _Middle, _Input, _ArrStr, _ArrMyStr, _ArrNowStr);
        }
    }