protected void OnImageViewTapped(object sender, EventArgs e) { try { string url = ((TappedEventArgs)e).Parameter.ToString(); new PhotoBrowser { Photos = new List <Photo> { new Photo { URL = url, } }, ActionButtonPressed = (index) => { Debug.WriteLine($"Clicked {index}"); PhotoBrowser.Close(); }, EnableGrid = false, }.Show(); } catch (Exception ex) { } }
private void showZoom(ArqImagens nomeSelecionado) { try { new PhotoBrowser { Photos = new List <Photo> { new Photo { URL = nomeSelecionado.nome_arquivo_completo, }, }, ActionButtonPressed = (index) => { Debug.WriteLine($"Clicked {index}"); PhotoBrowser.Close(); // _navigationService.GoBackAsync(); } }.Show(); } catch (Exception ex) { } }
protected void init() { View view = Inflate(Context, Resource.Layout.photo_browser_overlay, this); tvDescription = view.FindViewById <TextView>(Resource.Id.tvDescription); btnClose = view.FindViewById <ImageButton>(Resource.Id.btnClose); btnAction = view.FindViewById <ImageButton>(Resource.Id.btnShare); btnClose.Click += (sender, e) => { PhotoBrowser.Close(); }; if (_photoBrowser.ActionButtonPressed != null) { btnAction.Click += (o, e) => { _photoBrowser.ActionButtonPressed?.Invoke(_currentIndex); }; } else { btnAction.Visibility = ViewStates.Gone; } }
protected void OnClickedShowGallery(object sender, EventArgs e) { new PhotoBrowser { Photos = new List <Photo> { new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Vincent.jpg", Title = "Vincent" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Jules.jpg", Title = "Jules" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Korben.jpg", Title = "Korben" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Toretto.jpg", Title = "Toretto" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Marty.jpg", Title = "Marty" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Driver.jpg", Title = "Driver" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Frank.jpg", Title = "Frank" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Max.jpg", Title = "Max" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Daniel.jpg", Title = "Daniel" } }, ActionButtonPressed = (index) => { Debug.WriteLine($"Clicked {index}"); PhotoBrowser.Close(); } }.Show(); }
public void Dispose() { var pathToDir = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/ISSO-I/"; // Чистим предыдущие фотки if (Directory.Exists(pathToDir)) { DependencyService.Get <ILocalFileProvider>().DeleteFilesFromDir(pathToDir); } ImageService.Instance.InvalidateCacheAsync(FFImageLoading.Cache.CacheType.Memory); PhotoBrowser.Close(); lv_photos.ItemTapped -= Lv_photos_ItemTapped; _dataInformation.Clear(); _dataInformation = null; lv_photos.ItemsSource = null; GC.Collect(); }
private void showZoom(string nomeSelecionado) { new PhotoBrowser { Photos = new List <Photo> { new Photo { URL = nomeSelecionado, }, }, ActionButtonPressed = (index) => { Debug.WriteLine($"Clicked {index}"); PhotoBrowser.Close(); // _navigationService.GoBackAsync(); } }.Show(); }
public override void OnNavigatingTo(INavigationParameters parameters) { nome_arquivo_completo = (string)parameters["imagem"]; new PhotoBrowser { Photos = new List <Photo> { new Photo { URL = nome_arquivo_completo, }, }, ActionButtonPressed = (index) => { Debug.WriteLine($"Clicked {index}"); PhotoBrowser.Close(); NavigationService.GoBackAsync(); } }.Show(); }
private void OnShowImage() { try { var browser = new PhotoBrowser(); List <Photo> photos = new List <Photo>(); photos.Add(new Photo { URL = CognitiveRequest.ImageUrl }); browser.Photos = photos; browser.ActionButtonPressed = (x) => { PhotoBrowser.Close(); }; browser.Show(); } catch (Exception ex) { Debug.WriteLine($"ERROR:{ex.Message}"); } }
private void ShowPictures(int index) { var photos = new List <Photo>(); foreach (var information in _dataInformation) { photos.Add(new Photo { URL = $"file://{information.ImageSource}", Title = information.Info }); } PhotoBrowser.Close(); PhotoBrowser = new PhotoBrowser { Photos = photos, //EnableGrid = false, StartIndex = index, }; PhotoBrowser.Show(); PhotoBrowser.EnableGrid = true; }
private void showZoom(ArqImagens nomeSelecionado) { try { List <Photo> _photo = new List <Photo>(); // NavigationService.NavigateAsync("LoginPacientePage"); // teste(nomeSelecionado); for (int i = 0; i < nomeSelecionado.lista_jpeg.Count(); i++) { var foto = new Photo(); foto.URL = nomeSelecionado.lista_jpeg[i].ToString().Replace(" ", "%20"); //foto.URL = nomeSelecionado.lista_jpeg[i]; _photo.Add(foto); } // var retorno = await apiService.DownloadFileAsync(nome_arquivo_completo); new PhotoBrowser { Photos = _photo, ActionButtonPressed = (index) => { Debug.WriteLine($"Clicked {index}"); PhotoBrowser.Close(); // _navigationService.GoBackAsync(); } }.Show(); } catch (Exception ex) { ex.Message.ToString(); } }
protected void OnClickedShowGallery(object sender, EventArgs e) { new PhotoBrowser { Photos = new List <Photo> { new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Vincent.jpg", Title = "Vincent" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Jules.jpg", Title = "Jules" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Korben.jpg", Title = "Korben" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Toretto.jpg", Title = "Toretto" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Marty.jpg", Title = "Marty" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Driver.jpg", Title = "Driver" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Frank.jpg", Title = "Frank" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Max.jpg", Title = "Max" }, new Photo { URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Daniel.jpg", Title = "Daniel" } }, ActionButtonPressed = (index) => { Debug.WriteLine($"Clicked {index}"); PhotoBrowser.Close(); }, EnableGrid = true, BackgroundColor = Color.White, DidDisplayPhoto = (index) => { Debug.WriteLine($"Selection changed: {index}"); }, Android_ContainerPaddingPx = 20, iOS_ZoomPhotosToFill = false }.Show(); }