Exemple #1
0
        public async static Task UpdatePersonDefaultImageAddress(string personId, Face face)
        {
            JObject jo = new JObject();

            jo.Add("id", personId);
            jo.Add("defaultImageAddress", AzureBlobService.GetImageAddress(face.Id + ".jpg"));
            await personTable.UpdateAsync(jo);
        }
Exemple #2
0
        public async static Task <Face> UpdateFaceImageAddress(Face face)
        {
            Face updatedFace = await GetFaceFromImageTokenAndPersonId(face.ImageToken, face.PersonId);

            await AzureBlobService.UploadImageFromImageToken(face.ImageToken, updatedFace.Id + ".jpg");

            JObject jo = new JObject();

            jo.Add("id", updatedFace.Id);
            jo.Add("imageAddress", AzureBlobService.GetImageAddress(updatedFace.Id + ".jpg"));
            //updatedFace.ImageAddress = AzureBlobService.GetImageAddress(updatedFace.Id + ".jpg");
            await faceTable.UpdateAsync(jo);

            return(updatedFace);
        }
Exemple #3
0
        public async static Task <ObservableCollection <Person> > GetPersonList(string patientId)
        {
            persons = await personTable
                      .Where(personTable => personTable.Name != "stranger")
                      .Where(personTable => personTable.PatientId == patientId).ToCollectionAsync();

            ObservableCollection <Person> personList = new ObservableCollection <Person>();

            foreach (Person person in persons)
            {
                if (person.DefaultImageAddress != null)
                {
                    person.DefaultIcon = await AzureBlobService.DisplayImageFile(person.DefaultImageAddress);
                }
                else
                {
                    person.DefaultIcon = MainPage.nullBitmapImage;
                }

                personList.Add(person);
            }
            return(personList);
        }