Exemplo n.º 1
0
        /// <summary>
        /// 退出讨论组
        /// </summary>
        public static bool ExitGroup(string groupId, string groupName, List <AntSdkGroupMember> Members)
        {
            ExitGroupInput input = new ExitGroupInput();

            input.groupId = groupId;
            input.token   = AntSdkService.AntSdkLoginOutput.token;
            input.userId  = AntSdkService.AntSdkLoginOutput.userId;
            input.version = GlobalVariable.Version;

            BaseOutput output  = new BaseOutput();
            var        errCode = 0;
            string     errMsg  = string.Empty;
            //TODO:AntSdk_Modify
            //DONE:AntSdk_Modify
            var isResult = AntSdkService.GroupExitor(AntSdkService.AntSdkLoginOutput.userId, groupId, ref errCode, ref errMsg);

            if (isResult)
            {
                string[] ThreadParams = new string[3];
                ThreadParams[0] = groupId;
                ThreadParams[1] = ImageHandle.GetGroupPicture(Members.Where(c => c.userId != AntSdkService.AntSdkLoginOutput.userId).Select(c => c.picture).ToList());
                ThreadParams[2] = string.IsNullOrEmpty(groupName) ? "" : groupName;
                Thread UpdateGroupPictureThread = new Thread(UpdateGroupPicture);
                UpdateGroupPictureThread.Start(ThreadParams);

                //OnDropOutGroupEvent(this);
            }
            else
            {
                MessageBoxWindow.Show(errMsg, GlobalVariable.WarnOrSuccess.Warn);
            }
            return(isResult);
        }