Esempio n. 1
0
        public async Task <ActionResult> Lost(LostModel model)
        {
            // Spice things up a little bit
            ViewBag.LaughingAtYourLossImage = await GiphyHelper.GetRandomGif(model.Tag) ?? Url.Content("~/Content/fiddy.gif");

            return(View(model));
        }
Esempio n. 2
0
        private void CommandBinding_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            string searchText = System.Convert.ToString(e.Parameter);

            _LastResultCount = NumResults;
            _LastRating      = Rating;

            _results.Clear();

            Mouse.OverrideCursor = Cursors.Wait;

            try
            {
                foreach (GiphyResult result in GiphyHelper.Search(searchText, NumResults, Rating))
                {
                    _results.Add(result);
                }
            }
            finally
            {
                Mouse.OverrideCursor = null;
            }
        }