Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.0 kB
4
Indexable
var ctr = 0;
        var results = await FilePicker.PickMultipleAsync();
        foreach (var result in results)
        {
            progressLoading.IsVisible = true;
            ctr++;
            switch (ctr)
            {
                //first image
                case 1:
                {
                    _img1Result = result;
                    var stream = await result.OpenReadAsync();
                    img1.Source = ImageSource.FromStream(() => stream);
                    break;
                }
                case 2:
                {
                    _img2Result = result;
                    var stream = await result.OpenReadAsync();
                    img2.Source = ImageSource.FromStream(() => stream);
                    break;
                }
                case 3:
                {
                    _img3Result = result;
                    var stream = await result.OpenReadAsync();
                    img3.Source = ImageSource.FromStream(() => stream);
                    break;
                }
                case 4:
                {
                    _img4Result = result;
                    var stream = await result.OpenReadAsync();
                    img4.Source = ImageSource.FromStream(() => stream);
                    break;
                }
                case 5:
                {
                    _img5Result = result;
                    var stream = await result.OpenReadAsync();
                    img5.Source = ImageSource.FromStream(() => stream);
                    break;
                }
                case 6:
                {
                    _img6Result = result;
                    var stream = await result.OpenReadAsync();
                    img6.Source = ImageSource.FromStream(() => stream);
                    break;
                }

            }
        }
        progressLoading.IsVisible = false;