public async Task DeletePersonFromPersonGroupAsync(Guid personId, string groupId = "") { var targetGroup = string.IsNullOrEmpty(groupId) ? _defaultPersonGroupId : groupId; var group = await GetPersonGroupOrCreateAsync(targetGroup); await _client.DeletePersonFromPersonGroupAsync(group.PersonGroupId, personId); }
private async void DeletePersonAsync(String p, String groupId) { try { Guid guid = new Guid(); Guid.TryParse(p, out guid); _("Deleting from Cloud service..."); await faceServiceClient.DeletePersonFromPersonGroupAsync(groupId, guid); }catch (FaceAPIException e) { _(e.Message); } _("Done."); }
private async Task deletePerson(string id) { if (-1 < lstPersons.SelectedIndex) { try { await faceServiceClient.DeletePersonFromPersonGroupAsync(id, prsns[lstPersons.SelectedIndex].PersonId); await WaitCallLimitPerSecondAsync(); await loadPersons(id); } catch (FaceAPIException ex) { ShowErrorMsg(ex.Message); } } }
private async void deletePersonButton_Click(object sender, EventArgs e) { PersonGroup selectedPersonGroup = personGroups[personGroupSelector.SelectedIndex]; Person selectedPerson = persons[personSelector.SelectedIndex]; await faceServiceClient.DeletePersonFromPersonGroupAsync(selectedPersonGroup.PersonGroupId, selectedPerson.PersonId); persons = await GetPersonsInPersonGroup(selectedPersonGroup.PersonGroupId); personSelector.Items.Clear(); foreach (Person person in persons) { personSelector.Items.Add(person.Name); } personSelector.SelectedIndex = 0; personSelector.Text = ""; }