コード例 #1
0
 public void Add(FriendPresentRootWindow.SendContent.ItemSource.ItemParam param)
 {
     if (!param.IsValid())
     {
         return;
     }
     this.m_Params.Add(param);
 }
コード例 #2
0
        public void InitializeSendList()
        {
            this.ReleaseSendList();
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_SendController, (UnityEngine.Object)null))
            {
                this.m_SendSource = new FriendPresentRootWindow.SendContent.ItemSource();
                List <FriendData> friends = MonoSingleton <GameManager> .Instance.Player.Friends;
                for (int index = 0; index < friends.Count; ++index)
                {
                    FriendData friend = friends[index];
                    if (friend != null && friend.WishStatus != "1")
                    {
                        FriendPresentRootWindow.SendContent.ItemSource.ItemParam itemParam = new FriendPresentRootWindow.SendContent.ItemSource.ItemParam(friend);
                        if (itemParam.IsValid())
                        {
                            this.m_SendSource.Add(itemParam);
                        }
                    }
                }
                this.m_SendController.Initialize((ContentSource)this.m_SendSource, Vector2.get_zero());
            }
            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_ValueList, (UnityEngine.Object)null))
            {
                return;
            }
            bool flag = false;

            switch (FriendPresentRootWindow.m_SendStatus)
            {
            case FriendPresentRootWindow.SendStatus.NONE:
                this.m_ValueList.list.SetField("status", string.Empty);
                flag = false;
                break;

            case FriendPresentRootWindow.SendStatus.UNSENT:
                this.m_ValueList.list.SetField("status", "sys.FRIENDPRESENT_STATUS_UNSENT");
                flag = true;
                break;

            case FriendPresentRootWindow.SendStatus.SENDING:
                this.m_ValueList.list.SetField("status", "sys.FRIENDPRESENT_STATUS_SENDING");
                flag = false;
                break;

            case FriendPresentRootWindow.SendStatus.SENTFAILED:
                this.m_ValueList.list.SetField("status", "sys.FRIENDPRESENT_STATUS_SENTFAILED");
                flag = true;
                break;

            case FriendPresentRootWindow.SendStatus.SENDED:
                this.m_ValueList.list.SetField("status", "sys.FRIENDPRESENT_STATUS_SENDED");
                flag = true;
                break;
            }
            this.m_ValueList.list.SetInteractable("btn_send", this.m_SendSource.GetCount() != 0 && flag);
        }