Пример #1
0
        private void ProgressChanged_GetAnime(object sender, APIProgressReport e)
        {
            if (e.Parameter != null)
            {
                var animeObject = ((AnimeObject)e.Parameter);
                getAnime_CoverImageImage.Source     = new BitmapImage(animeObject.CoverImageUrl);
                getAnime_RomanjiTitleTextBlock.Text = animeObject.RomanjiTitle;
                getAnime_EnglishTitleTextBlock.Text = animeObject.EnglishTitle;
                getAnime_KanjiTitleTextBlock.Text   = animeObject.KanjiTitle;

                List <ServiceID> serviceIDs = new List <ServiceID>();
                serviceIDs.Add(animeObject.ID);
                serviceIDs.Add(animeObject.ID2);
                serviceIDs.AddRange(animeObject.AlternateIDs);
                getAnime_AnimeIDs.ItemsSource = serviceIDs;

                getAnime_AiringStatusTextBlock.Text = animeObject.AiringStatus.ToString();
                getAnime_WebUrlTextBlock.Text       = animeObject.WebUrlString;
                getAnime_EpisodeCountTextBlock.Text = "Episode Count: " + animeObject.EpisodeCount.ToString();

                getAnime_AgeRatingTextBlock.Text = animeObject.AgeRating.ToString();
                getAnime_SynopsisTextBlock.Text  = "Synopsis: " + animeObject.Synopsis;
                getAnime_MediaTypeTextBlock.Text = animeObject.MediaType.ToString();

                getAnime_FavouriteIDTextBlock.Text   = "Favourite ID: " + animeObject.FavouriteID.ToString();
                getAnime_FavouriteRankTextBlock.Text = "Favourite Rank: " + animeObject.FavouriteRank.ToString();

                getAnime_Genres.ItemsSource = animeObject.Genres;
            }
        }
Пример #2
0
 void ProgressChanged_Authenticate(object sender, APIProgressReport e)
 {
     if (e.Parameter != null)
     {
         var userInfo = ((UserLoginInfo)e.Parameter);
         authenticate_authTokenTextBlock.Text = userInfo.AuthToken;
     }
 }
Пример #3
0
        private void ProgressChanged_GetFavourites(object sender, APIProgressReport e)
        {
            if (e.Parameter != null)
            {
                var           searchResults = ((List <AnimeObject>)e.Parameter);
                List <string> titles        = new List <string>();
                foreach (var animeObject in searchResults)
                {
                    titles.Add(animeObject.RomanjiTitle);
                }

                getFavourites_TitlesListBox.ItemsSource = titles;
            }
        }
Пример #4
0
        private void ProgressChanged_GetLibrary(object sender, APIProgressReport e)
        {
            if (e.Parameter != null)
            {
                var           searchResults = ((List <LibraryObject>)e.Parameter);
                List <string> titles        = new List <string>();
                foreach (var libraryObject in searchResults)
                {
                    titles.Add(libraryObject.Anime.RomanjiTitle + ", " + libraryObject.Section.ToString());
                }

                getLibrary_TitlesListBox.ItemsSource = titles;
            }
        }
Пример #5
0
 void ProgressChanged_StatusReport(object sender, APIProgressReport e)
 {
     statusBox.Text = e.StatusMessage;
 }