示例#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));
        }
示例#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;
            }
        }