Ejemplo n.º 1
0
        private void DisplayStats_Load(object sender, EventArgs e)
        {
            try
            {
                this.WindowState = FormWindowState.Maximized;

                ParamDisplayStats ret = new ParamDisplayStats();
                ret.iddivision = 0;
                ret.idteam     = 0;
                ret.legion     = false;
                ret.novik      = false;
                ret.years18    = false;
                ret.years21    = false;
                ret.aver       = false;
                ret.sort       = 1; /* сортировка по очкам */

                radioButtonAll.Checked        = true;
                radioButtonFull.Checked       = true;
                radioButtonSortPoints.Checked = true;

                comboBoxTeam.Enabled     = false;
                comboBoxDivision.Enabled = false;

                init_combo_div();

                Start();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Ejemplo n.º 2
0
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            try
            {
                param = read_param();

                data = GetData(container);

                init_list(data);
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }
        }
Ejemplo n.º 3
0
        private ParamDisplayStats read_param()
        {
            ParamDisplayStats ret = new ParamDisplayStats();

            ret.iddivision = 0;
            ret.idteam     = 0;
            ret.legion     = false;
            ret.novik      = false;
            ret.years18    = false;
            ret.years21    = false;
            ret.aver       = false;
            ret.sort       = 1; /* сортировка по очкам */

            try
            {
                if (radioButtonDivision.Checked == true)
                {
                    if (comboBoxDivision.Text.Length > 0)
                    {
                        clDiv          = new CDivision(connect, IS.idseason, comboBoxDivision.Text.Trim());
                        ret.iddivision = clDiv.stDiv.id;
                    }
                }

                if (radioButtonTeam.Checked == true)
                {
                    if (comboBoxTeam.Text.Length > 0)
                    {
                        clTeam     = new CTeam(connect, comboBoxTeam.Text.Trim());
                        ret.idteam = clTeam.stTeam.id;
                    }
                }

                if (checkBoxDo21.CheckState == CheckState.Checked)
                {
                    ret.years21 = true;
                }
                else
                {
                    ret.years21 = false;
                }
                if (checkBoxDo18.CheckState == CheckState.Checked)
                {
                    ret.years18 = true;
                }
                else
                {
                    ret.years18 = false;
                }
                if (checkBoxNewPlayer.CheckState == CheckState.Checked)
                {
                    ret.novik = true;
                }
                else
                {
                    ret.novik = false;
                }
                if (checkBoxLegionery.CheckState == CheckState.Checked)
                {
                    ret.legion = true;
                }
                else
                {
                    ret.legion = false;
                }


                if (radioButtonFull.Checked == true)
                {
                    ret.aver = false;
                }
                if (radioButtonAver.Checked == true)
                {
                    ret.aver = true;
                }

                if (radioButtonSortPoints.Checked == true)
                {
                    ret.sort = 1;
                }
                if (radioButtonSortPCAll.Checked == true)
                {
                    ret.sort = 2;
                }
                if (radioButtonSortPC2.Checked == true)
                {
                    ret.sort = 3;
                }
                if (radioButtonSortPC3.Checked == true)
                {
                    ret.sort = 4;
                }
                if (radioButtonSortPCFT.Checked == true)
                {
                    ret.sort = 5;
                }
                if (radioButtonSortReb.Checked == true)
                {
                    ret.sort = 6;
                }
                if (radioButtonSortAss.Checked == true)
                {
                    ret.sort = 7;
                }
                if (radioButtonSortStl.Checked == true)
                {
                    ret.sort = 8;
                }
                if (radioButtonSortBlk.Checked == true)
                {
                    ret.sort = 9;
                }
                if (radioButton1SortFAdv.Checked == true)
                {
                    ret.sort = 10;
                }
                if (radioButtonSortTur.Checked == true)
                {
                    ret.sort = 11;
                }
                if (radioButtonSortFol.Checked == true)
                {
                    ret.sort = 12;
                }
                if (radioButtonSortTime.Checked == true)
                {
                    ret.sort = 13;
                }
                if (radioButtonSortKPI.Checked == true)
                {
                    ret.sort = 14;
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message, ex.Source); }

            return(ret);
        }