예제 #1
0
    public virtual void draw(bool isResetPos_p = true, int startIndex = -1)
    {
        refreshData();

        rankers_obj.Clear();

        setPassData();


        listGrid.setData(panel, rankers_obj, isResetPos_p, startIndex);
    }
    public void SetDrawRanking(bool isResetPos_p)
    {
        return;

        LoadRankers();

        for (int i = 0; i < listGrid.panels.Count; i++)
        {
            if (i < rankers.Count)
            {
                listGrid.panels[i].gameObject.SetActiveRecursively(true);
            }
            else
            {
                listGrid.panels[i].gameObject.SetActiveRecursively(false);
            }
        }

        List <object> rankers_obj = new List <object>();

        for (int i = 0; i < rankers.Count; i++)
        {
            rankers[i].weekOptionsList = new List <string> {
                "", "", "", "", "", "", ""
            };
            if (rankers[i].weekOptions != null)
            {
                string[] tmpstr1 = rankers[i].weekOptions.Split(',');
                for (int j = 0; j < tmpstr1.Length; j++)
                {
                    string[] tmpstr2 = tmpstr1[j].Split(':');
                    if (tmpstr2 != null)
                    {
                        switch (tmpstr2[0])
                        {
                        case "C":
                            rankers[i].weekOptionsList[0] = tmpstr2[1];
                            break;

                        case "R":
                            rankers[i].weekOptionsList[1] = tmpstr2[1];
                            break;

                        case "P":
                            rankers[i].weekOptionsList[2] = tmpstr2[1];
                            break;

                        case "CL":
                            rankers[i].weekOptionsList[3] = tmpstr2[1];
                            break;

                        case "RL":
                            rankers[i].weekOptionsList[4] = tmpstr2[1];
                            break;

                        case "RE":
                            rankers[i].weekOptionsList[5] = tmpstr2[1];
                            break;

                        case "P2":
                            rankers[i].weekOptionsList[6] = tmpstr2[1];
                            break;
                        }
                    }
                }
            }
            rankers[i].bestOptionsList = new List <string> {
                "", "", "", "", "", "", ""
            };
            if (rankers[i].bestOptions != null)
            {
                string[] tmpstr1 = rankers[i].bestOptions.Split(',');
                for (int j = 0; j < tmpstr1.Length; j++)
                {
                    string[] tmpstr2 = tmpstr1[j].Split(':');
                    if (tmpstr2 != null)
                    {
                        switch (tmpstr2[0])
                        {
                        case "C":
                            rankers[i].bestOptionsList[0] = tmpstr2[1];
                            break;

                        case "R":
                            rankers[i].bestOptionsList[1] = tmpstr2[1];
                            break;

                        case "P":
                            rankers[i].bestOptionsList[2] = tmpstr2[1];
                            break;

                        case "CL":
                            rankers[i].bestOptionsList[3] = tmpstr2[1];
                            break;

                        case "RL":
                            rankers[i].bestOptionsList[4] = tmpstr2[1];
                            break;

                        case "RE":
                            rankers[i].bestOptionsList[5] = tmpstr2[1];
                            break;

                        case "P2":
                            rankers[i].bestOptionsList[6] = tmpstr2[1];
                            break;
                        }
                    }
                }
            }

            rankers_obj.Add((object)rankers[i]);
        }

        listGrid.setData(rankers_obj, isResetPos_p);

        if (isResetPos_p == true)
        {
            panel.ResetPosition();
        }
        //listGrid.isLock=false;
    }