Пример #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            _images.Clear();
            if (_user == null)
            {
                _user = (UserInfo)e.Parameter;
            }
            var gallery = Task.Run(async() => await ImgurApi.GetGallery());

            gallery.Wait();

            AddGalleryView(gallery.Result);
        }
Пример #2
0
        private async void TextBox_CharacterReceived(UIElement sender, CharacterReceivedRoutedEventArgs args)
        {
            IEnumerable <IGalleryItem> gallery;

            if (Search.Text == "")
            {
                gallery = await ImgurApi.GetGallery();
            }
            else
            {
                gallery = await ImgurApi.SearchGallery(Search.Text, _user);
            }

            _images.Clear();
            AddGalleryView(gallery);
        }
Пример #3
0
        private async void Image_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
        {
            var image = Images.SelectedItem as ImageInfo;

            ImgurApi.FavoriteImage(image.id, _user);
        }