private void ShowTab(InBattleShortcut.TabType tabType)
 {
     if (tabType == InBattleShortcut.TabType.TabReserve)
     {
         this.noReceiveNode.CustomSetActive(!this.NoMoreReceiveReverse);
         if (this.reserveList != null)
         {
             this.reserveList.gameObject.CustomSetActive(true);
         }
         if (this.shortcutList != null)
         {
             this.shortcutList.gameObject.CustomSetActive(false);
         }
     }
     else if (tabType == InBattleShortcut.TabType.TabShortCut)
     {
         this.noReceiveNode.CustomSetActive(false);
         if (this.reserveList != null)
         {
             this.reserveList.gameObject.CustomSetActive(false);
         }
         if (this.shortcutList != null)
         {
             this.shortcutList.gameObject.CustomSetActive(true);
         }
     }
 }
 private int GetTabIndex(InBattleShortcut.TabType tabType)
 {
     for (int i = 0; i < this.indexTabTypeMap.Length; i++)
     {
         if (this.indexTabTypeMap[i] == tabType)
         {
             return(i);
         }
     }
     return(-1);
 }
    public void On_Invite_Reverse_InBat_TabChange(CUIEvent uiEvent)
    {
        int selectedIndex = uiEvent.m_srcWidget.GetComponent <CUIListScript>().GetSelectedIndex();

        InBattleShortcut.TabType tabType  = this.indexTabTypeMap[selectedIndex];
        CUIListElementScript     elemenet = this.tabList.GetElemenet(selectedIndex);

        if (elemenet != null)
        {
            this.SetTabItem(elemenet.gameObject, tabType);
        }
        this.ShowTab(tabType);
    }
 public void Refresh_List(InBattleShortcut.TabType type)
 {
     if (type == InBattleShortcut.TabType.TabShortCut)
     {
         ListView <TabElement> inbatEntList = Singleton <InBattleMsgMgr> .instance.inbatEntList;
         if (inbatEntList != null)
         {
             this._refresh_list(this.shortcutList, inbatEntList);
         }
     }
     else if (type == InBattleShortcut.TabType.TabReserve)
     {
         ListView <FriendReserve.Ent> listView = Singleton <CFriendContoller> .instance.model.friendReserve.dataList[0];
         this.reserveList.SetElementAmount(listView.Count);
     }
 }
    private void SetTabItem(GameObject obj, InBattleShortcut.TabType type)
    {
        if (obj == null || type == InBattleShortcut.TabType.Count)
        {
            return;
        }
        GameObject obj2 = Utility.FindChild(obj, "img_shortCut");

        obj2.CustomSetActive(type == InBattleShortcut.TabType.TabShortCut);
        GameObject obj3 = Utility.FindChild(obj, "img_reserve");

        obj3.CustomSetActive(type == InBattleShortcut.TabType.TabReserve);
        Text componetInChild = Utility.GetComponetInChild <Text>(obj, "Text");

        if (componetInChild != null)
        {
            CFriendModel model = Singleton <CFriendContoller> .instance.model;
            componetInChild.set_text((type == InBattleShortcut.TabType.TabShortCut) ? model.friendReserve.Reserve_TabShortCut : model.friendReserve.Reserve_TabReserve);
        }
    }