Пример #1
0
        public void Load(CUIFormScript form)
        {
            if (form == null)
            {
                return;
            }
            GameObject widget  = form.GetWidget(32);
            GameObject widget2 = form.GetWidget(33);

            widget2.CustomSetActive(false);
            if (widget == null)
            {
                for (int i = 0; i < this.m_searchTypeNodes.Length; i++)
                {
                    this.m_searchTypeNodes[i] = null;
                }
                for (int j = 0; j < this.m_searchTypeNodes.Length; j++)
                {
                    this.m_displyTypeNodes[j] = null;
                }
                return;
            }
            this.m_searchTypeNodes[0] = widget.transform.Find("pnlContainer/Social_IWant/DropList");
            this.m_searchTypeNodes[5] = widget.transform.Find("pnlContainer/Social_Position/DropList1");
            this.m_searchTypeNodes[6] = widget.transform.Find("pnlContainer/Social_Position/DropList2");
            this.m_searchTypeNodes[1] = widget.transform.Find("pnlContainer/Social_Time/WeekDropList");
            this.m_searchTypeNodes[2] = widget.transform.Find("pnlContainer/Social_Time/DayDropList");
            this.m_searchTypeNodes[3] = widget.transform.Find("pnlContainer/Social_Speciality/DropList1");
            this.m_searchTypeNodes[4] = widget.transform.Find("pnlContainer/Social_Speciality/DropList2");
            this.m_displyTypeNodes[0] = widget.transform.Find("pnlContainer/Social_IWant/Content");
            this.m_displyTypeNodes[5] = widget.transform.Find("pnlContainer/Social_Position/Content1");
            this.m_displyTypeNodes[6] = widget.transform.Find("pnlContainer/Social_Position/Content2");
            this.m_displyTypeNodes[1] = widget.transform.Find("pnlContainer/Social_Time/WeekContent");
            this.m_displyTypeNodes[2] = widget.transform.Find("pnlContainer/Social_Time/DayContent");
            this.m_displyTypeNodes[3] = widget.transform.Find("pnlContainer/Social_Speciality/Content1");
            this.m_displyTypeNodes[4] = widget.transform.Find("pnlContainer/Social_Speciality/Content2");
            string[] array  = this.m_searchStrings[3];
            string[] array2 = new string[array.Length];
            try
            {
                for (int k = 0; k < array.Length; k++)
                {
                    array2[k] = CHeroInfo.GetHeroJobStr((RES_HERO_JOB)Convert.ToInt32(array[k]));
                }
            }
            catch (Exception var_7_20E)
            {
                Debug.LogError("social 配置表JOB错误,找jason");
            }
            CUIUtility.ClearTextComboboxContent();
            for (int l = 0; l < 6; l++)
            {
                if (!(this.m_searchTypeNodes[l] == null) && this.m_searchStrings[l] != null)
                {
                    CUIListScript component  = this.m_searchTypeNodes[l].Find("List").GetComponent <CUIListScript>();
                    GameObject    gameObject = this.m_searchTypeNodes[l].Find("Button_Down").gameObject;
                    switch (l)
                    {
                    case 3:
                    case 4:
                        CUIUtility.RegisterTextComboboxContent(gameObject, component, array2, null);
                        break;

                    case 5:
                        CUIUtility.RegisterTextComboboxContent(gameObject, component, this.m_searchStrings[l], new CUIUtility.TextComboClickCallback(this.OnLocation1Choose));
                        break;

                    default:
                        CUIUtility.RegisterTextComboboxContent(gameObject, component, this.m_searchStrings[l], null);
                        break;
                    }
                }
            }
            this.m_isInEditmode = false;
            this.UpdateUI();
        }