Ejemplo n.º 1
0
        void init_list1a()
        {
            int[] arr = { 1509,  775, 1736, 1572, 1193, 1505,  481, 1482, 1016, 1568,   75, 307,  918, 1141,   88,  161,  577,  300,  173, 1084, 910, 29,
                          658,   205, 1196,  617,  485, 1558, 1378,  995, 1618, 1404, 1302, 652, 1345, 1167, 1424, 1471, 1714, 1522, 1181,  958,  66,
                          947,  1462, 1634, 1580,  907,  285,  790, 1621, 671 };

            string name;

            checkedListBox1a.Items.Clear();

            List <STPlayer> lst_p = new List <STPlayer>();

            for (int i = 0; i < arr.Length; i++)
            {
                clPlayer = new CPlayer(connect, arr[i]);
                lst_p.Add(clPlayer.stPlayer);
            }

            ListCompareNamePlayer comp = new ListCompareNamePlayer();

            lst_p.Sort(comp);


            foreach (STPlayer item in lst_p)
            {
                name = string.Format("{0} {1} ({2})", item.family, item.name, item.idplayer);

                if (mode == 0)
                {
                    checkedListBox1a.Items.Add(name, false);
                }
                else
                {
                    if (item.idplayer == Data[2] || item.idplayer == Data[3])
                    {
                        checkedListBox1a.Items.Add(name, true);
                    }
                    else
                    {
                        checkedListBox1a.Items.Add(name, false);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        void init_list1d()
        {
            int[] arr = { 289, 772,    2,  142, 1584, 1686,  939,  857,  198,  453, 1222, 1648,  911,   41, 516,  155,  668, 1658, 1195, 1277, 440, 759,
                          835, 714, 1744, 1070, 1646,  157, 1160, 1586, 1467, 1114, 1476, 1726, 1525, 1592, 843, 1328, 1690, 1461,  233, 1429,
                          360, 191,  848,  435,  313, 1677,  792,  449, 1610, 1731 };

            string name;

            checkedListBox1d.Items.Clear();

            List <STPlayer> lst_p = new List <STPlayer>();

            for (int i = 0; i < arr.Length; i++)
            {
                clPlayer = new CPlayer(connect, arr[i]);
                lst_p.Add(clPlayer.stPlayer);
            }

            ListCompareNamePlayer comp = new ListCompareNamePlayer();

            lst_p.Sort(comp);

            foreach (STPlayer item in lst_p)
            {
                name = string.Format("{0} {1} ({2})", item.family, item.name, item.idplayer);

                if (mode == 0)
                {
                    checkedListBox1d.Items.Add(name, false);
                }
                else
                {
                    if (item.idplayer == Data[0] || item.idplayer == Data[1])
                    {
                        checkedListBox1d.Items.Add(name, true);
                    }
                    else
                    {
                        checkedListBox1d.Items.Add(name, false);
                    }
                }
            }
        }