예제 #1
0
        public async Task OnGetAsync(string Name)
        {
            byte[] imageArray;
            string base64ImageRepresentation;

            plc = await api3.getPlacesAsync();

            prs = await api3.getPersonAsync();

            getAllPht = await api3.getPhotosAsync();

            b64 = new List <string>();
            for (var i = 0; i < getAllPht.Count; i++)
            {
                for (var j = 0; j < getAllPht[i].Person.Count; j++)
                {
                    if (getAllPht[i].Person[j].Name == Name)
                    {
                        //Debug.WriteLine(getAllPht[i].Person[j].Name);
                        //Debug.WriteLine("lalalala");
                        displayPht.Add(getAllPht[i]);
                    }
                }
            }
        }
        public async Task OnGetAsync(string Name)
        {
            byte[] imageArray;
            string base64ImageRepresentation;

            plc = await api3.getPlacesAsync();

            prs = await api3.getPersonAsync();

            getAllPht = await api3.getPhotosAsync();

            b64 = new List <string>();
            for (var i = 0; i < getAllPht.Count; i++)
            {
                for (var j = 0; j < getAllPht[i].Person.Count; j++)
                {
                    if (getAllPht[i].Person[j].Name == Name)
                    {
                        displayPht.Add(getAllPht[i]);
                    }
                }
            }

            //for (var i = 0; i < plc.Count; i++)
            //{
            //  imageArray = System.IO.File.ReadAllBytes(plc[i]);

            //  base64ImageRepresentation = Convert.ToBase64String(imageArray);
            //  b64.Add("data:image/jpg" + ";base64," + base64ImageRepresentation);
            //  }
        }