コード例 #1
0
        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);
        }
コード例 #2
0
 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.");
 }
コード例 #3
0
 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);
         }
     }
 }
コード例 #4
0
        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          = "";
        }