Esempio n. 1
0
        private GroupResponse GroupPersons()
        {
            try
            {
                http.Request.RawHeaders.Add("Ocp-Apim-Subscription-Key", api_key);
            }
            catch (System.ArgumentException e)
            {
                Console.Write(e);
            }
            http.Request.Accept = "application/json";

            String url = String.Format("{0}/group", api_url);

            FaceGroupRequest faceGroup = new FaceGroupRequest();

            faceGroup.faceIds = _faceIds.ToArray();

            var           response      = http.Post(url, faceGroup, "application/json");
            GroupResponse groupResponse = new GroupResponse();

            groupResponse.groups     = response.DynamicBody.groups;
            groupResponse.messyGroup = response.DynamicBody.messyGroup;

            return(groupResponse);
        }
Esempio n. 2
0
        private void BtnGroupFaces_Click(object sender, RoutedEventArgs e)
        {
            GroupResponse r = GroupPersons();

            totalUniquesCount = totalUniquesCount + r.groups.Length;
            totalMessyCount   = totalMessyCount + r.messyGroup.Length;

            LblUnique.Content = totalUniquesCount;
            LblMessy.Content  = totalMessyCount;
        }