Ejemplo n.º 1
0
        /// <summary>
        /// 成员权限操作
        /// </summary>
        /// <param name="memberItem"></param>
        /// <param name="status">1.同意 2.拒绝(请离)</param>
        public void OnAgreeClick(TeaMemberInfoItem memberItem, string status)
        {
            var itemData = memberItem.GetData <TeaMemberInfoItemData>();

            if (itemData != null)
            {
                CurItem = memberItem;
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic[KeyId]          = TeaUtil.CurTeaId;
                dic[KeyUserId]      = itemData.UserId;
                dic[KeyLimitStatus] = status;
                Facade.Instance <TwManager>().SendAction(KeyMemberLimitAction, dic, OnLimitChange);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 更改成员授权状态
        /// </summary>
        /// <param name="memberItem">成员信息Item</param>
        /// <param name="status">授权状态值</param>
        public void OnCreateRightChange(TeaMemberInfoItem memberItem, string status)
        {
            var itemData = memberItem.GetData <TeaMemberInfoItemData>();

            if (itemData != null)
            {
                int changeStatus = 0;
                int.TryParse(status, out changeStatus);
                CurItem = memberItem;
                Dictionary <string, object> dic = new Dictionary <string, object>();
                dic[KeyId]        = TeaUtil.CurTeaId;
                dic[KeyUserId]    = itemData.UserId;
                dic[KeyLimitType] = changeStatus;
                Facade.Instance <TwManager>().SendAction(KeyCreateRoomLimitAction, dic, success =>
                {
                    itemData.ChangeCreateStatus(changeStatus);
                    ChangeChildItem(memberItem, itemData);
                });
            }
        }