public void RefreshAnimeCrossRefs() { try { JMMServerBinary.Contract_AniDB_AnimeCrossRefs xrefDetails = JMMServerVM.Instance.clientBinaryHTTP.GetCrossRefDetails(this.AnimeID); if (xrefDetails == null) return; aniDB_AnimeCrossRefs = new AniDB_AnimeCrossRefsVM(); aniDB_AnimeCrossRefs.Populate(xrefDetails); } catch (Exception ex) { logger.ErrorException(ex.ToString(), ex); } }
private void RefreshData() { try { AniDB_AnimeCrossRefs = null; AniDB_AnimeVM anime = this.DataContext as AniDB_AnimeVM; if (anime == null) return; JMMServerBinary.Contract_AniDB_AnimeCrossRefs xrefDetails = JMMServerVM.Instance.clientBinaryHTTP.GetCrossRefDetails(anime.AnimeID); if (xrefDetails == null) return; AniDB_AnimeCrossRefs = new AniDB_AnimeCrossRefsVM(); AniDB_AnimeCrossRefs.Populate(xrefDetails); MainListHelperVM.Instance.UpdateAnime(anime.AnimeID); } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
private void RefreshImagesData() { this.Cursor = Cursors.Wait; try { AniDB_AnimeCrossRefsVM AniDB_AnimeCrossRefs = null; SeriesTvDBWideBanners = null; AllPosters = null; AllFanarts = null; AnimeSeriesVM ser = this.DataContext as AnimeSeriesVM; if (ser == null) return; JMMServerBinary.Contract_AniDB_AnimeCrossRefs xrefDetails = JMMServerVM.Instance.clientBinaryHTTP.GetCrossRefDetails(ser.AniDB_ID); if (xrefDetails == null) return; AniDB_AnimeCrossRefs = new AniDB_AnimeCrossRefsVM(); AniDB_AnimeCrossRefs.Populate(xrefDetails); SeriesTvDBWideBanners = AniDB_AnimeCrossRefs.TvDBImageWideBanners; AllPosters = AniDB_AnimeCrossRefs.AllPosters; AllFanarts = AniDB_AnimeCrossRefs.AllFanarts; } catch (Exception ex) { Utils.ShowErrorMessage(ex); } finally { this.Cursor = Cursors.Arrow; } }
void TvDBAndOtherLinks_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e) { try { if (this.DataContext == null) { AniDB_AnimeCrossRefs = null; return; } RefreshData(); } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }