public static void UpdateGroupPicture(object localPicture) { string[] ThreadParams = localPicture as string[]; string pictureAddress = ImageHandle.UploadPicture(ThreadParams[1]); AntSdkUpdateGroupInput updateInput = new AntSdkUpdateGroupInput(); updateInput.userId = AntSdkService.AntSdkLoginOutput.userId; updateInput.groupId = ThreadParams[0]; updateInput.groupName = ""; updateInput.groupPicture = pictureAddress; var errCode = 0; string errMsg = string.Empty; //TODO:AntSdk_Modify //DONE:AntSdk_Modify AntSdkService.UpdateGroup(updateInput, ref errCode, ref errMsg); //(new HttpService()).UpdateGroup(updateInput, ref updateOut, ref errMsg); }
//public string NewGroupPicture; /// <summary> /// 更新讨论组 /// </summary> private void UpdateGroup() { if (GroupInfo == null) { return; } AntSdkUpdateGroupInput input = new AntSdkUpdateGroupInput(); input.userId = AntSdkService.AntSdkLoginOutput.userId; input.groupId = this.GroupInfo.groupId; NewGroupMemberList = new List <AntSdkContact_User>(); foreach (ContactInfoViewModel vm in GroupMemberList) { if (!OriginalMemberIds.Contains(vm.User.userId)) { if (input.userIds == null) { input.userIds = new List <string>(); } input.userIds.Add(vm.User.userId); if (input.userNames == null) { input.userNames = new List <string>(); } input.userNames.Add(vm.User.userName); NewGroupMemberList.Add(vm.User); } } if (NewGroupMemberList.Count != 0) { BaseOutput output = new BaseOutput(); var errCode = 0; string errMsg = string.Empty; //TODO:AntSdk_Modify //DONE:AntSdk_Modify var isResult = AntSdkService.UpdateGroup(input, ref errCode, ref errMsg); if (!isResult) { NewGroupMemberList = null; MessageBoxWindow.Show(errMsg, GlobalVariable.WarnOrSuccess.Warn); return; } //if (!(new HttpService()).UpdateGroup(input, ref output, ref errMsg)) //{ // NewGroupMemberList = null; // if (output.errorCode != "1004") // { // MessageBoxWindow.Show(errMsg,GlobalVariable.WarnOrSuccess.Warn); // } // return; // //OnUpdateGroupEvent(input.groupId, input.userIds); //} string[] ThreadParams = new string[3]; ThreadParams[0] = this.GroupInfo.groupId; ThreadParams[1] = ImageHandle.GetGroupPicture(GroupMemberList.Select(c => c.Photo).ToList()); ThreadParams[2] = string.IsNullOrEmpty(this.GroupInfo.groupName) ? "" : this.GroupInfo.groupName; Thread UpdateGroupPictureThread = new Thread(GroupPublicFunction.UpdateGroupPicture); UpdateGroupPictureThread.Start(ThreadParams); //this.NewGroupPicture = input.groupPicture; } App.Current.Dispatcher.BeginInvoke((Action)(() => { this.close.Invoke(); })); }